-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converts all python projects to uv (#78)
Converts all python projects from poetry to uv, with supporting /tools/makefiles/python.mk and changes to Dockerfiles.
- Loading branch information
1 parent
85942e9
commit 4c42025
Showing
103 changed files
with
584 additions
and
846 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
repo_root = $(shell git rev-parse --show-toplevel) | ||
|
||
.DEFAULT_GOAL := venv | ||
|
||
include $(repo_root)/tools/makefiles/poetry.mk | ||
include $(repo_root)/tools/makefiles/python.mk | ||
include $(repo_root)/tools/makefiles/docker-assistant.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
[tool.poetry] | ||
[project] | ||
name = "assistant" | ||
version = "0.1.0" | ||
description = "Exploration of a python Semantic Workbench OpenAI assistant to help mine artifacts for ideas." | ||
authors = ["Semantic Workbench Team"] | ||
authors = [{ name = "Semantic Workbench Team" }] | ||
readme = "README.md" | ||
packages = [{ include = "assistant" }] | ||
requires-python = ">=3.11" | ||
dependencies = [ | ||
"deepmerge>=2.0", | ||
"docx2txt>=0.8", | ||
"html2docx>=1.6.0", | ||
"markdown>=3.6", | ||
"openai>=1.3.9", | ||
"pdfplumber>=0.11.2", | ||
"tiktoken>=0.7.0", | ||
"semantic-workbench-assistant>=0.1.0", | ||
"content-safety>=0.1.0", | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "~3.11" | ||
deepmerge = "^2.0" | ||
docx2txt = "^0.8" | ||
html2docx = "^1.6.0" | ||
markdown = "^3.6" | ||
openai = "^1.3.9" | ||
pdfplumber = "^0.11.2" | ||
tiktoken = "^0.7.0" | ||
[tool.uv] | ||
package = true | ||
|
||
# If you copy this file to your project, you should verify the relative path to the following: | ||
semantic-workbench-assistant = { path = "../../libraries/python/semantic-workbench-assistant", develop = true } | ||
content-safety = { path = "../../libraries/python/content-safety/", develop = true } | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
ruff = "^0.6.4" | ||
[tool.uv.sources] | ||
semantic-workbench-assistant = { path = "../../libraries/python/semantic-workbench-assistant", editable = true } | ||
content-safety = { path = "../../libraries/python/content-safety/", editable = true } | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.2.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.pyright] | ||
exclude = ["venv", ".venv"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
repo_root = $(shell git rev-parse --show-toplevel) | ||
|
||
.DEFAULT_GOAL := venv | ||
|
||
include $(repo_root)/tools/makefiles/poetry.mk | ||
include $(repo_root)/tools/makefiles/python.mk | ||
include $(repo_root)/tools/makefiles/docker-assistant.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,33 @@ | ||
[tool.poetry] | ||
[project] | ||
name = "assistant" | ||
version = "0.1.0" | ||
description = "Exploration of a skill assistant library assistant (name to be updated)." | ||
authors = ["Semantic Workbench Team"] | ||
authors = [{ name = "Semantic Workbench Team" }] | ||
readme = "README.md" | ||
packages = [{ include = "assistant" }] | ||
requires-python = ">=3.11" | ||
dependencies = [ | ||
"azure-ai-contentsafety>=1.0.0", | ||
"azure-identity>=1.16.0", | ||
"azure-core[aio]>=1.30.0", | ||
"openai>=1.3.9", | ||
"semantic-workbench-assistant>=0.1.0", | ||
"content-safety>=0.1.0", | ||
"posix-skill>=0.1.0", | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "~3.11" | ||
azure-ai-contentsafety = "^1.0.0" | ||
azure-identity = "^1.16.0" | ||
azure-core = { version = "*", extras = ["aio"] } | ||
openai = "^1.3.9" | ||
[tool.uv] | ||
package = true | ||
dev-dependencies = ["pytest>=8.3.1", "pytest-asyncio>=0.23.8"] | ||
|
||
[tool.uv.sources] | ||
# If you copy this file to your project, you should verify the relative path to the following: | ||
semantic-workbench-assistant = { path = "../../libraries/python/semantic-workbench-assistant", develop = true } | ||
content-safety = { path = "../../libraries/python/content-safety/", develop = true } | ||
|
||
chat_driver = { path = "../../libraries/python/chat-driver", develop = true } | ||
context = { path = "../../libraries/python/context", develop = true } | ||
events = { path = "../../libraries/python/events", develop = true } | ||
|
||
posix-skill = { path = "../../libraries/python/skills/skills/posix-skill", develop = true } | ||
skill-library = { path = "../../libraries/python/skills/skill-library", develop = true } | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest = "^8.3.1" | ||
pytest-asyncio = "^0.23.8" | ||
ruff = "^0.6.4" | ||
semantic-workbench-assistant = { path = "../../libraries/python/semantic-workbench-assistant", editable = true } | ||
content-safety = { path = "../../libraries/python/content-safety/", editable = true } | ||
posix-skill = { path = "../../libraries/python/skills/skills/posix-skill", editable = true } | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.2.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.pyright] | ||
exclude = ["venv", ".venv"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,33 +20,28 @@ Recommended installers: | |
|
||
The backend service for the Semantic Workbench is written in Python. Currently we require Python 3.11. | ||
|
||
The core dependencies you need to install are: `python 3.11`, `poetry`, `make`. | ||
The core dependencies you need to install are: `uv` and `make`. | ||
|
||
`uv` will automatically install the correct version of Python for you when you run `uv sync`. | ||
|
||
Linux: | ||
|
||
sudo add-apt-repository ppa:deadsnakes/ppa | ||
sudo apt update | ||
sudo apt install python3.11 python3-pip python3-poetry python-is-python3 | ||
pip install cffi | ||
|
||
If you have other versions of python installed, make sure they are all registered with update-alternatives and ensure python 3.11 is active: | ||
|
||
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 100 | ||
sudo update-alternatives --config python3 | ||
sudo apt install pipx | ||
pipx ensurepath | ||
pipx install uv | ||
|
||
macOS: | ||
|
||
brew install [email protected] | ||
brew install poetry | ||
brew install uv | ||
brew install make | ||
|
||
Windows: | ||
|
||
winget install Python.Python.3.11 | ||
winget install ezwinports.make | ||
python -m pip install --user pipx | ||
python -m pipx ensurepath | ||
pipx install poetry | ||
pipx install uv | ||
|
||
If you haven't already, enable long file paths on Windows. | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
repo_root = $(shell git rev-parse --show-toplevel) | ||
|
||
.DEFAULT_GOAL := venv | ||
|
||
include $(repo_root)/tools/makefiles/poetry.mk | ||
include $(repo_root)/tools/makefiles/python.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.