Skip to content

Commit

Permalink
Merge branch 'java-development' into brunoborges-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
johnoliver committed May 13, 2024
2 parents d082345 + a57eb89 commit 0bbfb5f
Show file tree
Hide file tree
Showing 2,274 changed files with 133,871 additions and 128,799 deletions.
38 changes: 38 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,19 @@ dotnet_diagnostic.CA1062.severity = none # Disable null check, C# already does i
dotnet_diagnostic.CA1303.severity = none # Do not pass literals as localized parameters
dotnet_diagnostic.CA1508.severity = none # Avoid dead conditional code. Too many false positives.
dotnet_diagnostic.CA1510.severity = none
dotnet_diagnostic.CA1515.severity = none # Making public types from exes internal
dotnet_diagnostic.CA1805.severity = none # Member is explicitly initialized to its default value
dotnet_diagnostic.CA1822.severity = none # Member does not access instance data and can be marked as static
dotnet_diagnostic.CA1848.severity = none # For improved performance, use the LoggerMessage delegates
dotnet_diagnostic.CA1849.severity = none # Use async equivalent; analyzer is currently noisy
dotnet_diagnostic.CA2007.severity = none # Do not directly await a Task
dotnet_diagnostic.CA2225.severity = none # Operator overloads have named alternates
dotnet_diagnostic.CA2227.severity = none # Change to be read-only by removing the property setter
dotnet_diagnostic.CA2253.severity = none # Named placeholders in the logging message template should not be comprised of only numeric characters
dotnet_diagnostic.CA2253.severity = none # Named placeholders in the logging message template should not be comprised of only numeric characters
dotnet_diagnostic.CA2263.severity = suggestion # Use generic overload

dotnet_diagnostic.VSTHRD103.severity = none # Use async equivalent; analyzer is currently noisy
dotnet_diagnostic.VSTHRD111.severity = none # Use .ConfigureAwait(bool) is hidden by default, set to none to prevent IDE from changing on autosave
dotnet_diagnostic.VSTHRD200.severity = none # Use Async suffix for async methods
dotnet_diagnostic.xUnit1004.severity = none # Test methods should not be skipped. Remove the Skip property to start running the test again.
Expand Down Expand Up @@ -363,6 +368,39 @@ csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent

###############################
# Resharper Rules #
###############################

# Resharper disabled rules: https://www.jetbrains.com/help/resharper/Reference__Code_Inspections_CSHARP.html#CodeSmell
resharper_redundant_linebreak_highlighting = none # Disable Resharper's "Redundant line break" highlighting
resharper_missing_linebreak_highlighting = none # Disable Resharper's "Missing line break" highlighting
resharper_bad_empty_braces_line_breaks_highlighting = none # Disable Resharper's "Bad empty braces line breaks" highlighting
resharper_missing_indent_highlighting = none # Disable Resharper's "Missing indent" highlighting
resharper_missing_blank_lines_highlighting = none # Disable Resharper's "Missing blank lines" highlighting
resharper_wrong_indent_size_highlighting = none # Disable Resharper's "Wrong indent size" highlighting
resharper_bad_indent_highlighting = none # Disable Resharper's "Bad indent" highlighting
resharper_bad_expression_braces_line_breaks_highlighting = none # Disable Resharper's "Bad expression braces line breaks" highlighting
resharper_multiple_spaces_highlighting = none # Disable Resharper's "Multiple spaces" highlighting
resharper_bad_expression_braces_indent_highlighting = none # Disable Resharper's "Bad expression braces indent" highlighting
resharper_bad_control_braces_indent_highlighting = none # Disable Resharper's "Bad control braces indent" highlighting
resharper_bad_preprocessor_indent_highlighting = none # Disable Resharper's "Bad preprocessor indent" highlighting
resharper_redundant_blank_lines_highlighting = none # Disable Resharper's "Redundant blank lines" highlighting
resharper_multiple_statements_on_one_line_highlighting = none # Disable Resharper's "Multiple statements on one line" highlighting
resharper_bad_braces_spaces_highlighting = none # Disable Resharper's "Bad braces spaces" highlighting
resharper_outdent_is_off_prev_level_highlighting = none # Disable Resharper's "Outdent is off previous level" highlighting
resharper_bad_symbol_spaces_highlighting = none # Disable Resharper's "Bad symbol spaces" highlighting
resharper_bad_colon_spaces_highlighting = none # Disable Resharper's "Bad colon spaces" highlighting
resharper_bad_semicolon_spaces_highlighting = none # Disable Resharper's "Bad semicolon spaces" highlighting
resharper_bad_square_brackets_spaces_highlighting = none # Disable Resharper's "Bad square brackets spaces" highlighting
resharper_bad_parens_spaces_highlighting = none # Disable Resharper's "Bad parens spaces" highlighting

# Resharper enabled rules: https://www.jetbrains.com/help/resharper/Reference__Code_Inspections_CSHARP.html#CodeSmell
resharper_comment_typo_highlighting = suggestion # Resharper's "Comment typo" highlighting
resharper_redundant_using_directive_highlighting = warning # Resharper's "Redundant using directive" highlighting
resharper_inconsistent_naming_highlighting = warning # Resharper's "Inconsistent naming" highlighting
resharper_redundant_this_qualifier_highlighting = warning # Resharper's "Redundant 'this' qualifier" highlighting
resharper_arrange_this_qualifier_highlighting = warning # Resharper's "Arrange 'this' qualifier" highlighting

###############################
# Java Coding Conventions #
Expand Down
12 changes: 9 additions & 3 deletions .github/_typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ extend-exclude = [
]

[default.extend-words]
ACI = "ACI" # Azure Container Instance
exercize = "exercize" #test typos
ACI = "ACI" # Azure Container Instance
exercize = "exercize" # test typos
gramatical = "gramatical" # test typos
Guid = "Guid" # Globally Unique Identifier
HD = "HD" # Test header value
EOF = "EOF" # End of File
ans = "ans" # Short for answers
arange = "arange" # Method in Python numpy package

[default.extend-identifiers]
ags = "ags" # Azure Graph Service
Expand All @@ -31,4 +37,4 @@ extend-ignore-re = [
[type.msbuild]
extend-ignore-re = [
'Version=".*"', # ignore package version numbers
]
]
22 changes: 22 additions & 0 deletions .github/workflows/close-inactive-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Close inactive issues
on:
schedule:
- cron: "30 1 * * *"

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: 90
days-before-issue-close: 14
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 90 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
uses: github/codeql-action/autobuild@v2

- name: Setup JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
if: ${{ matrix.language == 'java' }}
with:
java-version: 17
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/dotnet-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,9 @@ jobs:
fail-fast: false
matrix:
include:
- { dotnet: "6.0-jammy", os: "ubuntu", configuration: Debug }
- { dotnet: "7.0-jammy", os: "ubuntu", configuration: Release }
- { dotnet: "8.0-jammy", os: "ubuntu", configuration: Release }
- { dotnet: "6.0", os: "windows", configuration: Release }
- {
dotnet: "7.0",
dotnet: "8.0",
os: "windows",
configuration: Debug,
integration-tests: true,
Expand All @@ -83,7 +80,7 @@ jobs:
- name: Run Unit Tests
run: |
export UT_PROJECTS=$(find ./dotnet -type f -name "*.UnitTests.csproj" | grep -v -E "(Planners.Core.UnitTests.csproj|Experimental.Orchestration.Flow.UnitTests.csproj|Experimental.Assistants.UnitTests.csproj)" | tr '\n' ' ')
export UT_PROJECTS=$(find ./dotnet -type f -name "*.UnitTests.csproj" | grep -v -E "(Experimental.Orchestration.Flow.UnitTests.csproj|Experimental.Assistants.UnitTests.csproj)" | tr '\n' ' ')
for project in $UT_PROJECTS; do
dotnet test -c ${{ matrix.configuration }} $project --no-build -v Normal --logger trx --collect:"XPlat Code Coverage" --results-directory:"TestResults/Coverage/"
done
Expand All @@ -109,18 +106,27 @@ jobs:
Planners__AzureOpenAI__DeploymentName: ${{ vars.PLANNERS__AZUREOPENAI__DEPLOYMENTNAME }}
Planners__OpenAI__ApiKey: ${{ secrets.PLANNERS__OPENAI__APIKEY }}
Planners__OpenAI__ModelId: ${{ vars.PLANNERS__OPENAI__MODELID }}
OpenAITextToAudio__ApiKey: ${{ secrets.OPENAITEXTTOAUDIO__APIKEY }}
OpenAITextToAudio__ModelId: ${{ vars.OPENAITEXTTOAUDIO__MODELID }}
OpenAIAudioToText__ApiKey: ${{ secrets.OPENAIAUDIOTOTEXT__APIKEY }}
OpenAIAudioToText__ModelId: ${{ vars.OPENAIAUDIOTOTEXT__MODELID }}
AzureOpenAITextToAudio__ApiKey: ${{ secrets.AZUREOPENAITEXTTOAUDIO__APIKEY }}
AzureOpenAITextToAudio__Endpoint: ${{ secrets.AZUREOPENAITEXTTOAUDIO__ENDPOINT }}
AzureOpenAITextToAudio__DeploymentName: ${{ vars.AZUREOPENAITEXTTOAUDIO__DEPLOYMENTNAME }}
AzureOpenAIAudioToText__ApiKey: ${{ secrets.AZUREOPENAIAUDIOTOTEXT__APIKEY }}
AzureOpenAIAudioToText__Endpoint: ${{ secrets.AZUREOPENAIAUDIOTOTEXT__ENDPOINT }}
AzureOpenAIAudioToText__DeploymentName: ${{ vars.AZUREOPENAIAUDIOTOTEXT__DEPLOYMENTNAME }}
Bing__ApiKey: ${{ secrets.BING__APIKEY }}
OpenAI__ApiKey: ${{ secrets.OPENAI__APIKEY }}

# Generate test reports and check coverage
- name: Generate test reports
uses: danielpalme/[email protected].0
uses: danielpalme/[email protected].4
with:
reports: "./TestResults/Coverage/**/coverage.cobertura.xml"
targetdir: "./TestResults/Reports"
reporttypes: "JsonSummary"
# Report for production packages only
assemblyfilters: "+Microsoft.SemanticKernel.Abstractions;+Microsoft.SemanticKernel.Core;+Microsoft.SemanticKernel.PromptTemplates.Handlebars;+Microsoft.SemanticKernel.Connectors.OpenAI;+Microsoft.SemanticKernel.Yaml;"
assemblyfilters: "+Microsoft.SemanticKernel.Abstractions;+Microsoft.SemanticKernel.Core;+Microsoft.SemanticKernel.PromptTemplates.Handlebars;+Microsoft.SemanticKernel.Connectors.OpenAI;+Microsoft.SemanticKernel.Yaml;+Microsoft.SemanticKernel.Agents.Abstractions;+Microsoft.SemanticKernel.Agents.Core;+Microsoft.SemanticKernel.Agents.OpenAI"

- name: Check coverage
shell: pwsh
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ jobs:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, dotnet: '6.0', configuration: Debug }
- { os: ubuntu-latest, dotnet: '6.0', configuration: Release }
- { os: ubuntu-latest, dotnet: '7.0', configuration: Release }
- { os: ubuntu-latest, dotnet: '8.0', configuration: Debug }
- { os: ubuntu-latest, dotnet: '8.0', configuration: Release }

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -68,7 +66,7 @@ jobs:
matrix:
os: [windows-latest]
configuration: [Release, Debug]
dotnet-version: ['7.0.x']
dotnet-version: ['8.0.x']
runs-on: ${{ matrix.os }}
env:
NUGET_CERT_REVOCATION_MODE: offline
Expand All @@ -78,13 +76,13 @@ jobs:
clean: true

- name: Setup .NET SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
env:
NUGET_AUTH_TOKEN: ${{ secrets.GPR_READ_TOKEN }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/dotnet-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ name: dotnet-format
on:
workflow_dispatch:
pull_request:
branches: [ "main", "feature*" ]
branches: ["main", "feature*"]
paths:
- 'dotnet/**'
- 'samples/dotnet/**'
- '**.cs'
- '**.csproj'
- '**.editorconfig'
- "dotnet/**"
- "samples/dotnet/**"
- "**.cs"
- "**.csproj"
- "**.editorconfig"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -25,9 +25,7 @@ jobs:
fail-fast: false
matrix:
include:
#- { dotnet: '6.0', configuration: Release, os: ubuntu-latest }
#- { dotnet: '7.0', configuration: Release, os: ubuntu-latest }
- { dotnet: '8.0', configuration: Release, os: ubuntu-latest }
- { dotnet: "8.0", configuration: Release, os: ubuntu-latest }

runs-on: ${{ matrix.os }}
env:
Expand Down Expand Up @@ -56,16 +54,16 @@ jobs:
if: github.event_name != 'pull_request' || steps.changed-files.outputs.added_modified != '' || steps.changed-files.outcome == 'failure'
run: |
csproj_files=()
exclude_files=("Planners.Core.csproj" "Planners.Core.UnitTests.csproj" "Experimental.Orchestration.Flow.csproj" "Experimental.Orchestration.Flow.UnitTests.csproj" "Experimental.Orchestration.Flow.IntegrationTests.csproj")
exclude_files=("Experimental.Orchestration.Flow.csproj" "Experimental.Orchestration.Flow.UnitTests.csproj" "Experimental.Orchestration.Flow.IntegrationTests.csproj")
if [[ ${{ steps.changed-files.outcome }} == 'success' ]]; then
for file in ${{ steps.changed-files.outputs.added_modified }}; do
echo "$file was changed"
dir="./$file"
while [[ $dir != "." && $dir != "/" && $dir != $GITHUB_WORKSPACE ]]; do
if find "$dir" -maxdepth 1 -name "*.csproj" -print -quit | grep -q .; then
csproj_path="$(find "$dir" -maxdepth 1 -name "*.csproj" -print -quit)"
if [[ ! "${exclude_files[@]}" =~ "${csproj_path##*/}" ]]; then
csproj_files+=("$csproj_path")
if [[ ! "${exclude_files[@]}" =~ "${csproj_path##*/}" ]]; then
csproj_files+=("$csproj_path")
fi
break
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
clean: true

- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
if: ${{ github.event_name != 'pull_request' }}
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Find projects
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
fi
# Sets up the specified JDK version from the matrix
uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: ${{ steps.set-jdk.outputs.JDK_VERSION }}
distribution: microsoft
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
echo "JDK_VERSION=$version" >> $GITHUB_OUTPUT
fi
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: ${{ steps.set-jdk.outputs.JDK_VERSION }}
distribution: microsoft
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/markdown-link-check-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,14 @@
},
{
"pattern": "^https://platform.openai.com"
},
{
"pattern": "^https://outlook.office.com/bookings"
}
],
"timeout": "20s",
"retryOn429": true,
"retryCount": 3,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [
200,
206,
429,
500,
503
]
"aliveStatusCodes": [200, 206, 429, 500, 503]
}
6 changes: 3 additions & 3 deletions .github/workflows/python-build-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ jobs:
run: pipx install poetry

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: "poetry"
cache-dependency-path: "python/pyproject.toml"

- name: Install SemanticKernel
- name: Install Semantic Kernel
run: poetry install --no-ansi

- name: Build wheel
run: poetry build

- name: Upload wheel file to artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: python/dist/*

0 comments on commit 0bbfb5f

Please sign in to comment.