Skip to content

Commit b58180a

Browse files
authoredAug 27, 2024
Python: bump version to 1.8.1 (microsoft#8391)
### 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 😄
1 parent def6b58 commit b58180a

18 files changed

+104
-38
lines changed
 

‎python/.pre-commit-config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ repos:
4343
hooks:
4444
# Update the uv lockfile
4545
- id: uv-lock
46+
files: ^\./python/(uv\.lock|pyproject\.toml)$
4647
- repo: local
4748
hooks:
4849
- id: mypy

‎python/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Microsoft Corporation.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE

‎python/Makefile

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SHELL = /bin/bash
22

3-
.PHONY: help install clean
3+
.PHONY: help install clean build
44
.SILENT:
55
all: install
66

@@ -22,6 +22,7 @@ help:
2222
echo " install-sk - install Semantic Kernel and all dependencies"
2323
echo " install-pre-commit - install pre-commit hooks"
2424
echo " clean - remove the virtualenvs"
25+
echo " build - build the project"
2526
echo ""
2627
echo -e "\033[1mVARIABLES:\033[0m"
2728
echo " PYTHON_VERSION - Python version to use. Default is 3.10"
@@ -67,4 +68,7 @@ install-sk:
6768
.ONESHELL:
6869
clean:
6970
# Remove the virtualenv
70-
rm -rf .venv
71+
rm -rf .venv
72+
73+
build:
74+
uvx --from build pyproject-build --installer uv

‎python/pyproject.toml

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ authors = [{ name = "Microsoft", email = "SK-Support@microsoft.com"}]
55
readme = "pip/README.md"
66
# Version read from __version__ field in __init__.py by Flit
77
dynamic = ["version"]
8-
packages = [{include = "semantic_kernel"}]
98
requires-python = ">=3.10,<3.13"
10-
license = {file = "../LICENSE"}
9+
license = {file = "LICENSE"}
1110
urls.homepage = "https://learn.microsoft.com/en-us/semantic-kernel/overview/"
1211
urls.source = "https://github.com/microsoft/semantic-kernel/tree/main/python"
1312
urls.release_notes = "https://github.com/microsoft/semantic-kernel/releases?q=tag%3Apython-1&expanded=true"
@@ -191,7 +190,10 @@ min-file-size = 1
191190
targets = ["semantic_kernel"]
192191
exclude_dirs = ["tests"]
193192

193+
[tool.flit.module]
194+
name = "semantic_kernel"
195+
194196
[build-system]
195-
requires = ["flit-core >= 3.8"]
197+
requires = ["flit-core >= 3.9,<4.0"]
196198
build-backend = "flit_core.buildapi"
197199

‎python/samples/getting_started/00-getting-started.ipynb

+6-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616
"metadata": {},
1717
"outputs": [],
1818
"source": [
19-
"# Note: if using a Poetry virtual environment, do not run this cell\n",
20-
"%pip install semantic-kernel==1.8.0"
19+
"# Note: if using a virtual environment, do not run this cell\n",
20+
"%pip install -U semantic-kernel\n",
21+
"from semantic_kernel import __version__\n",
22+
"\n",
23+
"__version__"
2124
]
2225
},
2326
{
@@ -229,4 +232,4 @@
229232
},
230233
"nbformat": 4,
231234
"nbformat_minor": 2
232-
}
235+
}

‎python/samples/getting_started/01-basic-loading-the-kernel.ipynb

+6-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323
"metadata": {},
2424
"outputs": [],
2525
"source": [
26-
"# Note: if using a Poetry virtual environment, do not run this cell\n",
27-
"%pip install semantic-kernel==1.8.0"
26+
"# Note: if using a virtual environment, do not run this cell\n",
27+
"%pip install -U semantic-kernel\n",
28+
"from semantic_kernel import __version__\n",
29+
"\n",
30+
"__version__"
2831
]
2932
},
3033
{
@@ -196,7 +199,7 @@
196199
"name": "python",
197200
"nbconvert_exporter": "python",
198201
"pygments_lexer": "ipython3",
199-
"version": "3.12.3"
202+
"version": "3.10.12"
200203
},
201204
"polyglot_notebook": {
202205
"kernelInfo": {

‎python/samples/getting_started/02-running-prompts-from-file.ipynb

+5-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@
3434
"metadata": {},
3535
"outputs": [],
3636
"source": [
37-
"# Note: if using a Poetry virtual environment, do not run this cell\n",
38-
"%pip install semantic-kernel==1.8.0"
37+
"# Note: if using a virtual environment, do not run this cell\n",
38+
"%pip install -U semantic-kernel\n",
39+
"from semantic_kernel import __version__\n",
40+
"\n",
41+
"__version__"
3942
]
4043
},
4144
{

‎python/samples/getting_started/03-prompt-function-inline.ipynb

+5-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@
2424
"metadata": {},
2525
"outputs": [],
2626
"source": [
27-
"# Note: if using a Poetry virtual environment, do not run this cell\n",
28-
"%pip install semantic-kernel==1.8.0"
27+
"# Note: if using a virtual environment, do not run this cell\n",
28+
"%pip install -U semantic-kernel\n",
29+
"from semantic_kernel import __version__\n",
30+
"\n",
31+
"__version__"
2932
]
3033
},
3134
{

‎python/samples/getting_started/04-kernel-arguments-chat.ipynb

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@
2626
"metadata": {},
2727
"outputs": [],
2828
"source": [
29-
"# Note: if using a Poetry virtual environment, do not run this cell\n",
30-
"%pip install semantic-kernel==1.8.0"
29+
"# Note: if using a virtual environment, do not run this cell\n",
30+
"%pip install -U semantic-kernel\n",
31+
"from semantic_kernel import __version__\n",
32+
"\n",
33+
"__version__"
3134
]
3235
},
3336
{

‎python/samples/getting_started/05-using-the-planner.ipynb

+6-3
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@
3131
"metadata": {},
3232
"outputs": [],
3333
"source": [
34-
"# Note: if using a Poetry virtual environment, do not run this cell\n",
35-
"%pip install semantic-kernel==1.8.0"
34+
"# Note: if using a virtual environment, do not run this cell\n",
35+
"%pip install -U semantic-kernel\n",
36+
"from semantic_kernel import __version__\n",
37+
"\n",
38+
"__version__"
3639
]
3740
},
3841
{
@@ -583,4 +586,4 @@
583586
},
584587
"nbformat": 4,
585588
"nbformat_minor": 5
586-
}
589+
}

‎python/samples/getting_started/06-memory-and-embeddings.ipynb

+6-5
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@
3636
"metadata": {},
3737
"outputs": [],
3838
"source": [
39-
"# Note: if using a Poetry virtual environment, do not run this cell\n",
40-
"%pip install semantic-kernel==1.8.0\n",
41-
"%pip install azure-core==1.30.1\n",
42-
"%pip install azure-search-documents==11.8.0b4"
39+
"# Note: if using a virtual environment, do not run this cell\n",
40+
"%pip install -U semantic-kernel[azure]\n",
41+
"from semantic_kernel import __version__\n",
42+
"\n",
43+
"__version__"
4344
]
4445
},
4546
{
@@ -611,7 +612,7 @@
611612
"name": "python",
612613
"nbconvert_exporter": "python",
613614
"pygments_lexer": "ipython3",
614-
"version": "3.12.3"
615+
"version": "3.10.12"
615616
}
616617
},
617618
"nbformat": 4,

‎python/samples/getting_started/07-hugging-face-for-plugins.ipynb

+5-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
"metadata": {},
2121
"outputs": [],
2222
"source": [
23-
"# Note: if using a Poetry virtual environment, do not run this cell\n",
24-
"%pip install semantic-kernel[hugging_face]==1.8.0"
23+
"# Note: if using a virtual environment, do not run this cell\n",
24+
"%pip install -U semantic-kernel\n",
25+
"from semantic_kernel import __version__\n",
26+
"\n",
27+
"__version__"
2528
]
2629
},
2730
{

‎python/samples/getting_started/08-native-function-inline.ipynb

+5-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@
5454
"metadata": {},
5555
"outputs": [],
5656
"source": [
57-
"# Note: if using a Poetry virtual environment, do not run this cell\n",
58-
"%pip install semantic-kernel==1.8.0"
57+
"# Note: if using a virtual environment, do not run this cell\n",
58+
"%pip install -U semantic-kernel\n",
59+
"from semantic_kernel import __version__\n",
60+
"\n",
61+
"__version__"
5962
]
6063
},
6164
{

‎python/samples/getting_started/09-groundedness-checking.ipynb

+5-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@
3535
"metadata": {},
3636
"outputs": [],
3737
"source": [
38-
"# Note: if using a Poetry virtual environment, do not run this cell\n",
39-
"%pip install semantic-kernel==1.8.0"
38+
"# Note: if using a virtual environment, do not run this cell\n",
39+
"%pip install -U semantic-kernel\n",
40+
"from semantic_kernel import __version__\n",
41+
"\n",
42+
"__version__"
4043
]
4144
},
4245
{

‎python/samples/getting_started/10-multiple-results-per-prompt.ipynb

+6-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@
3333
"metadata": {},
3434
"outputs": [],
3535
"source": [
36-
"# Note: if using a Poetry virtual environment, do not run this cell\n",
37-
"%pip install semantic-kernel==1.8.0"
36+
"# Note: if using a virtual environment, do not run this cell\n",
37+
"%pip install -U semantic-kernel\n",
38+
"from semantic_kernel import __version__\n",
39+
"\n",
40+
"__version__"
3841
]
3942
},
4043
{
@@ -501,7 +504,7 @@
501504
"name": "python",
502505
"nbconvert_exporter": "python",
503506
"pygments_lexer": "ipython3",
504-
"version": "3.12.3"
507+
"version": "3.10.12"
505508
}
506509
},
507510
"nbformat": 4,

‎python/samples/getting_started/11-streaming-completions.ipynb

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@
2626
"metadata": {},
2727
"outputs": [],
2828
"source": [
29-
"# Note: if using a Poetry virtual environment, do not run this cell\n",
30-
"%pip install semantic-kernel==1.8.0"
29+
"# Note: if using a virtual environment, do not run this cell\n",
30+
"%pip install -U semantic-kernel\n",
31+
"from semantic_kernel import __version__\n",
32+
"\n",
33+
"__version__"
3134
]
3235
},
3336
{

‎python/samples/getting_started/third_party/weaviate-persistent-memory.ipynb

+5-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@
156156
"metadata": {},
157157
"outputs": [],
158158
"source": [
159-
"%pip install semantic-kernel[weaviate]==1.8.0"
159+
"# Note: if using a virtual environment, do not run this cell\n",
160+
"%pip install -U semantic-kernel[weaviate]\n",
161+
"from semantic_kernel import __version__\n",
162+
"\n",
163+
"__version__"
160164
]
161165
},
162166
{

‎python/semantic_kernel/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
from semantic_kernel.kernel import Kernel
44

5-
__version__ = "1.8.0"
5+
__version__ = "1.8.1"
66
__all__ = ["Kernel", "__version__"]

0 commit comments

Comments
 (0)
Please sign in to comment.