Skip to content

Commit

Permalink
Python: bump version to 1.8.1 (microsoft#8391)
Browse files Browse the repository at this point in the history
### 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.
-->
Bumped the version to 1.8.1, slight updates in pyproject and make to
build automatically.

### Description

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

### Contribution Checklist

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

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
  • Loading branch information
eavanvalkenburg authored Aug 27, 2024
1 parent def6b58 commit b58180a
Show file tree
Hide file tree
Showing 18 changed files with 104 additions and 38 deletions.
1 change: 1 addition & 0 deletions python/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ repos:
hooks:
# Update the uv lockfile
- id: uv-lock
files: ^\./python/(uv\.lock|pyproject\.toml)$
- repo: local
hooks:
- id: mypy
Expand Down
21 changes: 21 additions & 0 deletions python/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
8 changes: 6 additions & 2 deletions python/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SHELL = /bin/bash

.PHONY: help install clean
.PHONY: help install clean build
.SILENT:
all: install

Expand All @@ -22,6 +22,7 @@ help:
echo " install-sk - install Semantic Kernel and all dependencies"
echo " install-pre-commit - install pre-commit hooks"
echo " clean - remove the virtualenvs"
echo " build - build the project"
echo ""
echo -e "\033[1mVARIABLES:\033[0m"
echo " PYTHON_VERSION - Python version to use. Default is 3.10"
Expand Down Expand Up @@ -67,4 +68,7 @@ install-sk:
.ONESHELL:
clean:
# Remove the virtualenv
rm -rf .venv
rm -rf .venv

build:
uvx --from build pyproject-build --installer uv
8 changes: 5 additions & 3 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ authors = [{ name = "Microsoft", email = "[email protected]"}]
readme = "pip/README.md"
# Version read from __version__ field in __init__.py by Flit
dynamic = ["version"]
packages = [{include = "semantic_kernel"}]
requires-python = ">=3.10,<3.13"
license = {file = "../LICENSE"}
license = {file = "LICENSE"}
urls.homepage = "https://learn.microsoft.com/en-us/semantic-kernel/overview/"
urls.source = "https://github.com/microsoft/semantic-kernel/tree/main/python"
urls.release_notes = "https://github.com/microsoft/semantic-kernel/releases?q=tag%3Apython-1&expanded=true"
Expand Down Expand Up @@ -191,7 +190,10 @@ min-file-size = 1
targets = ["semantic_kernel"]
exclude_dirs = ["tests"]

[tool.flit.module]
name = "semantic_kernel"

[build-system]
requires = ["flit-core >= 3.8"]
requires = ["flit-core >= 3.9,<4.0"]
build-backend = "flit_core.buildapi"

9 changes: 6 additions & 3 deletions python/samples/getting_started/00-getting-started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
"metadata": {},
"outputs": [],
"source": [
"# Note: if using a Poetry virtual environment, do not run this cell\n",
"%pip install semantic-kernel==1.8.0"
"# Note: if using a virtual environment, do not run this cell\n",
"%pip install -U semantic-kernel\n",
"from semantic_kernel import __version__\n",
"\n",
"__version__"
]
},
{
Expand Down Expand Up @@ -229,4 +232,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
"metadata": {},
"outputs": [],
"source": [
"# Note: if using a Poetry virtual environment, do not run this cell\n",
"%pip install semantic-kernel==1.8.0"
"# Note: if using a virtual environment, do not run this cell\n",
"%pip install -U semantic-kernel\n",
"from semantic_kernel import __version__\n",
"\n",
"__version__"
]
},
{
Expand Down Expand Up @@ -196,7 +199,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.10.12"
},
"polyglot_notebook": {
"kernelInfo": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@
"metadata": {},
"outputs": [],
"source": [
"# Note: if using a Poetry virtual environment, do not run this cell\n",
"%pip install semantic-kernel==1.8.0"
"# Note: if using a virtual environment, do not run this cell\n",
"%pip install -U semantic-kernel\n",
"from semantic_kernel import __version__\n",
"\n",
"__version__"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
"metadata": {},
"outputs": [],
"source": [
"# Note: if using a Poetry virtual environment, do not run this cell\n",
"%pip install semantic-kernel==1.8.0"
"# Note: if using a virtual environment, do not run this cell\n",
"%pip install -U semantic-kernel\n",
"from semantic_kernel import __version__\n",
"\n",
"__version__"
]
},
{
Expand Down
7 changes: 5 additions & 2 deletions python/samples/getting_started/04-kernel-arguments-chat.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
"metadata": {},
"outputs": [],
"source": [
"# Note: if using a Poetry virtual environment, do not run this cell\n",
"%pip install semantic-kernel==1.8.0"
"# Note: if using a virtual environment, do not run this cell\n",
"%pip install -U semantic-kernel\n",
"from semantic_kernel import __version__\n",
"\n",
"__version__"
]
},
{
Expand Down
9 changes: 6 additions & 3 deletions python/samples/getting_started/05-using-the-planner.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@
"metadata": {},
"outputs": [],
"source": [
"# Note: if using a Poetry virtual environment, do not run this cell\n",
"%pip install semantic-kernel==1.8.0"
"# Note: if using a virtual environment, do not run this cell\n",
"%pip install -U semantic-kernel\n",
"from semantic_kernel import __version__\n",
"\n",
"__version__"
]
},
{
Expand Down Expand Up @@ -583,4 +586,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
11 changes: 6 additions & 5 deletions python/samples/getting_started/06-memory-and-embeddings.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@
"metadata": {},
"outputs": [],
"source": [
"# Note: if using a Poetry virtual environment, do not run this cell\n",
"%pip install semantic-kernel==1.8.0\n",
"%pip install azure-core==1.30.1\n",
"%pip install azure-search-documents==11.8.0b4"
"# Note: if using a virtual environment, do not run this cell\n",
"%pip install -U semantic-kernel[azure]\n",
"from semantic_kernel import __version__\n",
"\n",
"__version__"
]
},
{
Expand Down Expand Up @@ -611,7 +612,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
"metadata": {},
"outputs": [],
"source": [
"# Note: if using a Poetry virtual environment, do not run this cell\n",
"%pip install semantic-kernel[hugging_face]==1.8.0"
"# Note: if using a virtual environment, do not run this cell\n",
"%pip install -U semantic-kernel\n",
"from semantic_kernel import __version__\n",
"\n",
"__version__"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@
"metadata": {},
"outputs": [],
"source": [
"# Note: if using a Poetry virtual environment, do not run this cell\n",
"%pip install semantic-kernel==1.8.0"
"# Note: if using a virtual environment, do not run this cell\n",
"%pip install -U semantic-kernel\n",
"from semantic_kernel import __version__\n",
"\n",
"__version__"
]
},
{
Expand Down
7 changes: 5 additions & 2 deletions python/samples/getting_started/09-groundedness-checking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@
"metadata": {},
"outputs": [],
"source": [
"# Note: if using a Poetry virtual environment, do not run this cell\n",
"%pip install semantic-kernel==1.8.0"
"# Note: if using a virtual environment, do not run this cell\n",
"%pip install -U semantic-kernel\n",
"from semantic_kernel import __version__\n",
"\n",
"__version__"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@
"metadata": {},
"outputs": [],
"source": [
"# Note: if using a Poetry virtual environment, do not run this cell\n",
"%pip install semantic-kernel==1.8.0"
"# Note: if using a virtual environment, do not run this cell\n",
"%pip install -U semantic-kernel\n",
"from semantic_kernel import __version__\n",
"\n",
"__version__"
]
},
{
Expand Down Expand Up @@ -501,7 +504,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
7 changes: 5 additions & 2 deletions python/samples/getting_started/11-streaming-completions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
"metadata": {},
"outputs": [],
"source": [
"# Note: if using a Poetry virtual environment, do not run this cell\n",
"%pip install semantic-kernel==1.8.0"
"# Note: if using a virtual environment, do not run this cell\n",
"%pip install -U semantic-kernel\n",
"from semantic_kernel import __version__\n",
"\n",
"__version__"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install semantic-kernel[weaviate]==1.8.0"
"# Note: if using a virtual environment, do not run this cell\n",
"%pip install -U semantic-kernel[weaviate]\n",
"from semantic_kernel import __version__\n",
"\n",
"__version__"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion python/semantic_kernel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

from semantic_kernel.kernel import Kernel

__version__ = "1.8.0"
__version__ = "1.8.1"
__all__ = ["Kernel", "__version__"]

0 comments on commit b58180a

Please sign in to comment.