Commit Graph
177 Commits
Author SHA1 Message Date
Abby HarrisonandAbby Harrison b9c77f45e7 Python: Fix parameter propagation bug in Plan Object Model (#2388)
### Motivation and Context

Initially called out and fixed by @joowon-dm-snu in
https://github.com/microsoft/semantic-kernel/pull/2223

This PR closes
[#2094](https://github.com/microsoft/semantic-kernel/issues/2094)

There was a bug in the Plan Object Model that propagates the name of the
step parameter to the next step. It should be propagating the
parameter's value


### Description
In addition to making the code change to fix the bug, also added a unit
test that covers the changed code.

Below image shows the before and after of the test with the fix. 


![image](https://github.com/microsoft/semantic-kernel/assets/54643756/7217f42a-a2ac-4491-a709-bea9be7328e3)

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

Co-authored-by: Abby Harrison <[email protected]>
2023-08-10 00:30:34 +00:00
dependabot[bot] 274c4fd410 Python: Bump azure-identity from 1.13.0 to 1.14.0 in /python (#2384)
Bumps [azure-identity](https://github.com/Azure/azure-sdk-for-python)
from 1.13.0 to 1.14.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Azure/azure-sdk-for-python/releases">azure-identity's
releases</a>.</em></p>
<blockquote>
<h2>azure-identity_1.14.0</h2>
<h2>1.14.0 (2023-08-08)</h2>
<h3>Features Added</h3>
<ul>
<li>Continuous Access Evaluation (CAE) is now configurable per-request
by setting the <code>enable_cae</code> keyword argument to
<code>True</code> in <code>get_token</code>. This applies to user
credentials and service principal credentials. (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/pull/30777">#30777</a>)</li>
</ul>
<h3>Breaking Changes</h3>
<ul>
<li>CP1 client capabilities for CAE is no longer always-on by default
for user credentials. This capability will now be configured as-needed
in each <code>get_token</code> request by each SDK. (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/pull/30777">#30777</a>)
<ul>
<li>Suffixes are now appended to persistent cache names to indicate
whether CAE or non-CAE tokens are stored in the cache. This is to
prevent CAE and non-CAE tokens from being mixed/overwritten in the same
cache. This could potentially cause issues if you are trying to share
the same cache between applications that are using different versions of
the Azure Identity library as each application would be reading from a
different cache file.</li>
<li>Since CAE is no longer always enabled for user-credentials, the
<code>AZURE_IDENTITY_DISABLE_CP1</code> environment variable is no
longer supported.</li>
</ul>
</li>
</ul>
<h3>Bugs Fixed</h3>
<ul>
<li>Credential types correctly implement <code>azure-core</code>'s
<code>TokenCredential</code> protocol. (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/25175">#25175</a>)</li>
</ul>
<h2>azure-identity_1.14.0b2</h2>
<h2>1.14.0b2 (2023-07-11)</h2>
<h3>Features Added</h3>
<ul>
<li>Added <code>workload_identity_tenant_id</code> support in
<code>DefaultAzureCredential</code>.</li>
</ul>
<h2>azure-identity_1.14.0b1</h2>
<h2>1.14.0b1 (2023-06-06)</h2>
<h3>Features Added</h3>
<ul>
<li>Continue attempt next credential when finding an expired token from
cached token credential in DefaultAzureCredential. (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/pull/30441">#30441</a>)</li>
</ul>
<h3>Other Changes</h3>
<ul>
<li>VisualStudioCodeCredential prints an informative error message when
used (as it is currently broken) (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/pull/30385">#30385</a>)</li>
<li>Removed dependency on <code>six</code>. (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/pull/30613">#30613</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/85d3fb50ccc16d6ce8171a0e045a754838749080"><code>85d3fb5</code></a>
update release date (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31501">#31501</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/3a6c7f48c92b5d590aa7ab16ee0c04358a7b0ec1"><code>3a6c7f4</code></a>
Identity changelog (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31454">#31454</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/0464b2a853763434fffed730af097411b1681cb8"><code>0464b2a</code></a>
[Identity] Correctly implement TokenCredential protocols (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31047">#31047</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/e7a9aed09339ebe57741059a99cca5f023a95f94"><code>e7a9aed</code></a>
Add a type in identity (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31431">#31431</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/72214111a9db39fe13402ffefe78c2d026032ad0"><code>7221411</code></a>
disable beta features (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31385">#31385</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/f6d7789694e813d23ba8e3b903f1cf4a9d59c8c2"><code>f6d7789</code></a>
[Identity] Enable CAE toggle per token request (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/30777">#30777</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/9f1bf3a83f4f3b7592e8af03dc9681aae121dc01"><code>9f1bf3a</code></a>
Identity not use is chained (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31328">#31328</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/e8d95188c45a99773d346a90f465f38d47145a6b"><code>e8d9518</code></a>
[Identity] Enable black formatting in CI (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31315">#31315</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/6ed3e1541cc7e24d4ab9a57bd1438d35ab0e82b8"><code>6ed3e15</code></a>
make is_chained internal only (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31296">#31296</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/57146235c1c597b56fb56e8796eec7aa62fcc51e"><code>5714623</code></a>
Identity new msal (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31267">#31267</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/Azure/azure-sdk-for-python/compare/azure-identity_1.13.0...azure-identity_1.14.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=azure-identity&package-manager=pip&previous-version=1.13.0&new-version=1.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-09 18:06:09 +00:00
dependabot[bot] 65593a2b33 Python: Bump azure-core from 1.28.0 to 1.29.0 in /python (#2382)
Bumps [azure-core](https://github.com/Azure/azure-sdk-for-python) from
1.28.0 to 1.29.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Azure/azure-sdk-for-python/releases">azure-core's
releases</a>.</em></p>
<blockquote>
<h2>azure-core_1.29.0</h2>
<h2>1.29.0 (2023-08-03)</h2>
<h3>Features Added</h3>
<ul>
<li>A keyword argument <code>enable_cae</code> was added to the
<code>get_token</code> method of the <code>TokenCredential</code>
protocol. <a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31012">#31012</a></li>
<li><code>BearerTokenCredentialPolicy</code> and
<code>AsyncBearerTokenCredentialPolicy</code> now accept
<code>enable_cae</code> keyword arguments in their constructors. This is
used in determining if <a
href="https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation">Continuous
Access Evaluation (CAE)</a> should be enabled for each
<code>get_token</code> request. <a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31012">#31012</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/c4c18a7b427633c0519016d762dc141ae743e41b"><code>c4c18a7</code></a>
Type Complete config and settings (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31422">#31422</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/d0e378e4bbcede2aab113b71bb5340eebd776d4f"><code>d0e378e</code></a>
Azure-Core Exceptions: Type Complete (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31056">#31056</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/8d94f35aa1d7eda334f47e57e365cf41cbc17886"><code>8d94f35</code></a>
Skip publishing docs.ms for track 1 package (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31437">#31437</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/128a8c85e71c0000a1de8faab06356d4a6fba2df"><code>128a8c8</code></a>
Update changelog (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31452">#31452</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/8b1513b44be265bfe68dbf3ee54ca9313bd8e16d"><code>8b1513b</code></a>
Address arch review feedback (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31436">#31436</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/7764d2cb6646b5c611df24d15798555638096603"><code>7764d2c</code></a>
rename HTTPResponseType_co to HTTPResponseType (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31356">#31356</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/93c031758e3e98ca89b35185911262d6f16a0c1b"><code>93c0317</code></a>
[Core Experimental] Fix HTTPX Sample and Bug Fix (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31370">#31370</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/630864674a734f6a61f62827599ef6e94570eca1"><code>6308646</code></a>
update version and changelog (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31374">#31374</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/4d7b89809c9f20110271f927cda6623eacdab946"><code>4d7b898</code></a>
cleanup unwanted kwargs for transport (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31347">#31347</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/a5b7fb5a9e8789acf5dfa00affa3e48d50a84019"><code>a5b7fb5</code></a>
Increment tracing plugin changelogs (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31107">#31107</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/Azure/azure-sdk-for-python/compare/azure-core_1.28.0...azure-core_1.29.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=azure-core&package-manager=pip&previous-version=1.28.0&new-version=1.29.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-09 18:05:32 +00:00
dependabot[bot] f3fc31b8ef Python: Bump ruff from 0.0.282 to 0.0.283 in /python (#2381)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.282 to 0.0.283.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>v0.0.283</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Breaking Changes</h3>
<ul>
<li>Assume Python 3.8 instead of 3.10 for target version by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6397">astral-sh/ruff#6397</a></li>
</ul>
<h3>Rules</h3>
<ul>
<li>[<code>flake8-pyi</code>] <code>PYI019</code>: Detects if a type
variable is used instead of <code>Self</code> in return annotations by
<a href="https://github.com/qdegraaf"><code>@​qdegraaf</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6204">astral-sh/ruff#6204</a></li>
<li>[<code>flake8-pyi</code>] <code>PYI051</code>: Detects unions of
<code>Literal</code> types by <a
href="https://github.com/LaBatata101"><code>@​LaBatata101</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/6215">astral-sh/ruff#6215</a></li>
<li>[<code>flake8-pyi</code>] <code>PYI055</code>: Detects unions of
<code>type</code>s by <a
href="https://github.com/LaBatata101"><code>@​LaBatata101</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/6316">astral-sh/ruff#6316</a></li>
<li>[<code>pylint</code>] <code>E1300</code>: Detects invalid string
format characters by <a
href="https://github.com/silvanocerza"><code>@​silvanocerza</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6171">astral-sh/ruff#6171</a></li>
<li>[<code>pyupgrade</code>] <code>UP040</code>: Upgrades type alias
annotations to use PEP-695 syntax by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6289">astral-sh/ruff#6289</a></li>
</ul>
<h3>Rule Changes</h3>
<ul>
<li>[<code>flake8-boolean-trap</code>] <code>FBT003</code>: Add
<code>is_</code> and <code>is_not</code> to excluded functions by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6307">astral-sh/ruff#6307</a></li>
<li>[<code>flake8-logging-format</code>] Allow capitalized names for
logger candidate heuristic match by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6356">astral-sh/ruff#6356</a></li>
<li>[<code>flake8-pyi</code>] Applicable rules are now checked non-stub
code by <a href="https://github.com/andersk"><code>@​andersk</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6297">astral-sh/ruff#6297</a>
<ul>
<li><code>PYI013</code>: <a
href="https://beta.ruff.rs/docs/rules/ellipsis-in-non-empty-class-body"><code>ellipsis-in-non-empty-class-body</code></a></li>
<li><code>PYI016</code>: <a
href="https://beta.ruff.rs/docs/rules/duplicate-union-member"><code>duplicate-union-member</code></a></li>
<li><code>PYI018</code>: <a
href="https://beta.ruff.rs/docs/rules/unused-private-type-var"><code>unused-private-type-var</code></a></li>
<li><code>PYI019</code>: <a
href="https://beta.ruff.rs/docs/rules/custom-type-var-return-type"><code>custom-type-var-return-type</code></a></li>
<li><code>PYI024</code>: <a
href="https://beta.ruff.rs/docs/rules/collections-named-tuple"><code>collections-named-tuple</code></a></li>
<li><code>PYI025</code>: <a
href="https://beta.ruff.rs/docs/rules/unaliased-collections-abc-set-import"><code>unaliased-collections-abc-set-import</code></a></li>
<li><code>PYI030</code>: <a
href="https://beta.ruff.rs/docs/rules/unnecessary-literal-union"><code>unnecessary-literal-union</code></a></li>
<li><code>PYI032</code>: <a
href="https://beta.ruff.rs/docs/rules/any-eq-ne-annotation"><code>any-eq-ne-annotation</code></a></li>
<li><code>PYI034</code>: <a
href="https://beta.ruff.rs/docs/rules/non-self-return-type"><code>non-self-return-type</code></a></li>
<li><code>PYI036</code>: <a
href="https://beta.ruff.rs/docs/rules/bad-exit-annotation"><code>bad-exit-annotation</code></a></li>
<li><code>PYI041</code>: <a
href="https://beta.ruff.rs/docs/rules/redundant-numeric-union"><code>redundant-numeric-union</code></a></li>
<li><code>PYI042</code>: <a
href="https://beta.ruff.rs/docs/rules/snake-case-type-alias"><code>snake-case-type-alias</code></a></li>
<li><code>PYI043</code>: <a
href="https://beta.ruff.rs/docs/rules/t-suffixed-type-alias"><code>t-suffixed-type-alias</code></a></li>
<li><code>PYI045</code>: <a
href="https://beta.ruff.rs/docs/rules/iter-method-return-iterable"><code>iter-method-return-iterable</code></a></li>
<li><code>PYI046</code>: <a
href="https://beta.ruff.rs/docs/rules/unused-private-protocol"><code>unused-private-protocol</code></a></li>
<li><code>PYI047</code>: <a
href="https://beta.ruff.rs/docs/rules/unused-private-type-alias"><code>unused-private-type-alias</code></a></li>
<li><code>PYI049</code>: <a
href="https://beta.ruff.rs/docs/rules/unused-private-typed-dict"><code>unused-private-typed-dict</code></a></li>
<li><code>PYI050</code>: <a
href="https://beta.ruff.rs/docs/rules/no-return-argument-annotation-in-stub"><code>no-return-argument-annotation-in-stub</code></a>
(Python ≥ 3.11)</li>
<li><code>PYI051</code>: <a
href="https://beta.ruff.rs/docs/rules/redundant-literal-union"><code>redundant-literal-union</code></a></li>
<li><code>PYI056</code>: <a
href="https://beta.ruff.rs/docs/rules/unsupported-method-call-on-all"><code>unsupported-method-call-on-all</code></a></li>
</ul>
</li>
<li>[<code>flake8-pyi</code>] <code>PYI027</code> is being replaced by
<code>PYI022</code> / <code>UP035</code> by <a
href="https://github.com/LaBatata101"><code>@​LaBatata101</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/6354">astral-sh/ruff#6354</a></li>
<li>[<code>pydocstyle</code>] <code>D103</code>: Don't require
docstrings in <code>.pyi</code> files by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6239">astral-sh/ruff#6239</a></li>
<li>[<code>pydocstyle</code>] <code>D203</code>: Ignore same-line
docstrings for lines-before and lines-after rules by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6344">astral-sh/ruff#6344</a></li>
<li>[<code>pylint</code>] <code>PLE0605</code>: Allow generic tuple and
list calls in <code>__all__</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6247">astral-sh/ruff#6247</a></li>
<li>[<code>pylint</code>] <code>PLR0124</code>: Add detection of
comparisons with built-in calls by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6324">astral-sh/ruff#6324</a></li>
<li>[<code>pyupgrade</code>] <code>UP032</code>: Add support for
<code>await</code> expressions in f-strings by <a
href="https://github.com/harupy"><code>@​harupy</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6304">astral-sh/ruff#6304</a></li>
<li>[<code>pyupgrade</code>] <code>UP032</code>: Add support for
implicitly concatenated strings by <a
href="https://github.com/harupy"><code>@​harupy</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6263">astral-sh/ruff#6263</a></li>
<li>[<code>pyupgrade</code>] <code>UP032</code>: Add support for
repeated format fields by <a
href="https://github.com/harupy"><code>@​harupy</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6266">astral-sh/ruff#6266</a></li>
<li>[<code>ruff</code>] <code>RUF012</code>: Permit
<code>ClassVar</code> and <code>Final</code> without subscript by <a
href="https://github.com/bluetech"><code>@​bluetech</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6273">astral-sh/ruff#6273</a></li>
</ul>
<h3>Bug Fixes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.0.283</h2>
<h3>The target Python version now defaults to 3.8 instead of 3.10 (<a
href="https://redirect.github.com/astral-sh/ruff/pull/6397">#6397</a>)</h3>
<p>Previously, when a target Python version was not specified, Ruff
would use a default of Python 3.10. However, it is safer to default to
an <em>older</em> Python version to avoid assuming the availability of
new features. We now default to the oldest supported Python version
which is currently Python 3.8.</p>
<p>(We still support Python 3.7 but since <a
href="https://devguide.python.org/versions/#unsupported-versions">it has
reached EOL</a> we've decided not to make it the default here.)</p>
<h2>0.0.277</h2>
<h3><code>.ipynb_checkpoints</code>, <code>.pyenv</code>,
<code>.pytest_cache</code>, and <code>.vscode</code> are now excluded by
default (<a
href="https://redirect.github.com/astral-sh/ruff/pull/5513">#5513</a>)</h3>
<p>Ruff maintains a list of default exclusions, which now consists of
the following patterns:</p>
<ul>
<li><code>.bzr</code></li>
<li><code>.direnv</code></li>
<li><code>.eggs</code></li>
<li><code>.git</code></li>
<li><code>.git-rewrite</code></li>
<li><code>.hg</code></li>
<li><code>.ipynb_checkpoints</code></li>
<li><code>.mypy_cache</code></li>
<li><code>.nox</code></li>
<li><code>.pants.d</code></li>
<li><code>.pyenv</code></li>
<li><code>.pytest_cache</code></li>
<li><code>.pytype</code></li>
<li><code>.ruff_cache</code></li>
<li><code>.svn</code></li>
<li><code>.tox</code></li>
<li><code>.venv</code></li>
<li><code>.vscode</code></li>
<li><code>__pypackages__</code></li>
<li><code>_build</code></li>
<li><code>buck-out</code></li>
<li><code>build</code></li>
<li><code>dist</code></li>
<li><code>node_modules</code></li>
<li><code>venv</code></li>
</ul>
<p>Previously, the <code>.ipynb_checkpoints</code>, <code>.pyenv</code>,
<code>.pytest_cache</code>, and <code>.vscode</code> directories were
not
excluded by default. This change brings Ruff's default exclusions in
line with other tools like
Black.</p>
<h2>0.0.276</h2>
<h3>The <code>keep-runtime-typing</code> setting has been reinstated (<a
href="https://redirect.github.com/astral-sh/ruff/pull/5470">#5470</a>)</h3>
<p>The <code>keep-runtime-typing</code> setting has been reinstated with
revised semantics. This setting was
removed in <a
href="https://redirect.github.com/astral-sh/ruff/pull/4427">#4427</a>,
as it was equivalent to ignoring</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/fe9590f39f4d41deb1d4ed7c655cff0bcb02bdc4"><code>fe9590f</code></a>
Bump version number to 0.0.283 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6407">#6407</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/e769c74899a744eb773b80da9f3a18dbc42e072b"><code>e769c74</code></a>
Check .git in formatter progress checkouts for build (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6387">#6387</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/d815a25b11d8abe0151628fd84282ed48d823750"><code>d815a25</code></a>
Update <code>StmtMatch</code> formatting snapshots (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6427">#6427</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/001aa486df8566aaf74f7f601684321f9ef2d53b"><code>001aa48</code></a>
Add formatting for <code>StmtMatch</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6286">#6286</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/87984e9ac7387204c49703d9dcf50237b5a33d89"><code>87984e9</code></a>
Expand parents whenever open-parenthesis comments are present (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6389">#6389</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/6aefe71c565b402c8045ea74b09331be4f69bafb"><code>6aefe71</code></a>
Fix name of rule in example of <code>extend-per-file-ignores</code> in
options.rs (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6417">#6417</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/90ba40c23c4a179637da81f5a38f50b2f4b4951c"><code>90ba40c</code></a>
Fix zulip unstable formatting with end-of-line comments (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6386">#6386</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/2bd345358f14a21ecf52b5514d6b5dbe3e8cbca0"><code>2bd3453</code></a>
Simplify <code>parenthesized</code> formatting (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6419">#6419</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/289d1e85bfc11b1c8137cb9c88da9386d1cc6491"><code>289d1e8</code></a>
Manually parenthesize tuple expr in <code>B014</code> autofix (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6415">#6415</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/6df5ab40987cba7bb5681c2445caaf83ebcfbf7d"><code>6df5ab4</code></a>
Remove duplicate line from project structure docs (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6408">#6408</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.0.282...v0.0.283">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.0.282&new-version=0.0.283)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-09 18:04:24 +00:00
Matthew Bolaños 54ee340ca2 Python: Move notebooks into language folders (#2368)
### Motivation and Context
In an effort to move all samples to their respective language folder,
I've moved all of the notebooks to the correct language folder.


### Contribution Checklist

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2023-08-09 14:29:56 +00:00
Aditya Gudimella 3ce874bea3 Python: [BugFix] ReadOnlySkillCollection is not a Generic (#2364)
All (unit) tests are passing.

### Motivation and Context

This change reduces the number of user facing changes and aligns the
type of
ReadOnlySkillCollection with the usage in SK. There is only one type of
`SkillCollection` in SK, so it doesn't make sense to make
`ReadOnlySkillCollection`
a generic. If, in the future, another SkillCollection type is added,
then we might
want to change this to a generic type.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2023-08-08 20:22:23 +00:00
Devis Lucato fb8fc57da8 Update pyproject.toml 2023-08-08 09:50:00 -07:00
138080abb7 Python: Add init file to connectors submodule (#2350)
### Motivation and Context
Microsoft docs autogeneration will not recognize connectors as a
submodule of semantic_kernel unless it has an __init__.py file

### Description

Adds an empty __init__.py file to semantic_kernel/connectors/ - will not
affect module imports for this package but will ensure that connectors
is correctly picked up as a semantic_kernel submodule.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Dmytro Struk <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
2023-08-08 15:43:41 +00:00
dependabot[bot] 3417609746 Python: Bump ipykernel from 6.25.0 to 6.25.1 in /python (#2344)
Bumps [ipykernel](https://github.com/ipython/ipykernel) from 6.25.0 to
6.25.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ipython/ipykernel/releases">ipykernel's
releases</a>.</em></p>
<blockquote>
<h2>v6.25.1</h2>
<h2>6.25.1</h2>
<p>(<a
href="https://github.com/ipython/ipykernel/compare/v6.25.0...18e54f31725d6645dd71a8749c9e1eb28281f804">Full
Changelog</a>)</p>
<h3>Bugs fixed</h3>
<ul>
<li>Modifying debugger to return the same breakpoints in 'debugInfo'
response as 'setBreakpoints' <a
href="https://redirect.github.com/ipython/ipykernel/pull/1140">#1140</a>
(<a
href="https://github.com/vaishnavi17"><code>@​vaishnavi17</code></a>)</li>
</ul>
<h3>Maintenance and upkeep improvements</h3>
<h3>Contributors to this release</h3>
<p>(<a
href="https://github.com/ipython/ipykernel/graphs/contributors?from=2023-07-25&amp;to=2023-08-07&amp;type=c">GitHub
contributors page for this release</a>)</p>
<p><a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Apre-commit-ci+updated%3A2023-07-25..2023-08-07&amp;type=Issues"><code>@​pre-commit-ci</code></a>
| <a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Avaishnavi17+updated%3A2023-07-25..2023-08-07&amp;type=Issues"><code>@​vaishnavi17</code></a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ipython/ipykernel/blob/main/CHANGELOG.md">ipykernel's
changelog</a>.</em></p>
<blockquote>
<h2>6.25.1</h2>
<p>(<a
href="https://github.com/ipython/ipykernel/compare/v6.25.0...18e54f31725d6645dd71a8749c9e1eb28281f804">Full
Changelog</a>)</p>
<h3>Bugs fixed</h3>
<ul>
<li>Modifying debugger to return the same breakpoints in 'debugInfo'
response as 'setBreakpoints' <a
href="https://redirect.github.com/ipython/ipykernel/pull/1140">#1140</a>
(<a
href="https://github.com/vaishnavi17"><code>@​vaishnavi17</code></a>)</li>
</ul>
<h3>Maintenance and upkeep improvements</h3>
<h3>Contributors to this release</h3>
<p>(<a
href="https://github.com/ipython/ipykernel/graphs/contributors?from=2023-07-25&amp;to=2023-08-07&amp;type=c">GitHub
contributors page for this release</a>)</p>
<p><a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Apre-commit-ci+updated%3A2023-07-25..2023-08-07&amp;type=Issues"><code>@​pre-commit-ci</code></a>
| <a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Avaishnavi17+updated%3A2023-07-25..2023-08-07&amp;type=Issues"><code>@​vaishnavi17</code></a></p>
<!-- raw HTML omitted -->
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ipython/ipykernel/commit/6bf3fe9e44f1caf4bc371f700ac0c2e9c9c3bd84"><code>6bf3fe9</code></a>
Publish 6.25.1</li>
<li><a
href="https://github.com/ipython/ipykernel/commit/18e54f31725d6645dd71a8749c9e1eb28281f804"><code>18e54f3</code></a>
Modifying debugger to return the same breakpoints in 'debugInfo'
response as ...</li>
<li><a
href="https://github.com/ipython/ipykernel/commit/c8517461f434a72fb4e30fc03b5949aca4c5af52"><code>c851746</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/ipython/ipykernel/issues/1138">#1138</a>)</li>
<li>See full diff in <a
href="https://github.com/ipython/ipykernel/compare/v6.25.0...v6.25.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ipykernel&package-manager=pip&previous-version=6.25.0&new-version=6.25.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-08 00:04:22 +00:00
78613496d4 Python: Update Planner Jupyter Notebook to feature latest planners (#2341)
### Motivation and Context
The Python Jupyter notebook for Planners need to be updated to include
the latest planners (Sequential and Action)

The `BasicPlanner` implementation also needed to have a separate Plan
class since we now have plan object model. These changes allow for
people to still use the BasicPlanner if they want.

---------

Co-authored-by: Alex Chao <achao@achao>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
2023-08-07 23:30:08 +00:00
Devis Lucato 619534c904 Update pyproject.toml (next release version) 2023-08-07 09:20:19 -07:00
3774258d0f Python: Embeddings batch size (#2331)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Adding optional batch size parameter for when Azure OpenAI limits number
of inputs for embeddings requests. Fixes
https://github.com/microsoft/semantic-kernel/issues/2099
### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
2023-08-04 23:54:07 +00:00
77eeff2cd6 Python: Adgudime/python/serialization/skill definition (#2329)
This is part 4 of the Serialization work for semantic kernel.

Corresponding issue:
https://github.com/microsoft/semantic-kernel/issues/131

### Motivation and Context

While there are no user facing changes, the ReadOnlySkillCollection has
been modified to remove
circular dependencies that were causing issues with serialization.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
2023-08-04 23:46:17 +00:00
JoowonandAbby Harrison 67dfb4c1f5 Python: add invoke_stream_async for SKFunction (#2200)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
while implementing #1691, there was an idea that adding
`invoke_stream_async` on `SKFunction` is reasonable.

<img width="870" alt="image"
src="https://github.com/microsoft/semantic-kernel/assets/69464062/44278d30-66b2-41d2-8c9f-c1daea50b331">



### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
moved temporal streaming logic from `Kernel` to `SKFunction`
I didn't want to add new `DelegateTypes` like `InStringOutStreaming` for
minimal changes.

in most cases, `SKFunction` is initiated from `from_semantic_config` or
`from_native_method`.
Now, both functions will handle the 'delegate_stream_function' argument,
which will be used in `invoke_stream_async`



### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Abby Harrison <[email protected]>
2023-08-04 19:06:27 +00:00
Aditya GudimellaandAbby Harrison 68dbbcfb1a Python: Serialization add pydantic integration instructions (#2288)
### Summary

This is part 1 of the Serialization work for semantic kernel.

Corresponding issue:
https://github.com/microsoft/semantic-kernel/issues/131

### Motivation and Context

Adds instructions on how to serialize your classes using Pydantic.


<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Abby Harrison <[email protected]>
2023-08-04 19:04:56 +00:00
JoowonandAbby Harrison 8aa133bc8b Python: make input parameter optional (#2234)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
solve #2233 

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

Co-authored-by: Abby Harrison <[email protected]>
2023-08-04 18:00:26 +00:00
Mark KarleandAbby Harrison 2733a5574f Python: Import OpenAPI documents into the semantic kernel (#2297)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

This allows us to import OpenAPI documents, including ChatGPT plugins,
into the Semantic Kernel.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
- The interface reads the operationIds of the openapi spec into a skill:
```python
from semantic_kernel.connectors.openapi import register_openapi_skill
skill = register_openapi_skill(kernel=kernel, skill_name="test", openapi_document="url/or/path/to/openapi.yamlorjson")
skill['operationId'].invoke_async()
```
- Parse an OpenAPI document
- For each operation in the document, create a function that will
execute the operation
- Add all those operations to a skill in the kernel
- Modified `import_skill` to accept a dictionary of functions instead of
just class so that we can import dynamically created functions
- Created unit tests

TESTING:
I've been testing this with the following ChatGPT plugins:
- [Semantic Kernel Starter's Python Flask
plugin](https://github.com/microsoft/semantic-kernel-starters/tree/main/sk-python-flask)
- [ChatGPT's example retrieval
plugin](https://github.com/openai/chatgpt-retrieval-plugin/blob/main/docs/providers/azuresearch/setup.md)
- This one was annoying to setup. I didn't get the plugin functioning,
but I was able to send the right API requests
- Also, their openapi file was invalid. The "servers" attribute is
misindented
- [Google ChatGPT
plugin](https://github.com/Sogody/google-chatgpt-plugin)
- [Chat TODO plugin](https://github.com/lencx/chat-todo-plugin)
- This openapi file is also invalid. I checked with an online validator.
I had to remove"required" from the referenced request objects'
properties:
https://github.com/lencx/chat-todo-plugin/blob/main/openapi.yaml#L85

Then I used this python file to test the examples:

```python
import asyncio
import logging

import semantic_kernel as sk
from semantic_kernel import ContextVariables, Kernel
from semantic_kernel.connectors.ai.open_ai import AzureTextCompletion
from semantic_kernel.connectors.openapi.sk_openapi import register_openapi_skill

# Example usage
chatgpt_retrieval_plugin = {
    "openapi": # location of the plugin's openapi.yaml file,
    "payload": {
        "queries": [
            {
                "query": "string",
                "filter": {
                    "document_id": "string",
                    "source": "email",
                    "source_id": "string",
                    "author": "string",
                    "start_date": "string",
                    "end_date": "string",
                },
                "top_k": 3,
            }
        ]
    },
    "operation_id": "query_query_post",
}

sk_python_flask = {
    "openapi":  # location of the plugin's openapi.yaml file,
    "path_params": {"skill_name": "FunSkill", "function_name": "Joke"},
    "payload": {"input": "dinosaurs"},
    "operation_id": "executeFunction",
}
google_chatgpt_plugin = {
    "openapi":  # location of the plugin's openapi.yaml file,
    "query_params": {"q": "dinosaurs"},
    "operation_id": "searchGet",
}

todo_plugin_add = {
    "openapi":  # location of the plugin's openapi.yaml file,
    "path_params": {"username": "markkarle"},
    "payload": {"todo": "finish this"},
    "operation_id": "addTodo",
}

todo_plugin_get = {
    "openapi":  # location of the plugin's openapi.yaml file,
    "path_params": {"username": "markkarle"},
    "operation_id": "getTodos",
}

todo_plugin_delete = {
    "openapi":  # location of the plugin's openapi.yaml file,
    "path_params": {"username": "markkarle"},
    "payload": {"todo_idx": 0},
    "operation_id": "deleteTodo",
}


plugin = todo_plugin_get # set this to the plugin you want to try

logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
logger.setLevel(logging.DEBUG)

kernel = Kernel(log=logger)
deployment, api_key, endpoint = sk.azure_openai_settings_from_dot_env()
kernel.add_text_completion_service(
    "dv", AzureTextCompletion(deployment, endpoint, api_key)
)

skill = register_openapi_skill(
    kernel=kernel, skill_name="test", openapi_document=plugin["openapi"]
)
context_variables = ContextVariables(variables=plugin)
result = asyncio.run(
    skill[plugin["operation_id"]].invoke_async(variables=context_variables)
)
print(result)
```

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Abby Harrison <[email protected]>
2023-08-04 17:48:21 +00:00
Aditya GudimellaandAbby Harrison 0c49538788 Python: Serialize semantic_kernel/template_engine/blocks (#2317)
This is part 3 of the Serialization work for semantic kernel.

Corresponding issue:
https://github.com/microsoft/semantic-kernel/issues/131

### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Contains one breaking change: 
`TextBlock(...)` becomes `TextBlock.from_text(...)`


### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Abby Harrison <[email protected]>
2023-08-04 17:43:42 +00:00
2163e08edd Python: casting device int to str (#2242)
fixes an issue when gpu is enabled to run HF models.

### Motivation and Context

  1. Why is this change required?
      running hf models on GPU causes an issue with device string
  2. What problem does it solve?
      fixed string concatenation issue
  3. What scenario does it contribute to?
      Helps when running HF models on GPU


### Description



### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Shawn Callegari <[email protected]>
Co-authored-by: Mark Karle <[email protected]>
2023-08-03 23:51:51 +00:00
Aditya GudimellaandAbby Harrison ca6548a441 Python: Enable core skills, retry mechanisms and template engine protocols to be used as pydantic fields (#2287)
### Summary

This is part 1 of the Serialization work for semantic kernel.

Corresponding issue:
https://github.com/microsoft/semantic-kernel/issues/131

### Motivation and Context

This PR allows core skills (all except 2), retry mechanisms and template
engine protocols to be used
as valid pydantic fields. This allows me to convert the classes that
depend on these classes to pydantic
models, and thus be able to serialize them.

No user facing code changes are expected from this PR.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->


### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Abby Harrison <[email protected]>
2023-08-03 17:53:01 +00:00
Mark KarleandShawn Callegari 8552943c5a Python: Fix missed assertion bug when loading from .env file (#2274)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
When loading config from .env, the assertions like `assert api_key is
not None, "Azure OpenAI API key not found in .env file"` don't catch
anything. While `dotenv_values(".env")` does put None values for keys
with missing values, that's only if there's no equals sign after the
key. For example, this file:
```
OPENAI_API_KEY=""
OPENAI_ORG_ID="org_id"
AZURE_OPENAI_DEPLOYMENT_NAME=
AZURE_OPENAI_ENDPOINT
```
Would be parsed like this:
```
OrderedDict([('OPENAI_API_KEY', ''), ('OPENAI_ORG_ID', 'org_id'), ('AZURE_OPENAI_DEPLOYMENT_NAME', ''), ('AZURE_OPENAI_ENDPOINT', None)])
```

As you can see, OPENAI_API_KEY and AZURE_OPENAI_DEPLOYMENT_NAME are
loaded with empty strings, not None.
### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Shawn Callegari <[email protected]>
2023-08-03 06:09:38 +00:00
dependabot[bot] b6111bd770 Python: Bump ruff from 0.0.281 to 0.0.282 in /python (#2296)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.281 to 0.0.282.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>v0.0.282</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Reset model state when exiting deferred visitors by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6208">astral-sh/ruff#6208</a></li>
<li>Skip trivia when searching for named exception by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6218">astral-sh/ruff#6218</a></li>
<li>Avoid PERF401 false positive on list access in loop by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6220">astral-sh/ruff#6220</a></li>
<li>Avoid detecting continuations at non-start-of-line by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6219">astral-sh/ruff#6219</a></li>
<li>Revert &quot;Expand scope of <code>quoted-annotation</code> rule (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5766">#5766</a>)&quot;
by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6237">astral-sh/ruff#6237</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/klistwan"><code>@​klistwan</code></a>
made their first contribution in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6146">astral-sh/ruff#6146</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/astral-sh/ruff/compare/v0.0.281...v0.0.282">https://github.com/astral-sh/ruff/compare/v0.0.281...v0.0.282</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/743118ae9ac9c56b7b276dce87291d8200286e43"><code>743118a</code></a>
Bump version to 0.0.282 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6241">#6241</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/0753017cf1b8f31c2d4bc3232a435f3f82d326f2"><code>0753017</code></a>
Revert &quot;Expand scope of <code>quoted-annotation</code> rule (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5766">#5766</a>)&quot;
(<a
href="https://redirect.github.com/astral-sh/ruff/issues/6237">#6237</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/29fb655e04947c64380d085f28c482acedc46c17"><code>29fb655</code></a>
Fix <code>logger-objects</code> documentation (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6238">#6238</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/f45e8645d7c4a2ad4e934ebbbadd91ca59fd543a"><code>f45e864</code></a>
Remove unused parser modes</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/7c7231db2e31cd0cc94bb3ec7ae5147fc6fc72d7"><code>7c7231d</code></a>
Remove unsupported <code>type_comment</code> field</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/4ad5903ef65815b68eeee048d1bb0cef94d0c16d"><code>4ad5903</code></a>
Delete type-ignore node</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/c6986ac95d9e0596bd320bbd08e007c81f930c72"><code>c6986ac</code></a>
Consistent <code>CommentPlacement</code> conversion signatures (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6231">#6231</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/ecfdd8d58b8e6e95546b37b6fce599c987be198f"><code>ecfdd8d</code></a>
Add static assertions to nodes (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6228">#6228</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/07468f8be9f046cbbf11e5b24cdd1840bf6e5bcf"><code>07468f8</code></a>
format ExprJoinedStr (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5932">#5932</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/ba990b676fb4fe39f4feac4960615d8b40fe5857"><code>ba990b6</code></a>
add <code>DebugText</code> for self-documenting f-strings (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6167">#6167</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.0.281...v0.0.282">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.0.281&new-version=0.0.282)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-03 05:21:32 +00:00
Devis Lucato cd98c4aeea Update pyproject.toml (next release) 2023-08-02 14:30:25 -07:00
Devis Lucato cfccde417e Update pyproject.toml 2023-08-02 14:24:47 -07:00
419e5969f7 Python: Fix Integration Tests, Send Push Notifications to Teams, Add Merge Gate (#2279)
### Motivation and Context
This PR addresses multiple issues with the integration tests. Fixes
integration test breaks related to qdrant and chroma package updates.
Labels known flaky tests as xfail. Adds merge queue gates. Adds push
notifications to teams for test results.

### Description
- integration tests are now 1x daily down from 2x daily
- adds a run condition for `merge_group`
- if run for merge_group, a subset of the tests will gate the merge
- ends the results of each test matrix to a dedicated teams channel
- update qdrant client requirement in the pyproject.toml
- remove `persist_directory` from chroma, as the default is now
persistent
- default with_embedding to false in qdrant_memory_store
- modify chroma test setup and teardown to create the database in a
known location and clear the database of entries at the end of each test
(I would have just deleted the database at the end of each test, but
there are test agent permissions issues with this in CI)
- marked known flaky tests (pinecone and sequential_planner) as allowed
to fail

Fixes #2284

---------

Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Dmytro Struk <[email protected]>
2023-08-02 20:06:21 +00:00
dependabot[bot] 05b8b76ef4 Python: Bump ruff from 0.0.280 to 0.0.281 in /python (#2254)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.280 to 0.0.281.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>v0.0.281</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<p>See the <a href="https://astral.sh/blog/ruff-v0.0.281">release blog
post</a> for more, including detailed descriptions of any newly added
rules.</p>
<h3>New rules</h3>
<ul>
<li>[<code>flake8-pyi</code>] Implement <code>PYI018</code> by <a
href="https://github.com/LaBatata101"><code>@​LaBatata101</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/6018">astral-sh/ruff#6018</a></li>
<li>[<code>flake8-pyi</code>] Implement <code>PYI047</code> by <a
href="https://github.com/LaBatata101"><code>@​LaBatata101</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/6134">astral-sh/ruff#6134</a></li>
<li>[<code>flake8-pyi</code>] Implement <code>PYI049</code> by <a
href="https://github.com/LaBatata101"><code>@​LaBatata101</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/6136">astral-sh/ruff#6136</a></li>
<li>[<code>flake8-pyi</code>] Implement <code>PYI056</code> by <a
href="https://github.com/LaBatata101"><code>@​LaBatata101</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5959">astral-sh/ruff#5959</a></li>
<li>[<code>flake8-pyi</code>] Implement <code>PYI046</code> by <a
href="https://github.com/LaBatata101"><code>@​LaBatata101</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/6098">astral-sh/ruff#6098</a></li>
<li>[<code>flake8-use-pathlib</code>] Implement <code>glob</code>
(<code>PTH207</code>) by <a
href="https://github.com/sbrugman"><code>@​sbrugman</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5939">astral-sh/ruff#5939</a></li>
<li>[<code>flake8-use-pathlib</code>] Implement
<code>os-sep-split</code> (<code>PTH206</code>) by <a
href="https://github.com/sbrugman"><code>@​sbrugman</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5936">astral-sh/ruff#5936</a></li>
<li>[<code>pycodestyle</code>] Implement <code>E241</code> and
<code>E242</code> (tab/multiple ws after commas) by <a
href="https://github.com/akx"><code>@​akx</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6094">astral-sh/ruff#6094</a></li>
<li>[<code>pylint</code>] Implement <code>self-assigning-variable</code>
(<code>W0127</code>) by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6015">astral-sh/ruff#6015</a></li>
<li>[<code>pylint</code>] Implement <code>eq-without-hash</code> rule
(PLW1641) by <a href="https://github.com/jelly"><code>@​jelly</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5955">astral-sh/ruff#5955</a></li>
<li>[<code>pylint</code>] Implement
<code>subprocess-popen-preexec-fn</code> (<code>W1509</code>) by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5978">astral-sh/ruff#5978</a></li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-bugbear</code>] Extends <code>B002</code> to detect
unary prefix decrement operators by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5998">astral-sh/ruff#5998</a></li>
<li>[<code>flake8-pytest-style</code>] Avoid raising PT012 for simple
<code>with</code> statements by <a
href="https://github.com/harupy"><code>@​harupy</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6081">astral-sh/ruff#6081</a></li>
<li>[<code>flake8-pytest-style</code>] Allow pytest.raises body to
contain a single func or class definition by <a
href="https://github.com/harupy"><code>@​harupy</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6083">astral-sh/ruff#6083</a></li>
<li>[<code>flake8-simplify</code>] Extend SIM118 with <code>not
in</code> by <a
href="https://github.com/sbrugman"><code>@​sbrugman</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5995">astral-sh/ruff#5995</a></li>
<li>[<code>perflint</code>] Skip <code>PERF203</code> violations for
multi-statement loops by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6145">astral-sh/ruff#6145</a></li>
<li>[<code>pyupgrade</code>] Add support for <code>int</code>,
<code>float</code>, <code>bool</code> in <code>UP018</code> by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/6013">astral-sh/ruff#6013</a></li>
<li>[<code>tryceratops</code>] Add suggested fix for <code>TRY201</code>
by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/6008">astral-sh/ruff#6008</a></li>
</ul>
<h3>Settings</h3>
<ul>
<li>Allow specification of <code>logging.Logger</code> re-exports via
<code>logger-objects</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5750">astral-sh/ruff#5750</a></li>
<li>Set default <code>max-complexity</code> to 10 for empty McCabe
settings by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6073">astral-sh/ruff#6073</a></li>
<li>[<code>pep8-naming</code>]: New config option
<code>extend-ignore-names</code> by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/6169">astral-sh/ruff#6169</a></li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Avoid raising <code>UP032</code> if <code>format</code> call
arguments contain multiline expressions by <a
href="https://github.com/harupy"><code>@​harupy</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5971">astral-sh/ruff#5971</a></li>
<li>Fix <code>F507</code> false positive by <a
href="https://github.com/harupy"><code>@​harupy</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5986">astral-sh/ruff#5986</a></li>
<li>Fix logging rules with whitespace around dot by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6022">astral-sh/ruff#6022</a></li>
<li>Ignore end-of-line comments when dirtying if-with-same-arms branches
by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6031">astral-sh/ruff#6031</a></li>
<li>Avoid treating <code>Literal</code> members as expressions with
<code>__future__</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6032">astral-sh/ruff#6032</a></li>
<li>Avoid refactoring <code>x[:1]</code>-like slices in RUF015 by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6150">astral-sh/ruff#6150</a></li>
<li>Avoid key-in-dict violations for <code>self</code> accesses by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6165">astral-sh/ruff#6165</a></li>
<li>Avoid falsely marking non-submodules as submodule aliases by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6182">astral-sh/ruff#6182</a></li>
<li>Flag <code>[</code> as an invalid noqa suffix by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5982">astral-sh/ruff#5982</a></li>
<li>Ignore some common builtin overrides on standard library subclasses
by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6074">astral-sh/ruff#6074</a></li>
<li>Avoid A003 violations for explicitly overridden methods by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6076">astral-sh/ruff#6076</a></li>
<li>Include file permissions in key for cached files by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5901">astral-sh/ruff#5901</a></li>
<li>Ignore <code>explicit-string-concatenation</code> on single line by
<a href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6028">astral-sh/ruff#6028</a></li>
<li>Fix <code>SIM102</code> to handle indented <code>elif</code> by <a
href="https://github.com/harupy"><code>@​harupy</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6072">astral-sh/ruff#6072</a></li>
<li>Raise <code>PTH201</code> for <code>Path(&quot;&quot;)</code> by <a
href="https://github.com/harupy"><code>@​harupy</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/6095">astral-sh/ruff#6095</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/dbd60b2cf51282fbc3b0f866e566fda7b38514ef"><code>dbd60b2</code></a>
Bump version to 0.0.281 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6195">#6195</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/7eb2ba47cc9d8ccedc7860b244a8ce3d0169f160"><code>7eb2ba4</code></a>
Add empty line after <code>import</code> block (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6200">#6200</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/cb34e6d32215f444f310cbef8f7ac0f69628dd23"><code>cb34e6d</code></a>
Avoid parenthesizing comprehension element (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6198">#6198</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/0274de1fff1c8a6617a656117d74fe7979bfe003"><code>0274de1</code></a>
Preserve backslash in raw string literal (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6152">#6152</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/a540933bc9c6ccdc5423c47a129c972c2edba678"><code>a540933</code></a>
Print log when formatter ecosystem checks fail (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6187">#6187</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/311a1f9ec4908954d3f8b64be8476d01bf67abde"><code>311a1f9</code></a>
Remove <code>len</code> from <code>JoinCommaSeparatedBuilder</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6185">#6185</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/b95fc6d1621a3fc868b4fe486b02a4d30e0e4a02"><code>b95fc6d</code></a>
Format bytes string (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6166">#6166</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/de898c52eb5ed8b7ed1d4f96508a773b42a7ee86"><code>de898c5</code></a>
Avoid falsely marking non-submodules as submodule aliases (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6182">#6182</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/76741cac77111d6243f12706d1f1f565e0337527"><code>76741ca</code></a>
Add <code>global</code> and <code>nonlocal</code> formatting (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6170">#6170</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/5d9814d84d979d94eff346cc177fdd0fab1b4914"><code>5d9814d</code></a>
Remove parentheses around some walrus operators (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6173">#6173</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.0.280...v0.0.281">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.0.280&new-version=0.0.281)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 03:49:20 +00:00
0d37271499 Python: Action Planner implementation (#1948)
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
This PR is a first draft for implementation of ActionPlanner in Python.
I try to follow the C# implementation as much as possible.
Fixes: #1917

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
- I have implemented ActionPlanner in the
`python/semantic_kernel/planning/action_planner` directory. The
implementation is in a file called `action_planner.py` and the prompt
used by the planner (a replica of the prompt used in C#) is found in
`skprompt.txt` in the same directory.
- The functions `good_examples`, `edge_case_examples` and
`list_of_functions` are used by the prompt to populate examples and list
of available functions in the kernel.
- After creating the plan, I parse the JSON generated by the planner by
using regex matching to extract out pure JSON as implemented in #1496
- Based on whether or not the planner was able to identify a function, I
create a Plan instance and return it.

### Here is some example code for using the planner
```python
import logging
import semantic_kernel as sk
from semantic_kernel.planning import ActionPlanner
from semantic_kernel.connectors.ai.open_ai import (
	OpenAIChatCompletion,
	OpenAITextCompletion
)
from semantic_kernel.core_skills import (
	MathSkill,
	FileIOSkill,
	TimeSkill,
	TextSkill
)

async def main():
	kernel = sk.Kernel()
	api_key, org_id = sk.openai_settings_from_dot_env()

	kernel.add_text_completion_service("dv", OpenAITextCompletion("text-davinci-003", api_key, org_id))
	kernel.import_skill(MathSkill(), "math")
	kernel.import_skill(FileIOSkill(), "fileIO")
	kernel.import_skill(TimeSkill(), "time")
	kernel.import_skill(TextSkill(), "text")

	planner = ActionPlanner(kernel)
	ask = "What is the sum of 110 and 990?"
	plan = await planner.create_plan_async(goal=ask)
	result = await plan.invoke_async()
	print(result.result)

if __name__ == "__main__":
	import asyncio
	asyncio.run(main())
```

### Queries
- In the C# implementation, when populating the function parameters in
the plan object, the `plan.parameters` variable is updated with the
function parameters. When I did the same in python, these parameters
weren't being passed onto the function in `invoke_async` method of the
plan instance. The parameters are only being passed when I update them
in the `plan.state` variable. This code is in `line 121` of
`action_planner.py`. What is the right way to do this?
- Some skills / plugins require one of the inputs to be passed as the
`input` variable and not in the context. How should this be handled in
the planner?

![image](https://github.com/microsoft/semantic-kernel/assets/69807105/967ea4b7-914e-46ac-89fb-1eb81c4ea9b0)
**OR**

![image](https://github.com/microsoft/semantic-kernel/assets/69807105/13a21556-8028-4f54-b40a-e4ebd1c5e654)

### Issues that I faced
- The `text-davinci-002` text-completion model regularly output
incorrectly formatted JSON with commas missing. For example
  ```json
  {""plan"":{
""rationale"": ""The list contains a function that allows for writing to
files, so the plan is to use that function to write the desired content
to the file 'output.txt'."",
  ""function"": ""fileIO.writeAsync"",
  ""parameters"": {
  ""input"": null,
  ""content"": ""A brief history of computer science""
  ""path"": ""output.txt""
  }}}
  ```


Pending Items
- [x] Create unit tests
- [x] Send the function parameters to the planner in list of available
functions with/without input parameter.

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [x] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Shawn Callegari <[email protected]>
2023-07-31 18:29:50 +00:00
a2da17d336 Python: google connector (#2071)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Implementation of Google search connector for web search skill.

Fixes: #1862 

Sample usage can be found in
`python/samples/kernel-syntax-examples/google_search_skill.py`

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
2023-07-28 19:56:22 +00:00
484b39d144 Python: Add sequential planner to python (#1916)
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
fixes #1915 

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->


### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [ ] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Shawn Callegari <[email protected]>
2023-07-28 00:08:31 +00:00
SnehaandAbby Harrison e68730119e Python: documentation for /memory (#2176)
### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Added documentation for files in `python/semantic-kernel/memory` that
were missing them, worded mostly the exact as in .NET

Closes #2141 

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄

---------

Co-authored-by: Abby Harrison <[email protected]>
2023-07-27 20:03:54 +00:00
66929036c4 Python: Qdrant Memory Store (#2118)
### Motivation and Context
This PR adds Qdrant support for SK memory to the Python SK

### Description
- added `qdrant_memory_store.py`
- added `test_qdrant_memory_store.py`
- added dependency group `qdrant` to the pyproject.toml
- added dependency group `qdrant` to the `--without` list for python
unit tests
- updated poetry

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Tara W <[email protected]>
Co-authored-by: Dmytro Struk <[email protected]>
2023-07-26 20:07:48 +00:00
dependabot[bot] 05d33ec348 Python: Bump pymilvus from 2.2.13 to 2.2.14 in /python (#2161)
Bumps [pymilvus](https://github.com/milvus-io/pymilvus) from 2.2.13 to
2.2.14.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/milvus-io/pymilvus/releases">pymilvus's
releases</a>.</em></p>
<blockquote>
<h2>PyMilvus 2.2.14 Release Notes</h2>
<ol>
<li>Support rename db for collection</li>
<li>Support describe index with timestamp</li>
<li>Update bulkinsert examples</li>
<li>Fix some bugs</li>
</ol>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/c28ceb17e023463472ce6bc0f96dea48967711d9"><code>c28ceb1</code></a>
Fix rename collection raise cannot be None error (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/1615">#1615</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/0ade161c437d9ed6471b2ab64c8f8da1052916ae"><code>0ade161</code></a>
Update bulkinsert example (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/1611">#1611</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/bd639173b498064baee1c3909b250dc8db8b06c9"><code>bd63917</code></a>
Donot retry on RESOURCE_EXHAUSTED (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/1609">#1609</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/d01251a524b823ee0dd657a20154b55732844bc4"><code>d01251a</code></a>
Support rename db for collection (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/1606">#1606</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/76c632652adf3c001887fa1a01b0325b5dbba001"><code>76c6326</code></a>
Fix search ouput field BianryVector error (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/1591">#1591</a>)
(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/1605">#1605</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/06ef624d89ae4ebd8631ef26e74537f44a7545f4"><code>06ef624</code></a>
Fix bug for describe index (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/1604">#1604</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/69d30655dae079203606031eddbf13468fdf1606"><code>69d3065</code></a>
Describe index with timestamp (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/1602">#1602</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/b5acc2b6aba0410193924ec3209373a28b2e33df"><code>b5acc2b</code></a>
Increase the number of retry times and decrease the duration of sleep
(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/1600">#1600</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/2a4d0fe0543b6ac488bc2bece6440ca1d68c08fa"><code>2a4d0fe</code></a>
Fix import connections in db (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/1596">#1596</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/6e61dfd56d5d0518b57c4abc3f8e7519e5fa8975"><code>6e61dfd</code></a>
Add fast fail error code (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/1588">#1588</a>)
(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/1595">#1595</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/milvus-io/pymilvus/compare/v2.2.13...v2.2.14">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pymilvus&package-manager=pip&previous-version=2.2.13&new-version=2.2.14)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-25 08:26:34 +00:00
dependabot[bot] 48706b9430 Python: Bump ruff from 0.0.278 to 0.0.280 in /python (#2162)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.278 to 0.0.280.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>v0.0.280</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Avoid collapsing <code>elif</code> and <code>else</code> branches
during import sorting by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5964">astral-sh/ruff#5964</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/astral-sh/ruff/compare/v0.0.279...v0.0.280">https://github.com/astral-sh/ruff/compare/v0.0.279...v0.0.280</a></p>
<h2>v0.0.279</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Rules</h3>
<ul>
<li>[<code>flake8-pyi</code>] Implement flake8-pyi's PYI026 by <a
href="https://github.com/LaBatata101"><code>@​LaBatata101</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5844">astral-sh/ruff#5844</a></li>
<li>[<code>flake8-pyi</code>] Implement flake8-pyi's <code>PYI017</code>
by <a href="https://github.com/qdegraaf"><code>@​qdegraaf</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5895">astral-sh/ruff#5895</a></li>
<li>[<code>flake8-pyi</code>] Implement flake8-pyi's <code>PYI036</code>
by <a href="https://github.com/density"><code>@​density</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5668">astral-sh/ruff#5668</a></li>
<li>[<code>flake8-pyi</code>] Implement flake8-pyi's <code>PYI041</code>
by <a href="https://github.com/density"><code>@​density</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5722">astral-sh/ruff#5722</a></li>
<li>[<code>flake8-use-pathlib</code>] Implement
<code>os-path-getsize</code> and <code>os-path-get(a|m|c)-time</code>
(<code>PTH202-205</code>) by <a
href="https://github.com/sbrugman"><code>@​sbrugman</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5835">astral-sh/ruff#5835</a></li>
<li>[<code>flake8-use-pathlib</code>] Implement
<code>path-constructor-default-argument</code> (<code>PTH201</code>) by
<a href="https://github.com/sbrugman"><code>@​sbrugman</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5833">astral-sh/ruff#5833</a></li>
<li>[<code>pandas-vet</code>] Implement constant series rule
(<code>PD101</code>) by <a
href="https://github.com/sbrugman"><code>@​sbrugman</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5802">astral-sh/ruff#5802</a></li>
<li>[<code>pylint</code>] Implement Pylint's
<code>consider-using-in</code> (<code>PLR1714</code>) by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5193">astral-sh/ruff#5193</a></li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-annotations</code>] Check for <code>Any</code> in
other types for <code>ANN401</code> by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5601">astral-sh/ruff#5601</a></li>
<li>[<code>flake8-bugbear</code>] Add autofix for B004 by <a
href="https://github.com/density"><code>@​density</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5788">astral-sh/ruff#5788</a></li>
<li>[<code>flake8-bugbear</code>] Remove <code>B904</code>'s lowercase
exemption by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5751">astral-sh/ruff#5751</a></li>
<li>[<code>flake8-use-pathlib</code>] extend PTH118 with
<code>os.sep</code> by <a
href="https://github.com/sbrugman"><code>@​sbrugman</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5935">astral-sh/ruff#5935</a></li>
<li>[<code>pyupgrade</code>] Expand scope of
<code>quoted-annotation</code> rule (<code>UP037</code>) by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5766">astral-sh/ruff#5766</a></li>
<li>[<code>pyupgrade</code>] Extend PEP 604 rewrites to support some
quoted annotations by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5725">astral-sh/ruff#5725</a></li>
<li>[<code>ruff</code>] Expand <code>RUF015</code> to include all
expression types by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5767">astral-sh/ruff#5767</a></li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Consider single element subscript expr for implicit optional by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5717">astral-sh/ruff#5717</a></li>
<li>Ignore <code>Enum</code>-and-<code>str</code> subclasses for slots
enforcement by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5749">astral-sh/ruff#5749</a></li>
<li>Avoid removing raw strings in comparison fixes by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5755">astral-sh/ruff#5755</a></li>
<li>Fix nested calls to <code>sorted</code> with differing arguments by
<a href="https://github.com/density"><code>@​density</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5761">astral-sh/ruff#5761</a></li>
<li>Use unused variable detection to power
<code>incorrect-dict-iterator</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5763">astral-sh/ruff#5763</a></li>
<li>Include alias when formatting import-from structs by <a
href="https://github.com/guillaumeLepape"><code>@​guillaumeLepape</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5786">astral-sh/ruff#5786</a></li>
<li>Make <code>lint_only</code> aware of the source kind by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5876">astral-sh/ruff#5876</a></li>
<li>Restore <code>redefined-while-unused</code> violations in classes by
<a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5926">astral-sh/ruff#5926</a></li>
<li>Flatten nested tuples when fixing UP007 violations by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5724">astral-sh/ruff#5724</a></li>
<li>Ignore Jupyter Notebooks for <code>--add-noqa</code> by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5727">astral-sh/ruff#5727</a></li>
<li>Avoid checking <code>EXE001</code> and <code>EXE002</code> on WSL by
<a href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5735">astral-sh/ruff#5735</a></li>
<li>Properly group assignment targets by <a
href="https://github.com/MichaReiser"><code>@​MichaReiser</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5728">astral-sh/ruff#5728</a></li>
<li>Avoid stack overflow for non-BitOr binary types by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5743">astral-sh/ruff#5743</a></li>
<li>Move function visit out of <code>Expr::Call</code> branches by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5772">astral-sh/ruff#5772</a></li>
<li>[B006] Add bytes to immutable types by <a
href="https://github.com/harupy"><code>@​harupy</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5776">astral-sh/ruff#5776</a></li>
<li>Format <code>SetComp</code> by <a
href="https://github.com/lkh42t"><code>@​lkh42t</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5774">astral-sh/ruff#5774</a></li>
<li>Gate <code>runtime-import-in-type-checking-block</code>
(<code>TCH004</code>) behind enabled flag by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5789">astral-sh/ruff#5789</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/86b6a3e1ad1b6af1381bb6e7fb1521cd5dd9c1be"><code>86b6a3e</code></a>
Remove nested f-string flag (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5966">#5966</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/f5a2fb5b5d8b629cf93a5f3a10e70c294dc36ef4"><code>f5a2fb5</code></a>
Bump version to 0.0.280 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5965">#5965</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/94a004ee9ca56cac6f240f63f776ba361d1fa530"><code>94a004e</code></a>
Avoid collapsing <code>elif</code> and <code>else</code> branches during
import sorting (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5964">#5964</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/aaf7f362a14ab38bf53fc5273642f7d91558b3b5"><code>aaf7f36</code></a>
Create snake_case file if linter is Pylint (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5948">#5948</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/2dcd9e2e9c7e0eadd8c063d00449b6961361eead"><code>2dcd9e2</code></a>
Remove unnecessary <code>check_deferred_assignments</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5963">#5963</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/40e9884353337d312a79f0486a68997779d2f275"><code>40e9884</code></a>
Move nonlocal-without-binding out of binding step (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5962">#5962</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/9bbb0a5151f08322a744e64034960f7fe7b63bb2"><code>9bbb0a5</code></a>
Fix typo in documentation (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5961">#5961</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/f1f89f2a7e8eeb16334d8f0a30dfb9ae45425bee"><code>f1f89f2</code></a>
Bump version to 0.0.279 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5949">#5949</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/196cc9b655a925fd6bb306e3bde5d5dc38b5bedf"><code>196cc9b</code></a>
Fix RustPython rev to main branch (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5950">#5950</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/972f9a9c1552e642b4d57dc5cf9428e9893bbd09"><code>972f9a9</code></a>
Fix formatting lambda with empty arguments (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5944">#5944</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.0.278...v0.0.280">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.0.278&new-version=0.0.280)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-24 23:42:21 +00:00
dependabot[bot]andShawn Callegari 91d0a8714c Python: Bump black from 23.3.0 to 23.7.0 in /python (#2036)
Bumps [black](https://github.com/psf/black) from 23.3.0 to 23.7.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/psf/black/releases">black's
releases</a>.</em></p>
<blockquote>
<h2>23.7.0</h2>
<h3>Highlights</h3>
<ul>
<li>Runtime support for Python 3.7 has been removed. Formatting 3.7 code
will still be
supported until further notice (<a
href="https://redirect.github.com/psf/black/issues/3765">#3765</a>)</li>
</ul>
<h3>Stable style</h3>
<ul>
<li>Fix a bug where an illegal trailing comma was added to return type
annotations using
PEP 604 unions (<a
href="https://redirect.github.com/psf/black/issues/3735">#3735</a>)</li>
<li>Fix several bugs and crashes where comments in stub files were
removed or mishandled
under some circumstances (<a
href="https://redirect.github.com/psf/black/issues/3745">#3745</a>)</li>
<li>Fix a crash with multi-line magic comments like <code>type:
ignore</code> within parentheses
(<a
href="https://redirect.github.com/psf/black/issues/3740">#3740</a>)</li>
<li>Fix error in AST validation when <em>Black</em> removes trailing
whitespace in a type comment
(<a
href="https://redirect.github.com/psf/black/issues/3773">#3773</a>)</li>
</ul>
<h3>Preview style</h3>
<ul>
<li>Implicitly concatenated strings used as function args are no longer
wrapped inside
parentheses (<a
href="https://redirect.github.com/psf/black/issues/3640">#3640</a>)</li>
<li>Remove blank lines between a class definition and its docstring (<a
href="https://redirect.github.com/psf/black/issues/3692">#3692</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>The <code>--workers</code> argument to <em>Black</em> can now be
specified via the <code>BLACK_NUM_WORKERS</code>
environment variable (<a
href="https://redirect.github.com/psf/black/issues/3743">#3743</a>)</li>
<li><code>.pytest_cache</code>, <code>.ruff_cache</code> and
<code>.vscode</code> are now excluded by default (<a
href="https://redirect.github.com/psf/black/issues/3691">#3691</a>)</li>
<li>Fix <em>Black</em> not honouring <code>pyproject.toml</code>
settings when running <code>--stdin-filename</code>
and the <code>pyproject.toml</code> found isn't in the current working
directory (<a
href="https://redirect.github.com/psf/black/issues/3719">#3719</a>)</li>
<li><em>Black</em> will now error if <code>exclude</code> and
<code>extend-exclude</code> have invalid data types in
<code>pyproject.toml</code>, instead of silently doing the wrong thing
(<a
href="https://redirect.github.com/psf/black/issues/3764">#3764</a>)</li>
</ul>
<h3>Packaging</h3>
<ul>
<li>Upgrade mypyc from 0.991 to 1.3 (<a
href="https://redirect.github.com/psf/black/issues/3697">#3697</a>)</li>
<li>Remove patching of Click that mitigated errors on Python 3.6 with
<code>LANG=C</code> (<a
href="https://redirect.github.com/psf/black/issues/3768">#3768</a>)</li>
</ul>
<h3>Parser</h3>
<ul>
<li>Add support for the new PEP 695 syntax in Python 3.12 (<a
href="https://redirect.github.com/psf/black/issues/3703">#3703</a>)</li>
</ul>
<h3>Performance</h3>
<ul>
<li>Speed up <em>Black</em> significantly when the cache is full (<a
href="https://redirect.github.com/psf/black/issues/3751">#3751</a>)</li>
<li>Avoid importing <code>IPython</code> in a case where we wouldn't
need it (<a
href="https://redirect.github.com/psf/black/issues/3748">#3748</a>)</li>
</ul>
<h3>Output</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/psf/black/blob/main/CHANGES.md">black's
changelog</a>.</em></p>
<blockquote>
<h2>23.7.0</h2>
<h3>Highlights</h3>
<ul>
<li>Runtime support for Python 3.7 has been removed. Formatting 3.7 code
will still be
supported until further notice (<a
href="https://redirect.github.com/psf/black/issues/3765">#3765</a>)</li>
</ul>
<h3>Stable style</h3>
<ul>
<li>Fix a bug where an illegal trailing comma was added to return type
annotations using
PEP 604 unions (<a
href="https://redirect.github.com/psf/black/issues/3735">#3735</a>)</li>
<li>Fix several bugs and crashes where comments in stub files were
removed or mishandled
under some circumstances (<a
href="https://redirect.github.com/psf/black/issues/3745">#3745</a>)</li>
<li>Fix a crash with multi-line magic comments like <code>type:
ignore</code> within parentheses
(<a
href="https://redirect.github.com/psf/black/issues/3740">#3740</a>)</li>
<li>Fix error in AST validation when <em>Black</em> removes trailing
whitespace in a type comment
(<a
href="https://redirect.github.com/psf/black/issues/3773">#3773</a>)</li>
</ul>
<h3>Preview style</h3>
<ul>
<li>Implicitly concatenated strings used as function args are no longer
wrapped inside
parentheses (<a
href="https://redirect.github.com/psf/black/issues/3640">#3640</a>)</li>
<li>Remove blank lines between a class definition and its docstring (<a
href="https://redirect.github.com/psf/black/issues/3692">#3692</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>The <code>--workers</code> argument to <em>Black</em> can now be
specified via the <code>BLACK_NUM_WORKERS</code>
environment variable (<a
href="https://redirect.github.com/psf/black/issues/3743">#3743</a>)</li>
<li><code>.pytest_cache</code>, <code>.ruff_cache</code> and
<code>.vscode</code> are now excluded by default (<a
href="https://redirect.github.com/psf/black/issues/3691">#3691</a>)</li>
<li>Fix <em>Black</em> not honouring <code>pyproject.toml</code>
settings when running <code>--stdin-filename</code>
and the <code>pyproject.toml</code> found isn't in the current working
directory (<a
href="https://redirect.github.com/psf/black/issues/3719">#3719</a>)</li>
<li><em>Black</em> will now error if <code>exclude</code> and
<code>extend-exclude</code> have invalid data types in
<code>pyproject.toml</code>, instead of silently doing the wrong thing
(<a
href="https://redirect.github.com/psf/black/issues/3764">#3764</a>)</li>
</ul>
<h3>Packaging</h3>
<ul>
<li>Upgrade mypyc from 0.991 to 1.3 (<a
href="https://redirect.github.com/psf/black/issues/3697">#3697</a>)</li>
<li>Remove patching of Click that mitigated errors on Python 3.6 with
<code>LANG=C</code> (<a
href="https://redirect.github.com/psf/black/issues/3768">#3768</a>)</li>
</ul>
<h3>Parser</h3>
<ul>
<li>Add support for the new PEP 695 syntax in Python 3.12 (<a
href="https://redirect.github.com/psf/black/issues/3703">#3703</a>)</li>
</ul>
<h3>Performance</h3>
<ul>
<li>Speed up <em>Black</em> significantly when the cache is full (<a
href="https://redirect.github.com/psf/black/issues/3751">#3751</a>)</li>
<li>Avoid importing <code>IPython</code> in a case where we wouldn't
need it (<a
href="https://redirect.github.com/psf/black/issues/3748">#3748</a>)</li>
</ul>
<h3>Output</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/psf/black/commit/193ee766ca496871f93621d6b58d57a6564ff81b"><code>193ee76</code></a>
Prepare release 23.7.0 (<a
href="https://redirect.github.com/psf/black/issues/3776">#3776</a>)</li>
<li><a
href="https://github.com/psf/black/commit/38723bb7787d50f8751fad2eaa48b52c9e94c18d"><code>38723bb</code></a>
Unpin pytest-xdist (<a
href="https://redirect.github.com/psf/black/issues/3772">#3772</a>)</li>
<li><a
href="https://github.com/psf/black/commit/138769aa27d6bd86507a0cd98d9a5bf8f63a8e99"><code>138769a</code></a>
Disable coverage on pypy tests (<a
href="https://redirect.github.com/psf/black/issues/3777">#3777</a>)</li>
<li><a
href="https://github.com/psf/black/commit/ad3724b7ffc01d8152c97fe7f4dcf35220f21a8e"><code>ad3724b</code></a>
Upgrade to latest mypy (<a
href="https://redirect.github.com/psf/black/issues/3775">#3775</a>)</li>
<li><a
href="https://github.com/psf/black/commit/b8e2ec728cc09d0f00829a9cffcb54da3efa5760"><code>b8e2ec7</code></a>
Fix crash on type comment with trailing space (<a
href="https://redirect.github.com/psf/black/issues/3773">#3773</a>)</li>
<li><a
href="https://github.com/psf/black/commit/257d392217974a76231e306133288748c7b70786"><code>257d392</code></a>
Fix removed comments in stub files (<a
href="https://redirect.github.com/psf/black/issues/3745">#3745</a>)</li>
<li><a
href="https://github.com/psf/black/commit/2593af2c5d211b58e28f7c1472f1f67e6783216a"><code>2593af2</code></a>
Improve performance by skipping unnecessary normalisation (<a
href="https://redirect.github.com/psf/black/issues/3751">#3751</a>)</li>
<li><a
href="https://github.com/psf/black/commit/f3b50e466969f9142393ec32a4b2a383ffbe5f23"><code>f3b50e4</code></a>
Add CITATION.cff file (<a
href="https://redirect.github.com/psf/black/issues/3723">#3723</a>)</li>
<li><a
href="https://github.com/psf/black/commit/0b4d7d55f78913be9e0a3738681ef3aafd5d9a5a"><code>0b4d7d5</code></a>
Run pyupgrade on blib2to3 and src (<a
href="https://redirect.github.com/psf/black/issues/3771">#3771</a>)</li>
<li><a
href="https://github.com/psf/black/commit/114e8357e65384e17baaa3c31aa528371e15679b"><code>114e835</code></a>
Remove click patch (<a
href="https://redirect.github.com/psf/black/issues/3768">#3768</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/psf/black/compare/23.3.0...23.7.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=black&package-manager=pip&previous-version=23.3.0&new-version=23.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shawn Callegari <[email protected]>
2023-07-21 22:37:04 +00:00
dependabot[bot] de880f1989 Python: Bump pytest-asyncio from 0.21.0 to 0.21.1 in /python (#2034)
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio)
from 0.21.0 to 0.21.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-asyncio/releases">pytest-asyncio's
releases</a>.</em></p>
<blockquote>
<h2>pytest-asyncio 0.21.1</h2>
<h1>0.21.1 (2023-07-12)</h1>
<ul>
<li>Output a proper error message when an invalid
<code>asyncio_mode</code> is selected.</li>
<li>Extend warning message about unclosed event loops with additional
possible cause.
<a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/531">#531</a></li>
<li>Previously, some tests reported &quot;skipped&quot; or
&quot;xfailed&quot; as a result. Now all tests report a
&quot;success&quot; result.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/a10cbde05ff46b44f37a79b937a8dd38230f232a"><code>a10cbde</code></a>
[docs] Fixed typo.</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/82b010d6869b9c2330bcfaa551fc8fe4719f45a8"><code>82b010d</code></a>
[docs] Add release date of v0.21.1 to changelog.</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/af08b1c70dee405956437521082ae01b16b8a8df"><code>af08b1c</code></a>
[test] Removed obsolete test &quot;test_async_close_loop&quot;.</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/79b2d1aed3d31e0f95e7d97e6176ff6b82f62635"><code>79b2d1a</code></a>
[test] Added a test case which verifies compatibility with pytest.skip
in aut...</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/39a97548bfb0fe0de9527a98563037cb1ce80899"><code>39a9754</code></a>
[test] The test that asserts compatibility with pytest.mark.skip reports
succ...</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/a26b6dd571c7c037d9e91f9f1687fc0246571358"><code>a26b6dd</code></a>
[test] Added a test case which verifies compatibility with
pytest.mark.xfail ...</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/7fa36f24f406ea65b4281444efdd3ef4a4e9f353"><code>7fa36f2</code></a>
[test] The test that asserts compatibility with pytest.mark.xfail
reports suc...</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/df8811906d0e3aa6171a39beee9373e84883790e"><code>df88119</code></a>
[docs] Improved readbility of headings on the fixtures reference in the
docs.</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/75a1a6ce4bdffb749527bc8e4f756e6e5f36f1b8"><code>75a1a6c</code></a>
[feat] Extend warning message about unclosed event loops with additional
poss...</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/1821542b5126bee0c597c0f547e528791f3f6856"><code>1821542</code></a>
[docs] Explain that scopes of event_loop fixtures should not
overlap.</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest-asyncio/compare/v0.21.0...v0.21.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest-asyncio&package-manager=pip&previous-version=0.21.0&new-version=0.21.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-21 22:27:59 +00:00
Devis Lucato 53a3a8466f Update pyproject.toml 2023-07-20 17:26:59 -07:00
Devis Lucato 3708cf3fd2 Python: Azure Cognitive Search bug fixes (#2083)
* close search clients
* fix get_collections_async()
* remove code duplication
* removed unused get_collection_async() method
* add more integration tests
2023-07-20 17:24:25 -07:00
dependabot[bot] 2fd00a46ce Python: Bump ruff from 0.0.277 to 0.0.278 in /python (#2037)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.277 to 0.0.278.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>v0.0.278</h2>
<!-- raw HTML omitted -->
<p>See the <a href="https://astral.sh/blog/ruff-v0.0.278">release blog
post</a> for more, including detailed descriptions of any newly added
rules.</p>
<h2>What's Changed</h2>
<h3>Rules</h3>
<ul>
<li>[<code>pylint</code>] Implement <code>typevar-bivariance</code>
(<code>PLC0131</code>) by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5517">astral-sh/ruff#5517</a></li>
<li>[<code>flake8-pyi</code>] Implement
<code>unnecessary-literal-union</code> (<code>PYI030</code>) by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5570">astral-sh/ruff#5570</a></li>
<li>[<code>pylint</code>] Implement
<code>type-name-incorrect-variance</code> (<code>PLC0105</code>) by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5651">astral-sh/ruff#5651</a></li>
<li>[<code>ruff</code>] Implement
<code>unnecessary-list-allocation-for-first-element</code>
(<code>RUF015</code>) by <a
href="https://github.com/evanrittenhouse"><code>@​evanrittenhouse</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5549">astral-sh/ruff#5549</a></li>
<li>[<code>flake8-bugbear</code>] Implement
<code>re-sub-positional-args</code> (<code>B034</code>) by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5669">astral-sh/ruff#5669</a></li>
<li>[<code>ruff</code>] Implement <code>invalid-index-type</code>
(<code>RUF016</code>) by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5602">astral-sh/ruff#5602</a></li>
</ul>
<h3>Settings</h3>
<ul>
<li>[<code>isort</code>] Add <code>--case-sensitive</code> flag by <a
href="https://github.com/qdegraaf"><code>@​qdegraaf</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5539">astral-sh/ruff#5539</a></li>
<li>[<code>isort</code>] Support globbing in <code>isort</code> options
by <a href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5473">astral-sh/ruff#5473</a></li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Support autofix for some multiline <code>str.format</code> calls by
<a href="https://github.com/harupy"><code>@​harupy</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5638">astral-sh/ruff#5638</a></li>
<li>Avoid triggering <code>unnecessary-map</code> (<code>C417</code>)
for late-bound lambdas by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5520">astral-sh/ruff#5520</a></li>
<li>Avoid triggering DTZ001-006 when using <code>.astimezone()</code> by
<a href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5524">astral-sh/ruff#5524</a></li>
<li>Enable attribute lookups via semantic model by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5536">astral-sh/ruff#5536</a></li>
<li>Avoid syntax errors when rewriting str(dict) in f-strings by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5538">astral-sh/ruff#5538</a></li>
<li>Differentiate between runtime and typing-time annotations by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5575">astral-sh/ruff#5575</a></li>
<li>Only run pyproject.toml lint rules when enabled by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5578">astral-sh/ruff#5578</a></li>
<li>Refactor isort directive skips to use iterators by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5623">astral-sh/ruff#5623</a></li>
<li>Allow descriptor instantiations in dataclass fields by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5537">astral-sh/ruff#5537</a></li>
<li>Refactor <code>noqa</code> directive parsing away from regex-based
implementation by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5554">astral-sh/ruff#5554</a></li>
<li>Emit warnings for invalid <code># noqa</code> directives by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5571">astral-sh/ruff#5571</a></li>
<li>Support individual codes on <code># flake8: noqa</code> directives
by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5618">astral-sh/ruff#5618</a></li>
<li>Add <code>tkinter</code> import convention by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5626">astral-sh/ruff#5626</a></li>
<li>Avoid <code>PERF401</code> if conditional depends on list var by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5603">astral-sh/ruff#5603</a></li>
<li>Fix typo in complex-if-statement-in-stub message by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5635">astral-sh/ruff#5635</a></li>
<li>Make TRY301 trigger only if a <code>raise</code> throws a caught
exception by <a
href="https://github.com/evanrittenhouse"><code>@​evanrittenhouse</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5455">astral-sh/ruff#5455</a></li>
<li>Skip flake8-future-annotations checks in stub files by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5652">astral-sh/ruff#5652</a></li>
<li>Always allow PEP 585 and PEP 604 rewrites in stub files by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5653">astral-sh/ruff#5653</a></li>
<li>Add support for <code>Union</code> declarations without
<code>|</code> to PYI016 by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5598">astral-sh/ruff#5598</a></li>
<li>Ignore <code>_name_</code> and <code>_value_</code> accesses in
<code>flake8-self</code> rules by <a
href="https://github.com/monosans"><code>@​monosans</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5663">astral-sh/ruff#5663</a></li>
<li>Refactor <code>repeated_keys()</code> to use
<code>ComparableExpr</code> by <a
href="https://github.com/qdegraaf"><code>@​qdegraaf</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5696">astral-sh/ruff#5696</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/karosis88"><code>@​karosis88</code></a>
made their first contribution in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5560">astral-sh/ruff#5560</a></li>
<li><a
href="https://github.com/petermattia"><code>@​petermattia</code></a>
made their first contribution in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5579">astral-sh/ruff#5579</a></li>
<li><a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
made their first contribution in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5607">astral-sh/ruff#5607</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/astral-sh/ruff/compare/v0.0.277...v0.0.278">https://github.com/astral-sh/ruff/compare/v0.0.277...v0.0.278</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h1>Breaking Changes</h1>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/0ead9a16ac306bd17ab5951c0e4240c1ed71a208"><code>0ead9a1</code></a>
Bump version to 0.0.278 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5714">#5714</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/653429bef9d212f0d4dc22ca8f7d9eae1d432f81"><code>653429b</code></a>
Handle right parens in join comma builder (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5711">#5711</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/f0aa6bd4d36d3b8793bea405541e91d525c0e9fb"><code>f0aa6bd</code></a>
Document ruff_dev and format_dev (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5648">#5648</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/5665968b4249784734fda04fdd2a8e9272b8cee9"><code>5665968</code></a>
Bump static Python versions in CI from 3.7 to 3.11 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5700">#5700</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/33a91773f7a8c60c2f1cdb84127feabad8c6d84f"><code>33a9177</code></a>
Use permalinks in ecosystem diff references (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5704">#5704</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/0666added9902990b6ea22d1a48f6fa1ae5ea605"><code>0666add</code></a>
Add RUF016: Detection of invalid index types (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5602">#5602</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/7566ca8ff7caa28ea44f1053fd1f2963fafcefcb"><code>7566ca8</code></a>
Refactor <code>repeated_keys()</code> to use <code>ComparableExpr</code>
(<a
href="https://redirect.github.com/astral-sh/ruff/issues/5696">#5696</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/5dd9e567481fb4d83214be4998833f8b11945727"><code>5dd9e56</code></a>
Misc. tweaks to bandit documentation (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5701">#5701</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/f8173daf4ce5bdf8811daf57911f371a0f992af9"><code>f8173da</code></a>
Add documentation to the <code>S3XX</code> rules (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5592">#5592</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/511ec0d7bca34a08c286abf34a7de14e6f3c56eb"><code>511ec0d</code></a>
Refactor shebang parsing to remove regex dependency (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5690">#5690</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.0.277...v0.0.278">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.0.277&new-version=0.0.278)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-20 04:49:33 +00:00
Abby Harrison 8492d50967 Python: skip milvus tests if the platform is windows (#2082)
### Motivation and Context
The milvus integration tests are failing on windows systems only - get
calls seem to be timing out. The integration tests rely on milvus-lite,
a local, lightweight milvus application for python. Milvus is not
officially supported for windows, so this PR disables the tests for any
windows platform.

See milvus requirements documentation at:
https://github.com/milvus-io/milvus-lite/blob/main/README.md#requirements

### Description

- mark the milvus tests as _skip_ if the local platform is windows. 

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2023-07-19 23:20:19 +00:00
69bc6b1b38 Python: api update for 0.4.0 (#2010)
** This should land Monday the 17th ** 

Chroma is upgrading from `0.3.29` to `0.4.0`. `0.4.0` is easier to
build, more durable, faster, smaller, and more extensible. This comes
with a few changes:

1. A simplified and improved client setup. Instead of having to remember
weird settings, users can just do `EphemeralClient`, `PersistentClient`
or `HttpClient` (the underlying direct `Client` implementation is also
still accessible)

2. We migrated data stores away from `duckdb` and `clickhouse`. This
changes the api for the `PersistentClient` that used to reference
`chroma_db_impl="duckdb+parquet"`. Now we simply set
`is_persistent=true`. `is_persistent` is set for you to `true` if you
use `PersistentClient`.

3. Because we migrated away from `duckdb` and `clickhouse` - this also
means that users need to migrate their data into the new layout and
schema. Chroma is committed to providing extension notification and
tooling around any schema and data migrations (for example - this PR!).

After upgrading to `0.4.0` - if users try to access their data that was
stored in the previous regime, the system will throw an `Exception` and
instruct them how to use the migration assistant to migrate their data.
The migration assitant is a pip installable CLI: `pip install
chroma_migrate`. And is runnable by calling `chroma_migrate`

Please reference the readme at
[chroma-core/chroma-migrate](https://github.com/chroma-core/chroma-migrate)
to see a full write-up of our philosophy on migrations as well as more
details about this particular migration.

Please direct any users facing issues upgrading to our Discord channel
called
[#get-help](https://discord.com/channels/1073293645303795742/1129200523111841883).
We have also created a [email
listserv](https://airtable.com/shrHaErIs1j9F97BE) to notify developers
directly in the future about breaking changes.

TODO
- [x] Migrated any `duckdb+parquet` strings to the new format
- [ ] Notified users about the breaking change (this PR, other
suggestions?)
- [ ] Move pypi target away from feature-branch and to `0.4.0` after
`0.4.0` is released.

---------

Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
2023-07-19 23:08:28 +00:00
Devis Lucato 8b4d916561 Rename Azure Search to Azure Cognitive Search (#2075)
### Motivation and Context

The service was renamed to Azure Cognitive Search in 2019, so we should
follow the new convention. The only thing still named "Azure Search" is
the old Azure SDK, out of scope.

### Description

* Revert nuget package name to the previous name (we'll delete the new
package, which has been out only for few days)
* Rename C# and Python classes and namespaces
2023-07-19 21:11:13 +00:00
e50ac0bd55 Python: Milvus memory connector (#1941)
This change brings in Milvus to the semantic kernel connectors.

---------

Signed-off-by: Filip Haltmayer <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
2023-07-18 22:00:40 +00:00
Devis LucatoandAbby Harrison 95d672acd8 Python: Azure Search installation and tests improvements (#2030)
* Move Azure Search dependencies to own group
* Improve Azure Search integration tests: try to delete collections when
tests fail
* Wait 1 sec after upsert to reduce random failures

---------

Co-authored-by: Abby Harrison <[email protected]>
2023-07-17 22:59:25 +00:00
ff2ba072a4 Python: temporal kernel run stream async (#1691)
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Temporal solution for #1606 

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->


### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [ ] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Shawn Callegari <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
2023-07-17 18:05:39 +00:00
eab7a8f63a Python: implemented web search engine skill with bing connector (#1813)
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
In this PR, I have tried my hand at an implementation of web search
engine skill in python semantic kernel using the Bing Web Search API.

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
In the semantic kernel directory, I have added a new directory called
web_skills (To replicate Skills.Web from C#) and added the web search
skill here. For now, I have implemented web search using the bing web
search API. If this approach is fine, then I can implement the same with
the google search API too. I have tried to stick with similar naming
conventions as used in the C# implementation with matching context
parameters and arguments.

I can also add some unit tests for the connectors and the search skill,
and add something like exponential backoff to avoid rate limit errors
while querying the search APIs.

Here is some sample code that checks the working of the search skill.

```python
import os
import semantic_kernel as sk
from semantic_kernel.web_skills.web_search_engine_skill import WebSearchEngineSkill
from semantic_kernel.web_skills.connectors import BingConnector
from semantic_kernel.connectors.ai.open_ai import OpenAITextCompletion

async def main():
    kernel = sk.Kernel()
    api_key, org_id = sk.openai_settings_from_dot_env()
    kernel.add_text_completion_service(
        "dv", OpenAITextCompletion("text-davinci-003", api_key, org_id)
    )
    connector = BingConnector(api_key=os.getenv("BING_API_KEY"))
    web_skill = kernel.import_skill(WebSearchEngineSkill(connector), "WebSearch")

    prompt = "Who is Leonardo DiCaprio's current girlfriend?"
    search_async = web_skill["searchAsync"]
    result = await search_async.invoke_async(prompt)
    print(result)

    """
    Output:
    ["Celebrity Celebrity News Everything You Need to Know About Leonardo DiCaprio and Camila Morrone's Relationship From the beginning of their romance to today, we track their relationship here. By..."]
    """

    prompt = """
    Answer the question using only the data that is provided in the data section. Do not use any prior knowledge to answer the question.
    Data: {{WebSearch.SearchAsync "What is semantic kernel?"}}
    Question: What is semantic kernel?
    Answer:
    """

    qna = kernel.create_semantic_function(prompt, temperature=0.2)
    context = kernel.create_new_context()
    context["count"] = "10"
    context["offset"] = "0"
    result = await qna.invoke_async(context=context)
    print(result)

    """
    Output:
    Semantic Kernel is an open-source SDK that lets you easily combine AI services like OpenAI, Azure OpenAI, and Hugging Face with conventional programming languages like C# and Python. By doing so, you can create AI apps that combine the best of both worlds. Semantic Kernel is at the center of the copilot stack.
    """

if __name__ == "__main__":
    import asyncio
    asyncio.run(main())
```

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [x] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [ ] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
2023-07-17 17:54:19 +00:00
Devis LucatoandAbby Harrison db53c12b64 Update python-integration-tests.yml (#2024)
New env vars for python int tests for Azure Search

---------

Co-authored-by: Abby Harrison <[email protected]>
2023-07-17 16:48:30 +00:00
Alex ChaoandAlex Chao d454735d5b Python: Update Python README and FEATURE_MATRIX (#2004)
Update the README for Python to include latest notebooks and add a link
to Learn Documentation site for the feature matrix

---------

Co-authored-by: Alex Chao <achao@achao>
2023-07-17 16:42:03 +00:00
Devis Lucato fc86af0fd9 Update pyproject.toml 2023-07-16 20:11:34 -07:00
Devis Lucato 5024744217 Python, DotNet: New Semantic Memory Storage based on Azure Cognitive Search (#1439)
* .NET, Python: Add new Memory Storage based on Azure Cognitive Search
with custom embeddings
* .NET: Delete previous Azure Search semantic memory component based on old
Azure Semantic Search w/ Lucene
2023-07-16 00:20:09 -07:00
Abby HarrisonandShawn Callegari 5e4e0edfaa Python: Plan Object Model (#1907)
### Motivation and Context
This PR ports the plan object model found in the .NET SK to Python. This
fundamentally changes the concept of a planner from a `semantic skill`
to a unique type of `SKFunction`. With this model, we can begin
implementing sequential planner and offer much better plan
customization.

**Notes:**
- This PR does not implement plan serialization/deserialization to/from
JSON. There is a huge existing effort to make the Python SK completely
Pydantic enabled, which will bring serialization and deserialization
capability with it.
- This PR does not include ports of `Action Planner` and `Sequential
Planner` to the Plan Object Model (POM). Following PRs will address
this.
- I also added some missing copywrite headers. A future PR will add
headers to any still missing them.
- added a VSCode launch configuration to run the current file with
pytest
- closes #1486 


### Description
- Added file called `plan.py` which is a python port of the Plan.cs file
found in the .NET SK. Note that it does not contain serialization logic
at this time.
- Added new kernel error `FunctionInvokeError` - mirrors the error list
of the .NET SK
- Added tests for Plan creation
- Added tests for Plan execution - both sync and async


### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [ ] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Shawn Callegari <[email protected]>
2023-07-15 01:34:19 +00:00