Commit Graph
119 Commits
Author SHA1 Message Date
Abby HarrisonandDevis Lucato db040e2e45 Python: Enable pinecone tests to run in CI (#1864)
### Motivation and Context
The pinecone integration tests can run locally, but not in CI. CI has no
way of picking up the pinecone environment.

Pinecone tests rely on the following environment variables in CI:

- Pinecone__ApiKey
- Pinecone__Environment

`get_pinecone_config` in `test_pinecone.py` currently only accounts for
Pinecone__ApiKey


### Description
This PR changes the method `get_pinecone_config` in `test_pinecone.py`
to return the pinecone environment from an environment variable if the
tests are being run in CI.


### 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: Devis Lucato <[email protected]>
2023-07-05 23:13:46 +00:00
dependabot[bot] 1008504154 Python: Bump ruff from 0.0.276 to 0.0.277 in /python (#1859)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.276 to 0.0.277.
<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.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>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/324455f580813a7c7721dc1d7ef1ee7721ae3e76"><code>324455f</code></a>
Bump version to 0.0.277 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5515">#5515</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/da1c320bfa0fdae38c0c51c8fe91781fcdcd8728"><code>da1c320</code></a>
Add .ipynb_checkpoints, .pyenv, .pytest_cache, and .vscode to default
exclude...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/485d997d359b3fdbaef992e634557fd953a24f75"><code>485d997</code></a>
Tweak prefix match to use .all_rules() (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5512">#5512</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/d7214e77e69c731e74f4e7cfe8d063aab9f8ebf8"><code>d7214e7</code></a>
Add <code>ruff rule --all</code> subcommand (with JSON output) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5059">#5059</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/952c62310238d8bd7bb9cb42099d7ea785c0baef"><code>952c623</code></a>
Avoid returning first-match for rule prefixes (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5511">#5511</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/0a2620164350d8bd88d0ec1d1558c52fd8df4889"><code>0a26201</code></a>
Merge clippy and clippy (wasm) jobs on CI (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5447">#5447</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/0e67757edbbf28c3a49dcc92c5844c1f432d1b51"><code>0e67757</code></a>
[<code>pylint</code>] Implement Pylint
<code>typevar-name-mismatch</code> (<code>C0132</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5501">#5501</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/c395e44bd761b34cab03e4d811af332ee0a2d49a"><code>c395e44</code></a>
Avoid PERF rules for iteration-dependent assignments (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5508">#5508</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/75da72bd7fe786523f94064a2639096b61cb370f"><code>75da72b</code></a>
Update documentation to list double-quote preference first (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5507">#5507</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/521e6de2c8833f0229f3d51ee71fd70abd5805b8"><code>521e6de</code></a>
Fix eval detection for suspicious-eval-usage (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5506">#5506</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.0.276...v0.0.277">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.276&new-version=0.0.277)](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-05 21:57:23 +00:00
dependabot[bot]andShawn Callegari f70b4443cf Python: Bump ipykernel from 6.23.3 to 6.24.0 in /python (#1827)
Bumps [ipykernel](https://github.com/ipython/ipykernel) from 6.23.3 to
6.24.0.
<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.24.0</h2>
<h2>6.24.0</h2>
<p>(<a
href="https://github.com/ipython/ipykernel/compare/v6.23.3...0c1db099a32c4cb28bfb4b3508bb808d8b4092e7">Full
Changelog</a>)</p>
<h3>New features added</h3>
<ul>
<li>Let get_parent decide the channel to get parent header <a
href="https://redirect.github.com/ipython/ipykernel/pull/1128">#1128</a>
(<a
href="https://github.com/dby-tmwctw"><code>@​dby-tmwctw</code></a>)</li>
</ul>
<h3>Bugs fixed</h3>
<ul>
<li>Bugfix: binary stdout/stderr handling <a
href="https://redirect.github.com/ipython/ipykernel/pull/1129">#1129</a>
(<a href="https://github.com/arieleiz"><code>@​arieleiz</code></a>)</li>
</ul>
<h3>Contributors to this release</h3>
<p>(<a
href="https://github.com/ipython/ipykernel/graphs/contributors?from=2023-06-23&amp;to=2023-07-03&amp;type=c">GitHub
contributors page for this release</a>)</p>
<p><a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Aarieleiz+updated%3A2023-06-23..2023-07-03&amp;type=Issues"><code>@​arieleiz</code></a>
| <a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Adby-tmwctw+updated%3A2023-06-23..2023-07-03&amp;type=Issues"><code>@​dby-tmwctw</code></a>
| <a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Aminrk+updated%3A2023-06-23..2023-07-03&amp;type=Issues"><code>@​minrk</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.24.0</h2>
<p>(<a
href="https://github.com/ipython/ipykernel/compare/v6.23.3...0c1db099a32c4cb28bfb4b3508bb808d8b4092e7">Full
Changelog</a>)</p>
<h3>New features added</h3>
<ul>
<li>Let get_parent decide the channel to get parent header <a
href="https://redirect.github.com/ipython/ipykernel/pull/1128">#1128</a>
(<a
href="https://github.com/dby-tmwctw"><code>@​dby-tmwctw</code></a>)</li>
</ul>
<h3>Bugs fixed</h3>
<ul>
<li>Bugfix: binary stdout/stderr handling <a
href="https://redirect.github.com/ipython/ipykernel/pull/1129">#1129</a>
(<a href="https://github.com/arieleiz"><code>@​arieleiz</code></a>)</li>
</ul>
<h3>Contributors to this release</h3>
<p>(<a
href="https://github.com/ipython/ipykernel/graphs/contributors?from=2023-06-23&amp;to=2023-07-03&amp;type=c">GitHub
contributors page for this release</a>)</p>
<p><a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Aarieleiz+updated%3A2023-06-23..2023-07-03&amp;type=Issues"><code>@​arieleiz</code></a>
| <a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Adby-tmwctw+updated%3A2023-06-23..2023-07-03&amp;type=Issues"><code>@​dby-tmwctw</code></a>
| <a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Aminrk+updated%3A2023-06-23..2023-07-03&amp;type=Issues"><code>@​minrk</code></a></p>
<!-- raw HTML omitted -->
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ipython/ipykernel/commit/1270d5a6e17845e6b22361e43325dd2de59d6392"><code>1270d5a</code></a>
Publish 6.24.0</li>
<li><a
href="https://github.com/ipython/ipykernel/commit/0c1db099a32c4cb28bfb4b3508bb808d8b4092e7"><code>0c1db09</code></a>
Bugfix: binary stdout/stderr handling (<a
href="https://redirect.github.com/ipython/ipykernel/issues/1129">#1129</a>)</li>
<li><a
href="https://github.com/ipython/ipykernel/commit/a18f0074dfe3ee2044fbe94be96450a14ce46803"><code>a18f007</code></a>
Let get_parent decide the channel to get parent header (<a
href="https://redirect.github.com/ipython/ipykernel/issues/1128">#1128</a>)</li>
<li>See full diff in <a
href="https://github.com/ipython/ipykernel/compare/v6.23.3...v6.24.0">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.23.3&new-version=6.24.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-04 05:34:05 +00:00
dependabot[bot] 5eea92e742 Python: Bump ruff from 0.0.275 to 0.0.276 in /python (#1829)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.275 to 0.0.276.
<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.276</h2>
<!-- raw HTML omitted -->
<p>See the <a href="https://astral.sh/blog/ruff-v0.0.276">release blog
post</a> for more, including detailed descriptions of any newly added
rules.</p>
<h2>What's Changed</h2>
<p>Highlights include: experimental support for linting Jupyter
Notebooks.</p>
<p>To opt-in to linting Jupyter Notebook files, add the
<code>*.ipynb</code> pattern to your <a
href="https://github.com/astral-sh/ruff/blob/HEAD/settings.md#include"><code>include</code></a>
setting, like so:</p>
<pre lang="toml"><code>[tool.ruff]
# Allow Ruff to discover `*.ipynb` files.
include = [&quot;*.py&quot;, &quot;*.pyi&quot;,
&quot;**/pyproject.toml&quot;, &quot;*.ipynb&quot;]
</code></pre>
<p>This will prompt Ruff to discover Jupyter Notebook files in any
specified directories, and lint them
accordingly.</p>
<p>Jupyter Notebook support is currently opt-in and experimental. We'd
love your help testing it out.
Have feedback? Run into issues? <a
href="https://github.com/astral-sh/ruff/issues/new">Let us know!</a></p>
<h3>New Rules</h3>
<ul>
<li>[<code>flake8-pyi</code>] Implement <code>PYI002</code>,
<code>PYI003</code>, <code>PYI004</code>, <code>PYI005</code> by <a
href="https://github.com/density"><code>@​density</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5457">astral-sh/ruff#5457</a></li>
<li>[<code>numpy</code>] Implement
<code>numpy-deprecated-function</code> (<code>NPY003</code>) by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5468">astral-sh/ruff#5468</a></li>
<li>[<code>perflint</code>] Implement <code>unnecessary-list-cast</code>
(<code>PERF101</code>) by <a
href="https://github.com/qdegraaf"><code>@​qdegraaf</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5121">astral-sh/ruff#5121</a></li>
<li>[<code>perflint</code>] Implement <code>try-except-in-loop</code>
(<code>PERF203</code>) by <a
href="https://github.com/evanrittenhouse"><code>@​evanrittenhouse</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5166">astral-sh/ruff#5166</a></li>
<li>[<code>perflint</code>] Implement
<code>manual-list-comprehension</code> (<code>PERF401</code>) and
<code>manual-list-copy</code> (<code>PERF402</code>) rules by <a
href="https://github.com/qdegraaf"><code>@​qdegraaf</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5298">astral-sh/ruff#5298</a></li>
<li>[<code>pylint</code>] Implement Pylint
<code>single-string-used-for-slots</code> (<code>C0205</code>) as
<code>single-string-slots</code> (<code>PLC0205</code>) by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5399">astral-sh/ruff#5399</a></li>
</ul>
<h3>Jupyter</h3>
<ul>
<li>Experimental release for Jupyter notebook integration by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5363">astral-sh/ruff#5363</a></li>
<li>Enable --watch for Jupyter notebooks by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5394">astral-sh/ruff#5394</a></li>
<li>Consider Jupyter index for code frames (<code>--show-source</code>)
by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5402">astral-sh/ruff#5402</a></li>
<li>fixup! Consider Jupyter index for code frames
(<code>--show-source</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5402">#5402</a>)
by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5414">astral-sh/ruff#5414</a></li>
</ul>
<h3>Settings</h3>
<ul>
<li>[<code>pyupgrade</code>] Restore the
<code>keep-runtime-typing</code> setting by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5470">astral-sh/ruff#5470</a></li>
<li>Add <code>PythonVersion::Py312</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5316">astral-sh/ruff#5316</a></li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Support <code>pydantic.BaseSettings</code> in
<code>mutable-class-default</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5312">astral-sh/ruff#5312</a></li>
<li>Allow <code>__slots__</code> assignments in
<code>mutable-class-default</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5314">astral-sh/ruff#5314</a></li>
<li>Avoid syntax errors when removing f-string prefixes by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5319">astral-sh/ruff#5319</a></li>
<li>Ignore unpacking in <code>iteration-over-set</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5392">astral-sh/ruff#5392</a></li>
<li>Replace same length equal line with dash line in D407 by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5383">astral-sh/ruff#5383</a></li>
<li>Exclude docstrings from PYI053 by <a
href="https://github.com/intgr"><code>@​intgr</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5405">astral-sh/ruff#5405</a></li>
</ul>
<!-- 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.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
the <code>UP006</code> and <code>UP007</code> rules via Ruff's standard
<code>ignore</code> mechanism.</p>
<p>Taking <code>UP006</code> (rewrite <code>List[int]</code> to
<code>list[int]</code>) as an example, the setting now behaves as
follows:</p>
<ul>
<li>On Python 3.7 and Python 3.8, setting <code>keep-runtime-typing =
true</code> will cause Ruff to ignore
<code>UP006</code> violations, even if <code>from __future__ import
annotations</code> is present in the file.
While such annotations are valid in Python 3.7 and Python 3.8 when
combined with
<code>from __future__ import annotations</code>, they aren't supported
by libraries like Pydantic and
FastAPI, which rely on runtime type checking.</li>
<li>On Python 3.9 and above, the setting has no effect, as
<code>list[int]</code> is a valid type annotation,
and libraries like Pydantic and FastAPI support it without issue.</li>
</ul>
<p>In short: <code>keep-runtime-typing</code> can be used to ensure that
Ruff doesn't introduce type annotations
that are not supported at runtime by the current Python version, which
are unsupported by libraries
like Pydantic and FastAPI.</p>
<p>Note that this is not a breaking change, but is included here to
complement the previous removal
of <code>keep-runtime-typing</code>.</p>
<h2>0.0.268</h2>
<h3>The <code>keep-runtime-typing</code> setting has been removed (<a
href="https://redirect.github.com/astral-sh/ruff/pull/4427">#4427</a>)</h3>
<p>Enabling the <code>keep-runtime-typing</code> option, located under
the <code>pyupgrade</code> section, is equivalent
to ignoring the <code>UP006</code> and <code>UP007</code> rules via
Ruff's standard <code>ignore</code> mechanism. As there's no
need for a dedicated setting to disable these rules, the
<code>keep-runtime-typing</code> option has been
removed.</p>
<h2>0.0.267</h2>
<h3><code>update-check</code> is no longer a valid configuration option
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/4313">#4313</a>)</h3>
<p>The <code>update-check</code> functionality was deprecated in <a
href="https://redirect.github.com/astral-sh/ruff/pull/2530">#2530</a>,
in that the behavior itself was removed, and Ruff was changed to warn
when that option was enabled.</p>
<p>Now, Ruff will throw an error when <code>update-check</code> is
provided via a configuration file (e.g.,
<code>update-check = false</code>) or through the command-line, since it
has no effect. Users should remove
this option from their configuration.</p>
<h2>0.0.265</h2>
<h3><code>--fix-only</code> now exits with a zero exit code, unless
<code>--exit-non-zero-on-fix</code> is specified (<a
href="https://redirect.github.com/astral-sh/ruff/pull/4146">#4146</a>)</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/3992c47c008df8f706e03a6ba0d7aa7f068ef0a9"><code>3992c47</code></a>
Bump version to 0.0.276 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5488">#5488</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/8de5a3d29df5964dd91f39d0150caccc7bf0ab83"><code>8de5a3d</code></a>
Allow <code>Final</code> assignments in stubs (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5490">#5490</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/ed1dd09d02af7972df301dac0c6b5d084f26cc1b"><code>ed1dd09</code></a>
Refine some <code>perflint</code> rules (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5484">#5484</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/ca497fabbd970a557ed1b45acccaa714e12573af"><code>ca497fa</code></a>
Remove some <code>diagnostics.extend</code> calls (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5483">#5483</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/00fbbe4223d0cbfc3014403ace659f48368e1852"><code>00fbbe4</code></a>
Remove some additional manual iterator matches (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5482">#5482</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/dadad0e9ed861b50c87f2bf5c4520b949ac177ab"><code>dadad0e</code></a>
Remove some allocations in argument detection (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5481">#5481</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/d2450c25abc428cb5276933b2ae21017fcd98f3d"><code>d2450c2</code></a>
Audit <code>remove_argument</code> usages to use end-of-function (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5480">#5480</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/1e4b88969cbfa866c0ac6aace562699c1fd6b371"><code>1e4b889</code></a>
Fix <code>unnecessary-encode-utf8</code> to fix <code>encode</code> on
parenthesized strings correc...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/dc072537e513912eced43c24e6fc8d61d77aca4d"><code>dc07253</code></a>
Fix python_formatter generate.py with rust path (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5475">#5475</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/7ac9e0252e3c278078e19a7053671fdc845986af"><code>7ac9e02</code></a>
Document Checking formatter stability and panics (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5415">#5415</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.0.275...v0.0.276">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.275&new-version=0.0.276)](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-03 22:42:09 +00:00
cschadewitz c6f783df4f Python: Fix for SemanticTextMemory Embedding issue (#1816)
### 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? To fix the SemanticTextMemory
functionality
  2. What problem does it solve? #1815 
3. What scenario does it contribute to? All scenarios that intend on
using RAG
  4. If it fixes an open issue, please link to the issue here. #1815 
-->
1. Why is this change required? To fix the SemanticTextMemory
functionality
  2. What problem does it solve? #1815 
3. What scenario does it contribute to? All scenarios that intend on
using RAG
  4. If it fixes an open issue, please link to the issue here. #1815 


### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Simple decomposition of the list of embeddings returned via
`generate_embeddings_async`


### 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)
- [ ] 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 😄
2023-07-03 17:28:49 +00:00
Adrián PanellaandShawn Callegari 5cae285401 Python: add iso_date time skill (#1501)
Date might be affected by locale language.
For some use cases is better to have a fixed and structured format

Co-authored-by: Shawn Callegari <[email protected]>
2023-06-29 20:40:56 +00:00
Henri SchulteandAman Sachan 20dee6dbf0 Python: Correct syntax in core skill examples (#1731)
Fix for #1730 
Some core skills include example code showing how to import the skill.
Some of these examples, used an invalid syntax where arguments were in
the reversed order, e.g. kernel.import_skill("wait", WaitSkill());
instead of the valid kernel.import_skill(WaitSkill(), "wait").

---------

Co-authored-by: Aman Sachan <[email protected]>
2023-06-29 20:21:37 +00:00
3f092e1487 Creating Pinecone memory store for Python (#769)
### Motivation and Context
Adding a Pinecone Memory store using the Pinecone vector database client
for SK python

  Add Pinecone vector db memory to SK Python

  Memory storage for SK and vectors

### Description
- Using the existing pinecone python module/client
- Reviewing with console exceptions responses that come back from
pinecone, will update if any were omitted
- Currently investigating and would like feedback if I should respond to
throttling errors in a different manner
- Currently testing each API response, slight delay may occur due to
throttling of my starter account in Pinecone.

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] 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)
- [ ] 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: Lee Miller <[email protected]>
Co-authored-by: Casey Schadewitz <[email protected]>
Co-authored-by: cschadewitz <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
Co-authored-by: Dmytro Struk <[email protected]>
Co-authored-by: Shawn Callegari <[email protected]>
2023-06-29 20:09:58 +00:00
Mark KarleandMark Karle de9c202a72 Reverting torch to 2.0.0 (#1761)
### 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.
-->
[Integration tests were
failing](https://github.com/microsoft/semantic-kernel/actions/runs/5400873036)
due to a problem importing torch. This might be a mismatch in torch and
cuda dependencies. Reverting torch to 2.0.0 led to successful
integration tests here:
https://github.com/mkarle/semantic-kernel/actions/runs/5405696396

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
- Locally, I reverted torch to 2.0.0 and integration tests succeeded
- Then, I upgraded torch back to 2.0.1 and integration tests still
succeeded
- In my GitHub Actions, reverting to 2.0.0 succeeded:
https://github.com/mkarle/semantic-kernel/actions/runs/5405599455
- Upgrading back to 2.0.1 failed again, however:
https://github.com/mkarle/semantic-kernel/actions/runs/5405659136
- So now I've reverted back to 2.0.0 and they succeed:
https://github.com/mkarle/semantic-kernel/actions/runs/5405696396

### 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: Mark Karle <>
2023-06-29 01:16:19 +00:00
dependabot[bot] adef41c18d Bump pytest from 7.3.2 to 7.4.0 in /python (#1700)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.3.2 to
7.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest/releases">pytest's
releases</a>.</em></p>
<blockquote>
<h2>7.4.0</h2>
<h1>pytest 7.4.0 (2023-06-23)</h1>
<h2>Features</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/10901">#10901</a>:
Added <code>ExceptionInfo.from_exception()
&lt;pytest.ExceptionInfo.from_exception&gt;</code>{.interpreted-text
role=&quot;func&quot;}, a simpler way to create an
<code>~pytest.ExceptionInfo</code>{.interpreted-text
role=&quot;class&quot;} from an exception.
This can replace <code>ExceptionInfo.from_exc_info()
&lt;pytest.ExceptionInfo.from_exc_info()&gt;</code>{.interpreted-text
role=&quot;func&quot;} for most uses.</li>
</ul>
<h2>Improvements</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/10872">#10872</a>:
Update test log report annotation to named tuple and fixed inconsistency
in docs for <code>pytest_report_teststatus</code>{.interpreted-text
role=&quot;hook&quot;} hook.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/10907">#10907</a>:
When an exception traceback to be displayed is completely filtered out
(by mechanisms such as <code>__tracebackhide__</code>, internal frames,
and similar), now only the exception string and the following message
are shown:</p>
<p>&quot;All traceback entries are hidden. Pass
[--full-trace]{.title-ref} to see hidden and internal frames.&quot;.</p>
<p>Previously, the last frame of the traceback was shown, even though it
was hidden.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/10940">#10940</a>:
Improved verbose output (<code>-vv</code>) of <code>skip</code> and
<code>xfail</code> reasons by performing text wrapping while leaving a
clear margin for progress output.</p>
<p>Added <code>TerminalReporter.wrap_write()</code> as a helper for
that.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/10991">#10991</a>:
Added handling of <code>%f</code> directive to print microseconds in log
format options, such as <code>log-date-format</code>.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11005">#11005</a>:
Added the underlying exception to the cache provider's path creation and
write warning messages.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11013">#11013</a>:
Added warning when <code>testpaths</code>{.interpreted-text
role=&quot;confval&quot;} is set, but paths are not found by glob. In
this case, pytest will fall back to searching from the current
directory.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11043">#11043</a>:
When [--confcutdir]{.title-ref} is not specified, and there is no config
file present, the conftest cutoff directory ([--confcutdir]{.title-ref})
is now set to the <code>rootdir &lt;rootdir&gt;</code>{.interpreted-text
role=&quot;ref&quot;}.
Previously in such cases, [conftest.py]{.title-ref} files would be
probed all the way to the root directory of the filesystem.
If you are badly affected by this change, consider adding an empty
config file to your desired cutoff directory, or explicitly set
[--confcutdir]{.title-ref}.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11081">#11081</a>:
The <code>norecursedirs</code>{.interpreted-text
role=&quot;confval&quot;} check is now performed in a
<code>pytest_ignore_collect</code>{.interpreted-text
role=&quot;hook&quot;} implementation, so plugins can affect it.</p>
<p>If after updating to this version you see that your
[norecursedirs]{.title-ref} setting is not being respected,
it means that a conftest or a plugin you use has a bad
[pytest_ignore_collect]{.title-ref} implementation.
Most likely, your hook returns [False]{.title-ref} for paths it does not
want to ignore,
which ends the processing and doesn't allow other plugins, including
pytest itself, to ignore the path.
The fix is to return [None]{.title-ref} instead of [False]{.title-ref}
for paths your hook doesn't want to ignore.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/8711">#8711</a>:
<code>caplog.set_level()
&lt;pytest.LogCaptureFixture.set_level&gt;</code>{.interpreted-text
role=&quot;func&quot;} and <code>caplog.at_level()
&lt;pytest.LogCaptureFixture.at_level&gt;</code>{.interpreted-text
role=&quot;func&quot;}
will temporarily enable the requested <code>level</code> if
<code>level</code> was disabled globally via
<code>logging.disable(LEVEL)</code>.</p>
</li>
</ul>
<h2>Bug Fixes</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest/commit/d9bf9dbec104af1e3a2c02b04f4e1d501d5d86a2"><code>d9bf9db</code></a>
Prepare release version 7.4.0</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/64319dbc01767c73161be630bb6986c4f1402c3e"><code>64319db</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/11128">#11128</a>
from bluetech/pythonpath-note</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/1e8135df16fff350d0097a41b739745a9e14edec"><code>1e8135d</code></a>
reference: add note that <code>pythonpath</code> does not affect
<code>-p</code></li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/1e32a4b57030d06eec09e6c1d484e55709f59991"><code>1e32a4b</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/10935">#10935</a>
from nondescryptid/10328</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/faa1f9d2ad88d788cf035e5ed8ed78d248c24c09"><code>faa1f9d</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/11125">#11125</a>
from bluetech/initial-conftests-testpaths</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/14890329dcdc37085a8ac9c53ce332df9faead30"><code>1489032</code></a>
config: fix the paths considered for initial conftest discovery</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/d97d44a97af2303eb3f3aea1f16fd834f5415509"><code>d97d44a</code></a>
config: extract initial paths/nodeids args logic to a function</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/f6b995e9d59a0b7e1e52fb64185e9e1d1dae367d"><code>f6b995e</code></a>
Use utf-8 debug file</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/661b938fcad0ece7d017d76d412fff220e43a865"><code>661b938</code></a>
Add encoding in more tests</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/7e510769b4a9b67ef3802a894b36e7978fa222f8"><code>7e51076</code></a>
Encoding for subprocess.run</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest/compare/7.3.2...7.4.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest&package-manager=pip&previous-version=7.3.2&new-version=7.4.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>
2023-06-25 22:03:08 +00:00
dependabot[bot] e3d3541471 Bump ipykernel from 6.23.2 to 6.23.3 in /python (#1701)
Bumps [ipykernel](https://github.com/ipython/ipykernel) from 6.23.2 to
6.23.3.
<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.23.3</h2>
<h2>6.23.3</h2>
<p>(<a
href="https://github.com/ipython/ipykernel/compare/v6.23.2...ea3e6479aca70f87282ec0b60412f2cfba59eb35">Full
Changelog</a>)</p>
<h3>Bugs fixed</h3>
<ul>
<li>Check existence of connection_file before writing <a
href="https://redirect.github.com/ipython/ipykernel/pull/1127">#1127</a>
(<a href="https://github.com/fecet"><code>@​fecet</code></a>)</li>
</ul>
<h3>Contributors to this release</h3>
<p>(<a
href="https://github.com/ipython/ipykernel/graphs/contributors?from=2023-06-12&amp;to=2023-06-23&amp;type=c">GitHub
contributors page for this release</a>)</p>
<p><a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Ablink1073+updated%3A2023-06-12..2023-06-23&amp;type=Issues"><code>@​blink1073</code></a>
| <a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Afecet+updated%3A2023-06-12..2023-06-23&amp;type=Issues"><code>@​fecet</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.23.3</h2>
<p>(<a
href="https://github.com/ipython/ipykernel/compare/v6.23.2...ea3e6479aca70f87282ec0b60412f2cfba59eb35">Full
Changelog</a>)</p>
<h3>Bugs fixed</h3>
<ul>
<li>Check existence of connection_file before writing <a
href="https://redirect.github.com/ipython/ipykernel/pull/1127">#1127</a>
(<a href="https://github.com/fecet"><code>@​fecet</code></a>)</li>
</ul>
<h3>Contributors to this release</h3>
<p>(<a
href="https://github.com/ipython/ipykernel/graphs/contributors?from=2023-06-12&amp;to=2023-06-23&amp;type=c">GitHub
contributors page for this release</a>)</p>
<p><a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Ablink1073+updated%3A2023-06-12..2023-06-23&amp;type=Issues"><code>@​blink1073</code></a>
| <a
href="https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Afecet+updated%3A2023-06-12..2023-06-23&amp;type=Issues"><code>@​fecet</code></a></p>
<!-- raw HTML omitted -->
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ipython/ipykernel/commit/99b2ec4f4e29e214128b860cb9678e9bd275d959"><code>99b2ec4</code></a>
Publish 6.23.3</li>
<li><a
href="https://github.com/ipython/ipykernel/commit/ea3e6479aca70f87282ec0b60412f2cfba59eb35"><code>ea3e647</code></a>
fix: check existence of connection_file before writing (<a
href="https://redirect.github.com/ipython/ipykernel/issues/1127">#1127</a>)</li>
<li>See full diff in <a
href="https://github.com/ipython/ipykernel/compare/v6.23.2...v6.23.3">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.23.2&new-version=6.23.3)](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-06-25 22:02:19 +00:00
dependabot[bot] f0f074d81f Bump ruff from 0.0.273 to 0.0.275 in /python (#1688)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.273 to 0.0.275.
<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.275</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<p>Highlights include a 7-10x decrease in Ruff's cache size.</p>
<h3>Rules</h3>
<ul>
<li>Add support for top-level quoted annotations in RUF013 by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5235">astral-sh/ruff#5235</a></li>
<li>Add support for nested quoted annotations in RUF013 by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5254">astral-sh/ruff#5254</a></li>
<li>Move <code>compare-to-empty-string</code> (<code>PLC1901</code>) to
nursery by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5264">astral-sh/ruff#5264</a></li>
<li>Ignore Pydantic classes when evaluating
<code>mutable-class-default</code> (<code>RUF012</code>) by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5273">astral-sh/ruff#5273</a></li>
<li>Allow <code>typing.Final</code> for <code>mutable-class-default
annotations</code> (<code>RUF012</code>) by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5274">astral-sh/ruff#5274</a></li>
<li>Modify <code>deprecated-import</code> (<code>UP035</code>) to prefer
<code>typing_extensions</code> in some versions by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5291">astral-sh/ruff#5291</a></li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Restore existing bindings when unbinding caught exceptions by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5256">astral-sh/ruff#5256</a></li>
<li>Avoid including nursery rules in linter-level selectors by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5268">astral-sh/ruff#5268</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/jgberry"><code>@​jgberry</code></a> made
their first contribution in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5221">astral-sh/ruff#5221</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/astral-sh/ruff/compare/v0.0.274...v0.0.275">https://github.com/astral-sh/ruff/compare/v0.0.274...v0.0.275</a></p>
<h2>v0.0.274</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<p>Follow-up release to <code>v0.0.273</code> to fix a panic in cache
accesses.</p>
<h3>Bug Fixes</h3>
<ul>
<li>Use package roots rather than package members for cache
initialization by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5233">astral-sh/ruff#5233</a></li>
<li>Avoid <code>.unwrap()</code> on cache access by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5229">astral-sh/ruff#5229</a></li>
<li>Revert change to <code>RUF010</code> to remove unnecessary
<code>str</code> calls by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5232">astral-sh/ruff#5232</a></li>
<li>Avoid erroneous RUF013 violations for quoted annotations by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5234">astral-sh/ruff#5234</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/astral-sh/ruff/compare/v0.0.273...v0.0.274">https://github.com/astral-sh/ruff/compare/v0.0.273...v0.0.274</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/5dd00b19e6cbce8dc0b117a4cf41432ec61b9e46"><code>5dd00b1</code></a>
Remove off-palette colors from code (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5305">#5305</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/c0f93fcf3ee34fcbef4ce463249ca14c2055bdd5"><code>c0f93fc</code></a>
Publish GitHub release as draft (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5304">#5304</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/3238a6ef1fcc78be9172dfc866051bcb1471cede"><code>3238a6e</code></a>
Fix 'our' to 'your' typo (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5303">#5303</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/96ecfae1c5f9ebcedc90e51252aa3cb5274c8e45"><code>96ecfae</code></a>
Remove off-palette colors (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5302">#5302</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/03694ef6497b7f6d7af873e72845d9218e48a94b"><code>03694ef</code></a>
More stability checker options (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5299">#5299</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/f9f0cf7524707cd0099e4088b8122540b20b34bd"><code>f9f0cf7</code></a>
Use <code>__future__</code> imports in scripts (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5301">#5301</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/eaa10ad2d9ee9d38f9b1cc690c3a5e0ab7d62ff0"><code>eaa10ad</code></a>
Fix <code>deprecated-import</code> false positives (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5291">#5291</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/84259f5440d3f267af0fa5348632d1ed83f8ca42"><code>84259f5</code></a>
Add Applicability to pycodestyle (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5282">#5282</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/e8ebe0a4259885132de1db8935a813424c3c61bd"><code>e8ebe0a</code></a>
Update docs to match updated logo and color palette (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5283">#5283</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/d407165aa766252ee9b7663ef457611f5154accc"><code>d407165</code></a>
Fix formatter panic with comment after parenthesized dict value (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5293">#5293</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.0.273...v0.0.275">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.273&new-version=0.0.275)](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-06-23 15:49:55 +00:00
Shawn Callegariandname 7a3fad9dbb Python: move kernel-syntax-examples to python/samples folder (#1650)
Moving kernel-syntax-examples to the python/samples folder.
Leaving README behind to point to the new folders (will delete in a few
sprints)

### 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: name <email>
2023-06-23 15:19:39 +00:00
dependabot[bot] 7f4a126a66 Bump weaviate-client from 3.20.1 to 3.21.0 in /python (#1562)
Bumps
[weaviate-client](https://github.com/weaviate/weaviate-python-client)
from 3.20.1 to 3.21.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/weaviate/weaviate-python-client/releases">weaviate-client's
releases</a>.</em></p>
<blockquote>
<h2>v3.21.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Add embedded support for mac os by <a
href="https://github.com/dirkkul"><code>@​dirkkul</code></a> in <a
href="https://redirect.github.com/weaviate/weaviate-python-client/pull/337">weaviate/weaviate-python-client#337</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/weaviate/weaviate-python-client/compare/v3.20.1...v3.21.0">https://github.com/weaviate/weaviate-python-client/compare/v3.20.1...v3.21.0</a></p>
<h2>v3.21.0b0</h2>
<h2>What's Changed</h2>
<ul>
<li>Add embedded support for mac os by <a
href="https://github.com/dirkkul"><code>@​dirkkul</code></a> in <a
href="https://redirect.github.com/weaviate/weaviate-python-client/pull/337">weaviate/weaviate-python-client#337</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/weaviate/weaviate-python-client/compare/v3.20.1...v3.21.0b0">https://github.com/weaviate/weaviate-python-client/compare/v3.20.1...v3.21.0b0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/weaviate/weaviate-python-client/blob/main/docs/changelog.rst">weaviate-client's
changelog</a>.</em></p>
<blockquote>
<h2>Version 3.21.0</h2>
<p>This minor version includes:</p>
<ul>
<li>Weaviate Embedded supports MacOs</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/efe23d18f63161c3d2436cb84f6f600dd5753197"><code>efe23d1</code></a>
Merge pull request <a
href="https://redirect.github.com/weaviate/weaviate-python-client/issues/362">#362</a>
from weaviate/release/3.21.0</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/2d3dd56699f8025b96892963dc8d534805ae4bdb"><code>2d3dd56</code></a>
3.21.0</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/82d94f594f7c6bdc727b9bc3c6484ba92b74d367"><code>82d94f5</code></a>
Merge pull request <a
href="https://redirect.github.com/weaviate/weaviate-python-client/issues/337">#337</a>
from weaviate/embedded_mac</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/7c76166cf4bd2a5151d55d7966d04c56d7abb624"><code>7c76166</code></a>
Update default embedded version</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/b101d4f2084b50f155e5c2e65d09d406c6cc2c0a"><code>b101d4f</code></a>
Enable weaviate embedded wit mac</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/84181e50bb107b0ee29de592d2486e0294e9f21d"><code>84181e5</code></a>
Fix downloads</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/78555dc8f09fa6d5cd8a4f0e0123877e535a8a8e"><code>78555dc</code></a>
automatically put platform into download links</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/699dd02f7486481420bc2a16d79cbea5b3601ec6"><code>699dd02</code></a>
Add embedded support for mac os</li>
<li>See full diff in <a
href="https://github.com/weaviate/weaviate-python-client/compare/v3.20.1...v3.21.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=weaviate-client&package-manager=pip&previous-version=3.20.1&new-version=3.21.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>
2023-06-21 00:55:53 +00:00
dependabot[bot] 96c888912d Bump ruff from 0.0.272 to 0.0.273 in /python (#1619)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.272 to 0.0.273.
<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.273</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<p>Highlights include:</p>
<ul>
<li>Autofix capabilities for rules like
<code>flake8-import-conventions</code>, which require symbol renames
across a file.</li>
<li>Significant decrease in Ruff's cache size (e.g., a ~50% decrease for
FastAPI).</li>
<li>Dozens and dozens of bug fixes + performance improvements.</li>
</ul>
<h3>Rules</h3>
<ul>
<li>[<code>copyright</code>] Implement copyright notice detection by <a
href="https://github.com/Ryang20718"><code>@​Ryang20718</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/4701">astral-sh/ruff#4701</a></li>
<li>[<code>flake8-datetimez</code>] Enable UTC-import for
<code>datetime-utc-alias</code> fix by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5100">astral-sh/ruff#5100</a></li>
<li>[<code>flake8-implicit-str-concat</code>] Add autofix for
<code>ISC001</code> by <a
href="https://github.com/tkukushkin"><code>@​tkukushkin</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/4853">astral-sh/ruff#4853</a></li>
<li>[<code>flake8-import-conventions</code>] Enable autofix for
unconventional imports rule by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5152">astral-sh/ruff#5152</a></li>
<li>[<code>flake8-pyi</code>] Add autofix for
<code>Set</code>-to-<code>AbstractSet</code> rewrite using reference
tracking by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5074">astral-sh/ruff#5074</a></li>
<li>[<code>flake8-pyi</code>] Implement PYI044 by <a
href="https://github.com/Thomasdezeeuw"><code>@​Thomasdezeeuw</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5021">astral-sh/ruff#5021</a></li>
<li>[<code>flake8-return</code>] Extend revised <code>RET504</code>
implementation to <code>with</code> statements by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/4998">astral-sh/ruff#4998</a></li>
<li>[<code>flake8-return</code>] Implement autofix for revised
<code>RET504</code> rule by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/4999">astral-sh/ruff#4999</a></li>
<li>[<code>flake8-return</code>] Refactor <code>RET504</code> to only
enforce assignment-then-return pattern by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/4997">astral-sh/ruff#4997</a></li>
<li>[<code>flake8-slots</code>] Add plugin, add <code>SLOT000</code>,
<code>SLOT001</code> and <code>SLOT002</code> by <a
href="https://github.com/qdegraaf"><code>@​qdegraaf</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/4909">astral-sh/ruff#4909</a></li>
<li>[<code>perflint</code>] Add <code>perflint</code> plugin, add first
rule <code>PERF102</code> by <a
href="https://github.com/qdegraaf"><code>@​qdegraaf</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/4821">astral-sh/ruff#4821</a></li>
<li>[<code>pylint</code>] Add Pylint rule
<code>comparison-with-itself</code> (<code>R0124</code>) by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/4957">astral-sh/ruff#4957</a></li>
<li>[<code>pyupgrade</code>] Add a rule to remove unnecessary
parentheses in class definitions by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5032">astral-sh/ruff#5032</a></li>
<li>[<code>ruff</code>] Add a rule for static keys in dict
comprehensions by <a
href="https://github.com/rodjunger"><code>@​rodjunger</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/4929">astral-sh/ruff#4929</a></li>
<li>[<code>ruff</code>] Add rule to disallow implicit optional with
autofix by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/4831">astral-sh/ruff#4831</a></li>
<li>[<code>ruff</code>] Expand RUF008 to all classes, but to a new code
(RUF012) by <a
href="https://github.com/adampauls"><code>@​adampauls</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/4390">astral-sh/ruff#4390</a></li>
<li>[<code>ruff</code>] Remove unannotated attributes from RUF008 by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5049">astral-sh/ruff#5049</a></li>
<li>[<code>ruff</code>] Upgrade explicit-type-conversion rule
(<code>RUF010</code>) to remove unnecessary <code>str</code> calls by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/4971">astral-sh/ruff#4971</a></li>
</ul>
<h3>Settings</h3>
<ul>
<li>Option (<code>-o</code>/<code>--output-file</code>) to write output
to a file by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/4950">astral-sh/ruff#4950</a></li>
<li>Add JSON Lines (NDJSON) message serialization by <a
href="https://github.com/akx"><code>@​akx</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5048">astral-sh/ruff#5048</a></li>
<li>Add rule documentation URL to JSON output by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5187">astral-sh/ruff#5187</a></li>
</ul>
<h3>Caching</h3>
<ul>
<li>Only use a single cache file per Python package by <a
href="https://github.com/Thomasdezeeuw"><code>@​Thomasdezeeuw</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5117">astral-sh/ruff#5117</a></li>
<li>Open cache files in parallel by <a
href="https://github.com/Thomasdezeeuw"><code>@​Thomasdezeeuw</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5120">astral-sh/ruff#5120</a></li>
</ul>
<h3>Jupyter</h3>
<ul>
<li>Add support for auto-fix in Jupyter notebooks by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/4665">astral-sh/ruff#4665</a></li>
<li>Add roundtrip support for Jupyter notebook by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5028">astral-sh/ruff#5028</a></li>
</ul>
<h3>Bug Fixes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/fde5dbc9aa967b086347f87fc61511c8dfe7ad0e"><code>fde5dbc</code></a>
Bump version to 0.0.273 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5218">#5218</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/b4bd5a5acbbabef94378e032f5a2d9473adb2469"><code>b4bd5a5</code></a>
Make the release workflow more resilient (<a
href="https://redirect.github.com/astral-sh/ruff/issues/4728">#4728</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/acb23dce3c94e0e92ab15f1843b6e77c22240b50"><code>acb23dc</code></a>
Fix subprocess.run on Windows Python 3.7 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5220">#5220</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/30734f06fd62af07217c4c6e5e2168b827b6e52f"><code>30734f0</code></a>
Support parenthesized expressions when splitting compound assertions (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5219">#5219</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/4547002eb7b81c909c77d691b74119ddad7456bd"><code>4547002</code></a>
Remove defaults from fixtures/pyproject.toml (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5217">#5217</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/310abc769d52b62bafda6a0ba8b0a152bd0792bc"><code>310abc7</code></a>
Move <code>StarImport</code> to its own module (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5186">#5186</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/b36928883329ffcf7d11899a195ad13aa9dbfab3"><code>b369288</code></a>
Accept any <code>Into\&lt;AnyNodeRef&gt;</code> as <code>Comments</code>
arguments (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5205">#5205</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/6f7d3cc79848a2b0d831775a7ecba27130fd2979"><code>6f7d3cc</code></a>
Add option (<code>-o</code>/<code>--output-file</code>) to write output
to a file (<a
href="https://redirect.github.com/astral-sh/ruff/issues/4950">#4950</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/d9e59b21cd850819134e07458bb9846f80c86707"><code>d9e59b2</code></a>
Add BestFittingMode (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5184">#5184</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/6929fcc55f402ed716345dc1a8f2d3c288ee32f7"><code>6929fcc</code></a>
Complete <code>flake8-bugbear</code> documentation (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5178">#5178</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.0.272...v0.0.273">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.272&new-version=0.0.273)](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-06-21 00:54:38 +00:00
6299040bd2 Rebrand end-to-end folder under python tests (#1503)
Rebrand end-to-end folder to kernel-syntax-examples because these aren't
actually tests for the repo. They are console apps.

Addresses #1397

Co-authored-by: Alex Chao <achao@achao>
Co-authored-by: Lee Miller <[email protected]>
2023-06-20 17:29:49 +00:00
cschadewitz 40517f2c03 Python wait core skill (#1373)
### 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? Improved parity between .Net and Python
implementations
2. What problem does it solve? Allow for waiting in Python
implementation
  3. What scenario does it contribute to? Parity
  4. If it fixes an open issue, please link to the issue here.
-->


### Description
Pretty simple allows for waiting X seconds in a thread


### 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
- [ ] I didn't break anyone 😄
2023-06-17 00:15:15 +00:00
2b85ccd470 Python: Fix windows runtime error: adapt asyncio event loop policy for windows python 3.10 and above (#1416)
### Motivation and Context
To fix a runtime error on windows for python version 3.10, 3.11 and
above

On windows, python version above 3.10.1, there will be a runtime error
caused by asyncio event loop. add adapting code for windows when python
version is above 3.10.1 to avoid the error.

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

Refer link:

https://docs.python.org/3/library/asyncio-policy.html

"Note In Python versions 3.10.9, 3.11.1 and 3.12 the
[get_event_loop()](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_event_loop)
method of the default asyncio policy emits a
[DeprecationWarning](https://docs.python.org/3/library/exceptions.html#DeprecationWarning)
if there is no running event loop and no current loop is set. In some
future Python release this will become an error."

Note: per testing, this error also occurred on python 3.10 below 3.10.9

Co-authored-by: Mark Karle <[email protected]>
Co-authored-by: Lee Miller <[email protected]>
2023-06-15 17:31:37 -07:00
Abby HarrisonandShawn Callegari 7b3dc2c47f Python: Filter only json content from basic planner execution input (#1496)
### Motivation and Context
Closes #1469 

There are scenarios where the basic_planner prompt results in a valid
plan surrounded by additional text. This renders the plan unable to be
json deserialized. This PR addresses this scenario. Note that it does
NOT address malformed json.

### Description
- added a regex in basic_planner.execute_plan_async that grabs only json
blocks. See screenshot below of it ignoring additional, non-json text.
- Added dependency on `regex` pip package (`re` package does not support
regex recursion)

Co-authored-by: Shawn Callegari <[email protected]>
2023-06-14 17:28:25 -07:00
dependabot[bot] 9ba5c6b044 Bump pytest from 7.2.0 to 7.3.2 in /python (#1462)
Bumps pytest from 7.2.0 to 7.3.2.
2023-06-14 13:52:03 -07:00
dependabot[bot] a2ec6583c3 Bump pre-commit from 2.21.0 to 3.3.3 in /python (#1467)
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 2.21.0
to 3.3.3.
2023-06-14 13:45:51 -07:00
Mark KarleandAbby Harrison 4994f37643 Adding import checking to ruff (#1294)
### Motivation and Context

Replacing flake8 and isort with ruff in the pre-commit hook.
Adding "I" to ruff rules so that it checks for import errors.

Co-authored-by: Abby Harrison <[email protected]>
2023-06-13 16:42:49 -07:00
dependabot[bot] 99592594cb Bump weaviate-client from 3.19.2 to 3.20.0 in /python (#1436)
Bumps
[weaviate-client](https://github.com/weaviate/weaviate-python-client)
from 3.19.2 to 3.20.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/weaviate/weaviate-python-client/releases">weaviate-client's
releases</a>.</em></p>
<blockquote>
<h2>v3.20.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Increase version of requests library by <a
href="https://github.com/dirkkul"><code>@​dirkkul</code></a> in <a
href="https://redirect.github.com/weaviate/weaviate-python-client/pull/353">weaviate/weaviate-python-client#353</a></li>
<li>Add error handling for grpc by <a
href="https://github.com/dirkkul"><code>@​dirkkul</code></a> in <a
href="https://redirect.github.com/weaviate/weaviate-python-client/pull/328">weaviate/weaviate-python-client#328</a></li>
<li>Add explicit license by <a
href="https://github.com/dirkkul"><code>@​dirkkul</code></a> in <a
href="https://redirect.github.com/weaviate/weaviate-python-client/pull/355">weaviate/weaviate-python-client#355</a></li>
<li>Increase default embedded version to 1.19.7 by <a
href="https://github.com/dirkkul"><code>@​dirkkul</code></a> in <a
href="https://redirect.github.com/weaviate/weaviate-python-client/pull/356">weaviate/weaviate-python-client#356</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/weaviate/weaviate-python-client/compare/v3.19.2...v3.20.0">https://github.com/weaviate/weaviate-python-client/compare/v3.19.2...v3.20.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/weaviate/weaviate-python-client/blob/main/docs/changelog.rst">weaviate-client's
changelog</a>.</em></p>
<blockquote>
<h2>Version 3.20.0</h2>
<p>This minor version includes:</p>
<ul>
<li>Increase maximum version of request library to <code>2.31.0</code>.
This also updates to urllib 2.0. This may contain minor breaking changes
if you use urllib in other projects in the same virtual
environment.</li>
<li>Add licensing information to pypi package</li>
<li>Increase default embedded version t0 1.19.7</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/5a161a9e167edba2f46a0f0991e09a71b5057f37"><code>5a161a9</code></a>
Merge pull request <a
href="https://redirect.github.com/weaviate/weaviate-python-client/issues/357">#357</a>
from weaviate/release/3.20.0</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/e3ab1962628324d3350aaf849ac9a7982b1afde2"><code>e3ab196</code></a>
Update changelog for 3.20.0</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/5f59fb79d67cf43f247e487fb0ee5b82e9ad1e5e"><code>5f59fb7</code></a>
Merge pull request <a
href="https://redirect.github.com/weaviate/weaviate-python-client/issues/356">#356</a>
from weaviate/default_version</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/eda1eeccd66ec357b011d4c78fbecfbbfd05a38a"><code>eda1eec</code></a>
Merge pull request <a
href="https://redirect.github.com/weaviate/weaviate-python-client/issues/355">#355</a>
from weaviate/license</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/bf1739eb569f81ccabb4d1edf1987a99b2cbe3fe"><code>bf1739e</code></a>
Increase default embedded version</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/e332f4182811b8a2fa84d0cd65791006d2c457d8"><code>e332f41</code></a>
Add explicit license file</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/e442a17e6e9d7d18b00591557e1f53e92d6aea39"><code>e442a17</code></a>
Merge pull request <a
href="https://redirect.github.com/weaviate/weaviate-python-client/issues/328">#328</a>
from weaviate/fix_errors_grpc</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/449007f3bedc0a025cd2c82c20d0e41ff1afc271"><code>449007f</code></a>
Merge pull request <a
href="https://redirect.github.com/weaviate/weaviate-python-client/issues/340">#340</a>
from weaviate/update-docs-wording</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/c0f51b5f88afa763c00521a9cf7aaa6b97e89d81"><code>c0f51b5</code></a>
Fix test</li>
<li><a
href="https://github.com/weaviate/weaviate-python-client/commit/4a64ccd3cfe929d3868b1e3edf9cdeca875d77fe"><code>4a64ccd</code></a>
Merge pull request <a
href="https://redirect.github.com/weaviate/weaviate-python-client/issues/353">#353</a>
from weaviate/increase_requests</li>
<li>Additional commits viewable in <a
href="https://github.com/weaviate/weaviate-python-client/compare/v3.19.2...v3.20.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=weaviate-client&package-manager=pip&previous-version=3.19.2&new-version=3.20.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>
2023-06-12 18:48:53 -07:00
dependabot[bot] 31e8091469 Bump ruff from 0.0.257 to 0.0.272 in /python (#1434)
Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.257 to 0.0.272.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 01:15:45 +00:00
dependabot[bot] 01306c59d3 Bump torch from 2.0.0 to 2.0.1 in /python (#1432)
Bumps [torch](https://github.com/pytorch/pytorch) from 2.0.0 to 2.0.1.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 17:46:54 -07:00
dependabot[bot]andShawn Callegari 2c365815f2 Bump transformers from 4.29.2 to 4.30.1 in /python (#1433)
Bumps [transformers](https://github.com/huggingface/transformers) from 4.29.2 to 4.30.1.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shawn Callegari <[email protected]>
2023-06-12 17:21:08 -07:00
dependabot[bot] 87ed8c6a83 Bump ipykernel from 6.23.1 to 6.23.2 in /python (#1435)
Bumps [ipykernel](https://github.com/ipython/ipykernel) from 6.23.1 to 6.23.2.
2023-06-12 16:53:02 -07:00
Devis Lucato 774254f902 New python release (#1425)
* [e4781e51] Add sample notebook to demo weaviate memory store (#1359)
* [dae1c167] Python: Added examples of using ChatCompletion models for
skill building in Jupyter Notebooks (#1242)
* [f4e92eb1] fix: Add Azure OpenAI support for
python/08-native-function-inline (#1365)
* [de746686] Fixing typos (#1377)
* [67aa7325] Python: Fix weaviate integration tests (#1422)
* [f60d7ba0] Fix functions_view.py (#1213)
* [b2e15483] Python: Multiple results per prompt (incl. streaming)
(#1316)
* [4c4670ac] Using dotenv instead of parsing keys ourselves (#1295)
* [05d9e723] Python: Sync pyproject.toml with requirements.txt (#1150)
* [6cbea85f] Python: Add additional_metadata field to MemoryRecord and
address TODOs in ChromaMemoryStore (#1323)
* [8947e684] Weaviate: Fix to be compatible with python 3.8 (#1349)
2023-06-12 10:06:33 -07:00
Abby Harrison 67aa7325d8 Python: Fix weaviate integration tests (#1422)
### Motivation and Context
The addition of the field `additional metadata` to `MemoryRecord` was
not propagated to the weaviate integration tests. This PR ensures that
the fields are properly filled and aligned.


### Description
- Added an entry for `"additional info"` to the memory record test
fixtures for weaviate.
2023-06-12 09:51:15 -07:00
f60d7ba0d7 Fix functions_view.py (#1213)
### Motivation and Context
#1212 

### Description
Fixed a bug in the process of checking native function.


---------

Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
2023-06-09 14:21:34 -07:00
Abby Harrison b2e1548379 Python: Multiple results per prompt (incl. streaming) (#1316)
### Motivation and Context
To take advantage of APIs offered by most LLMs and to be in sync with
.NET SK, this PR introduces the ability to generate multiple text
completions or chat completions from a single prompt.


![MultiChatCompletionStreamMulti](https://github.com/microsoft/semantic-kernel/assets/54643756/7bec03ec-0be2-40b0-b938-6ff71beac209)


### Description
- Return type hint for `complete_async` and `complete_chat_async`
changed from `str -> Union[str, List[str]]`. The use of `Union` is the
proper way to indicate multiple return types prior to Python 3.10+. 3.10
supports the use of the `|` symbol, but since the Python SK is supported
on 3.8 and 3.9, I did not adopt the newer standard.
- `complete_async`, `complete_stream_async`, `complete_chat_async`, and
`complete_chat_stream_async` now support settings field
`number_of_responses` greater than 1. Previously only a value of 1 was
supported.
- **Note: hf_text_completion does not support streaming multiple
responses due to a limitation of TextIteratorStreamer. This feature
requires the ability to parse distinct responses from
TextIteratorStreamer.**
- Fixed a bug where `complete_async` was streaming single responses as
1D arrays, content now is simply a string.

### Example Usage
#### Setup
```
    kernel = sk.Kernel()

    # Configure OpenAI service
    api_key, org_id = sk.openai_settings_from_dot_env()
    oai_text_service = OpenAITextCompletion("text-davinci-003", api_key, org_id)
    oai_chat_service = OpenAIChatCompletion("gpt-3.5-turbo", api_key, org_id)

    # Configure Hugging Face service
    hf_text_service = HuggingFaceTextCompletion("gpt2", task="text-generation")
  
    # Configure Prompt
    prompt = "what is the purpose of a rubber duck?"

    # Configure Request Settings
    text_request_settings_multi = CompleteRequestSettings(
        max_tokens=100,
        temperature=0.7,
        top_p=1,
        frequency_penalty=0.5,
        presence_penalty=0.8,
        number_of_responses=4
    )

    chat_request_settings_multi = ChatRequestSettings(
        max_tokens=100,
        temperature=0.7,
        top_p=1,
        frequency_penalty=0.5,
        presence_penalty=0.8,
        number_of_responses=4
    )
```

#### Text Completion (Standard)
```
    texts = await oai_text_service.complete_async(prompt, text_request_settings_multi)
    i = 0
    for text in texts:
        print("Option " + str(i) + ": " + text)
        i += 1
```

#### Streaming Text Completion
```
    multi_stream = oai_text_service.complete_stream_async(prompt, text_request_settings_multi)
    texts = [''] * text_request_settings_multi.number_of_responses
    async for text in multi_stream:
        i = 0
        os.system('cls' if os.name == 'nt' else 'clear') # clear the screen for a better experience
        print("PROMPT: " + prompt)
        for option in text:
            texts[i] = texts[i] + option
            print("{0}: {1}".format(i, texts[i]))
            i += 1
```

#### Chat Completion (Standard)
```
    texts = await oai_chat_service.complete_chat_async([("user",prompt)], chat_request_settings_multi)
    i = 0
    for text in texts:
        print("Option " + str(i) + ": " + text)
        i += 1
```

#### Streaming Chat Completion
```
    multi_stream = oai_chat_service.complete_chat_stream_async([("user",prompt)], chat_request_settings_multi)
    texts = [''] * chat_request_settings_multi.number_of_responses
    async for text in multi_stream:
        i = 0
        os.system('cls' if os.name == 'nt' else 'clear') # clear the screen for a better experience
        print("PROMPT: " + prompt)
        for option in text:
            texts[i] = texts[i] + option
            print("{0}: {1}".format(i, texts[i]))
            i += 1
```

#### HuggingFace Standard Completion
```
    texts = await hf_text_service.complete_async(prompt, request_settings_multi)
    i = 0
    for text in texts:
        print("-----------------------------------")
        print("Option " + str(i) + ": " + text)
        i += 1
```
2023-06-09 14:13:45 -07:00
Mark Karle 4c4670acb2 Using dotenv instead of parsing keys ourselves (#1295)
### Motivation and Context

This changes our parsing of the .env file to use
[`python-dotenv`](https://pypi.org/project/python-dotenv/) which will be
more flexible.
Tested that the notebooks would still run correctly.
2023-06-07 15:53:32 -07:00
Abby Harrison 05d9e72322 Python: Sync pyproject.toml with requirements.txt (#1150)
### Motivation and Context
This PR ensures that pyproject.toml with requirements.txt are in sync.

### Description
- removed the `^` from pyproject.toml linting dependencies
- Added >= to requirements.txt
2023-06-07 22:43:03 +00:00
Abby Harrison 6cbea85fd8 Python: Add additional_metadata field to MemoryRecord and address TODOs in ChromaMemoryStore (#1323)
### Motivation and Context
Closes #1271 and addresses several TODOs in ChromaMemoryStore


### Description
- added field `additional_metadata` to `MemoryRecord` and all downstream
methods/classes (see `SemanticTextMemoryBase`, `SemanticTextMemory`,
`MemoryQueryResult`, and `ChromaMemoryStore`)
- addressed ChromaMemoryStore TODO 'what is key used for?' For chromadb,
key and id are effectively the same value, but the two fields are
differentiated for memory stores like Qdrant which require that key be a
uuid. I updated the logic so that this is more apparent. Note that this
results in no change in end-user functionality.
- Updated ChromaMemoryStore TODO 'get_async say embedding is optional
but Record constructor requires it.` MemoryRecord constructor no longer
requires an embedding. Logic is updated and a test added to show that
embedding retrieval is functionally optional.
2023-06-07 15:33:51 -07:00
Shukri 8947e6845c Weaviate: Fix to be compatible with python 3.8 (#1349)
use run_in_executor instead of to_thread to run the weaviate client ops
in async because to_thread is not available in python 3.8
2023-06-06 14:49:14 -07:00
Devis LucatoandAbby Harrison 371f54b3f8 Bump SK python version from 0.2.9 to 0.3.0 (#1342)
New release and updated feature matrix

---------

Co-authored-by: Abby Harrison <[email protected]>
2023-06-05 13:07:47 -07:00
18cd0cd042 Add support for weaviate as a memory store (Python) (#804)
Add support for weaviate as a memory store
see #803

Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
2023-06-05 09:37:41 -07:00
Josh XTandAbby Harrison a5144ba6ac Add persist to Chroma on upsert or delete (#1292)
- Add persist to Chroma on upsert or delete
- Fixes #1289 

### Description
Added `self._client.persist()` in the `upsert_async` and
`delete_collection_async`.

Co-authored-by: Abby Harrison <[email protected]>
2023-06-05 16:17:57 +00:00
David Leen 8a58fc9eb1 MemoryQueryResult requires a relevance value (#1249)
Following the tutorial notebooks:

```
async def populate_memory(kernel: sk.Kernel) -> None:
    # Add some documents to the semantic memory
    await kernel.memory.save_information_async(
        "aboutMe", id="info1", text="My name is Andrea"
    )
    await kernel.memory.save_information_async(
        "aboutMe", id="info2", text="I currently work as a tour guide"
    )
    await kernel.memory.save_information_async(
        "aboutMe", id="info3", text="I've been living in Seattle since 2005"
    )
    await kernel.memory.save_information_async(
        "aboutMe", id="info4", text="I visited France and Italy five times since 2015"
    )
    await kernel.memory.save_information_async(
        "aboutMe", id="info5", text="My family is from New York"
    )
```
and calling:
```
await kernel.memory.get_async("aboutMe", "info1")
```

Results in the error:
```
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[6], line 1
----> 1 await kernel.memory.get_async("aboutMe", "info1")

File [~/code/ncp/semantic-kernel/python/semantic_kernel/memory/semantic_text_memory.py:116](https://file+.vscode-resource.vscode-cdn.net/Users/dleen/code/ncp/semantic-kernel/samples/notebooks/python/~/code/ncp/semantic-kernel/python/semantic_kernel/memory/semantic_text_memory.py:116), in SemanticTextMemory.get_async(self, collection, key)
    106 """Get information from the memory (calls the memory store's get method).
    107 
    108 Arguments:
   (...)
    113     Optional[MemoryQueryResult] -- The MemoryQueryResult if found, None otherwise.
    114 """
    115 record = await self._storage.get_async(collection_name=collection, key=key)
--> 116 return MemoryQueryResult.from_memory_record(record) if record else None

TypeError: MemoryQueryResult.from_memory_record() missing 1 required positional argument: 'relevance'
```

Since this is an exact match using `get_async` and `None` if not found,
we can assign a relevance of `1.0` meaning a perfect match.
2023-05-31 10:59:41 -07:00
Abby Harrison bdc0fad251 Bump python release number - 0.2.9.dev (#1277)
### Motivation and Context
New version number for next SK Python release
2023-05-30 11:58:25 -07:00
dependabot[bot] 50cdbbff5d Bump tornado from 6.3.1 to 6.3.2 in /python (#1227)
Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.3.1 to 6.3.2.
2023-05-26 02:55:43 +00:00
tim-gillandDevis Lucato d9028ee44f Add new relative time skills for ' ago' and 'last ' (#927)
### Motivation and Context

The change enables the planner to make use of time references like "last
wednesday" or "three days ago" which currently cause issues. This
enables better use of SequentialPlanner when servicing user intent.
Issue: https://github.com/microsoft/semantic-kernel/issues/922

### Description

This adds two new functions to the core TimeSkill class in both .net and
python.
1. DaysAgo(str days) - takes an argument representing a number of days
and offsets it from the current date to return the resultant date as the
answer.
2. LastMatchingDay(str dayName) - takes the name of a day of the week
and works backwards from yesterday to give it the first matching date of
that day (e.g. "last wednesday"). Currently it only works with English
day names, and this is reflected in the prompt description.

Simple unit tests are added for each function.

Co-authored-by: Devis Lucato <[email protected]>
2023-05-25 15:47:21 -07:00
dependabot[bot] 0dea6c37da Bump requests from 2.30.0 to 2.31.0 in /python (#1160)
Bumps [requests](https://github.com/psf/requests) from 2.30.0 to 2.31.0.
2023-05-23 19:04:57 +00:00
Abby Harrison cfcb4636f9 Python/text completion streaming (#1115)
### Motivation and Context
This PR introduces streaming methods to TextCompletionBase and
ChatCompletionBase. With this pr, you can stream LLM output in the
following ways:

```
import semantic_kernel as sk
from semantic_kernel.connectors.ai import ChatCompletionClientBase, TextCompletionClientBase, ChatRequestSettings, CompleteRequestSettings
from semantic_kernel.connectors.ai.open_ai import AzureTextCompletion, AzureChatCompletion, OpenAITextCompletion, OpenAIChatCompletion
from semantic_kernel.connectors.ai.hugging_face import HuggingFaceTextCompletion

kernel = sk.Kernel()

# Configure Azure LLM service
deployment, api_key, endpoint = sk.azure_openai_settings_from_dot_env()
text_service = AzureTextCompletion("text-davinci-003", endpoint, api_key)
chat_service = AzureChatCompletion("gpt-35-turbo", endpoint, api_key)

# Configure OpenAI service
api_key, org_id = sk.openai_settings_from_dot_env()
oai_text_service = OpenAITextCompletion("text-davinci-003", api_key, org_id)
oai_chat_service = OpenAIChatCompletion("gpt-3.5-turbo", api_key, org_id)

# Configure Hugging Face service
hf_text_service = HuggingFaceTextCompletion("gpt2", task="text-generation")

request_settings = CompleteRequestSettings(
    max_tokens=1000,
    temperature=0.7,
    top_p=1,
    frequency_penalty=0.5,
    presence_penalty=0.5
)

stream = oai_text_service.complete_stream_async("Write an essay on why AI is awesome:", request_settings)
async for text in stream:
    print(text, end = "") # end = "" to avoid newlines

chat_request_settings = ChatRequestSettings(
    max_tokens=1000,
    temperature=0.7,
    top_p=1,
    frequency_penalty=0.5,
    presence_penalty=0.5,
)

stream = oai_chat_service.complete_chat_stream_async([("user","Write an essay on why AI is awesome:")], chat_request_settings)
async for text in stream:
    print(text, end = "") # end = "" to avoid newlines

request_settings = CompleteRequestSettings(
    max_tokens=256,
    temperature=0.7,
    top_p=1,
    frequency_penalty=0.5,
    presence_penalty=0.5
)

stream = hf_text_service.complete_stream_async("Hi my name is ", request_settings)
async for text in stream:
    print(text, end = "") # end = "" to avoid newlines
```
**Out of Scope**: Improving the chat history interface with come in a
future PR

### Description
- added the method complete_stream_async to TextCompletionBase
- added the method complete_chat_stream_async to ChatCompletionBase
- Updated OpenAI and Hugging Face text completion service classes to
support new streaming methods
- Added new __init__.py to make importing service classes
2023-05-23 18:02:50 +00:00
Richard Edgar e9bb05e990 Python: Correct function name (#1157)
### Motivation and Context
In the Python `BasicPlanner` one of the examples has a 'translate'
function, but doesn't quite reference it correctly in the JSON output.

### Description
The overall approach is to make the various parts of the few-shot
example in the prompt self-consistent.
2023-05-22 13:43:36 -07:00
Abby Harrison 00ff74e2e7 Feature python integration tests (#1134)
### Motivation and Context
Python integration tests were failing consistently for 2 reasons. First,
all ubuntu system tests were failing due to missing shared object files
related to cuda. Second, macOS + python 3.11 tests were failing due to
hsnwlib unable to install on native hardware.

See https://github.com/microsoft/semantic-kernel/pull/1066 for
description of changes to integration test code to condense test code,
make better use of pytest fixtures, and reduce the number of calls to
external APIs (OpenAI, AOAI)

### Description
- Integration tests were failing on Linux due to a regression in python
torch=2.0.1. Downgrading the version to 2.0.0 resolved these failures.
- For MacOS + 3.11 specifically, setting the environment variable
`HNSWLIB_NO_NATIVE=1` ensures that the hnswlib wheel can be built and
installed properly on M1 hardware.
- Python integration tests reliably and consistently passing:
https://github.com/microsoft/semantic-kernel/actions/runs/5035748596
2023-05-21 06:04:09 +00:00
Abby Harrison 7a884d4e57 Python: make abstraction usage consistent (#1052)
### Motivation and Context
Use of abstraction was not consistent in the python SK. This PR makes
the import and use of ABC consistent and removes unused file kernel.py.

### Description
- MemoryStoreBase derives from ABC - this properly sets its metaclass.
MemoryStoreBase itself should never be instantiated, only derived.
- RetryMechanism derives ABC, so should be named 'Base' like all other
derivatives of ABC in this repo.
- removed kernel_base.py, was made obsolete by
https://github.com/microsoft/semantic-kernel/pull/1015
2023-05-19 11:42:26 -07:00
hyunyoungjin a3d2224b27 Fix delegate_inference.py (#1054)
### Motivation and Context
#691 
#1053 

### Description
1. Added an argument to prevent TypeError when inferring an unknown
type.
2. Fixed a bug in the process of checking parameters when inferring the
InStringAndContext type.
2023-05-19 18:28:58 +00:00
Alex ChaoandAlex Chao b50a5d81b8 Python: Remove basic planner from core skills init (#1100)
### Motivation and Context
This fixes the issue raised here:
https://github.com/microsoft/semantic-kernel/issues/1099

Removes unnecessary import

Co-authored-by: Alex Chao <[email protected]>
2023-05-19 17:38:53 +00:00
Abby Harrison 493dfc1b61 Python: Merge Kernel, KernelBase, KernelExtensions (#1015)
### Motivation and Context
The separation of Kernel, KernelBase, and KernelExtensions is several
layers of unnecessary abstraction. This PR does not change any API or
kernel behavior - it just reduces the number of files and namespaces to
accomplish the same functionality.


### Description
- Removed the `semantic_kernel/kernel_extensions` namespace. Methods
that existed in this namespace now exist in kernel.py.
- Removed KernelBase - this abstract class implies that there are
multiple ways to instantiate SK. For Python, we expect only a single
type of Kernel to instantiated for all instances.
- Updated tests and imports to accommodate the above changes.
2023-05-17 15:38:02 -07:00