Skip to content

Commit a0c330e

Browse files
committed
feat: migration to uv and initial structure setup for sub packages from core
1 parent 97fb35c commit a0c330e

File tree

48 files changed

+2274
-3114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2274
-3114
lines changed

.editorconfig

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
root = true
2+
3+
# All files
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
# Python files
11+
[*.py]
12+
indent_style = space
13+
indent_size = 4
14+
15+
# YAML files - maintain 2-space indentation
16+
[*.{yaml,yml}]
17+
indent_style = space
18+
indent_size = 2
19+
20+
# JSON files
21+
[*.json]
22+
indent_style = space
23+
indent_size = 2
24+
25+
# Markdown files
26+
[*.md]
27+
trim_trailing_whitespace = false
28+
indent_style = space
29+
indent_size = 2
30+
31+
# Toml files
32+
[*.toml]
33+
indent_style = space
34+
indent_size = 2
35+
36+
# GitHub Actions workflows
37+
[.github/workflows/*.{yaml,yml}]
38+
indent_style = space
39+
indent_size = 2

.github/actions/setup-poetry/action.yaml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/build-python.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ jobs:
1818
with:
1919
python-version: ${{ matrix.python }}
2020

21-
- name: Set up Poetry
22-
uses: ./.github/actions/setup-poetry
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v5
2323

2424
- name: Install dependencies
25-
run: poetry install --no-interaction
25+
run: uv sync
2626

2727
- name: pytest + coverage
2828
shell: bash
2929
run: |
3030
set -o pipefail
3131
pipx install algokit
3232
algokit localnet start
33-
poetry run pytest -n auto --junitxml=pytest-junit.xml --cov-report=term-missing:skip-covered --cov=src | tee pytest-coverage.txt
33+
uv run pytest -n auto --junitxml=pytest-junit.xml --cov-report=term-missing:skip-covered --cov=src | tee pytest-coverage.txt
3434
algokit localnet stop
3535
3636
- name: pytest coverage comment - using Python 3.10 on ubuntu-latest
@@ -42,4 +42,4 @@ jobs:
4242
junitxml-path: ./pytest-junit.xml
4343

4444
- name: Build Wheel
45-
run: poetry build --format wheel
45+
run: uv build

.github/workflows/cd.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,11 @@ jobs:
5454
fetch-depth: 0
5555
token: ${{ steps.app_token.outputs.token }}
5656

57-
- name: Set up Python
58-
uses: actions/setup-python@v5
59-
with:
60-
python-version: "3.10"
61-
62-
- name: Set up Poetry
63-
uses: ./.github/actions/setup-poetry
57+
- name: Install uv
58+
uses: astral-sh/setup-uv@v5
6459

6560
- name: Install dependencies
66-
run: poetry install --no-interaction --no-root
61+
run: uv sync
6762

6863
- name: Get branch name
6964
shell: bash
@@ -76,13 +71,13 @@ jobs:
7671
- name: Create Continuous Deployment - Beta (non-prod)
7772
if: steps.get_branch.outputs.branch == 'main' && !inputs.production_release
7873
run: |
79-
poetry run semantic-release \
74+
uv run semantic-release \
8075
-v DEBUG \
8176
--prerelease \
8277
--define=branch=main \
8378
--define=upload_to_repository=true \
8479
publish
85-
gh release edit --prerelease "v$(poetry run semantic-release print-version --current)"
80+
gh release edit --prerelease "v$(uv run semantic-release print-version --current)"
8681
env:
8782
GH_TOKEN: ${{ steps.app_token.outputs.token }}
8883
REPOSITORY_USERNAME: __token__
@@ -91,7 +86,7 @@ jobs:
9186
- name: Create Continuous Deployment - Production
9287
if: steps.get_branch.outputs.branch == 'main' && inputs.production_release
9388
run: |
94-
poetry run semantic-release \
89+
uv run semantic-release \
9590
-v DEBUG \
9691
--define=version_source="commit" \
9792
--define=patch_without_tag=true \

.github/workflows/check-docs.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
with:
1616
python-version: "3.12"
1717

18-
- name: Set up Poetry
19-
uses: ./.github/actions/setup-poetry
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
2020

2121
- name: Install dependencies
22-
run: poetry install --no-interaction --no-root
22+
run: uv sync
2323

2424
- name: Check docstrings are up to date
25-
run: poetry run poe docstrings-check
25+
run: uv run poe docstrings-check
2626

2727
- name: Check docs are up to date
2828
run: |
29-
poetry run poe docs-md-only
29+
uv run poe docs-md-only
3030
git diff --exit-code ':!docs/markdown/autoapi/index.md' ':!docs/markdown/autoapi/algokit_utils/applications/app_factory/index.md' docs

.github/workflows/check-python.yaml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,23 @@ jobs:
1515
with:
1616
python-version: "3.10"
1717

18-
- name: Set up Poetry
19-
uses: ./.github/actions/setup-poetry
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
2020

2121
- name: Install dependencies
22-
run: poetry install --no-interaction --no-root
22+
run: uv sync
2323

2424
- name: Audit with pip-audit
2525
run: |
2626
# GHSA-4xh5-x5gv-qwph is safe to ignore since we are using a python version that is not affected
2727
# can remove once pip has fix
28-
# audit non dev dependencies, no exclusions
29-
poetry export --without=dev > requirements.txt && poetry run pip-audit -r requirements.txt --ignore-vuln GHSA-4xh5-x5gv-qwph
30-
31-
# audit all dependencies, with exclusions.
28+
# Audit all installed dependencies with exclusions
3229
# If a vulnerability is found in a dev dependency without an available fix,
3330
# it can be temporarily ignored by adding --ignore-vuln e.g.
3431
# --ignore-vuln "GHSA-hcpj-qp55-gfph" # GitPython vulnerability, dev only dependency
35-
poetry run pip-audit --ignore-vuln GHSA-4xh5-x5gv-qwph
32+
uv run pip-audit --ignore-vuln GHSA-4xh5-x5gv-qwph
3633
37-
- name: Check formatting with Ruff
34+
- name: Check codebase with ruff and mypy
3835
run: |
3936
# stop the build if there are files that don't meet formatting requirements
40-
poetry run ruff format --check .
41-
42-
- name: Check linting with Ruff
43-
run: |
44-
# stop the build if there are Python syntax errors or undefined names
45-
poetry run ruff check .
46-
47-
- name: Check types with mypy
48-
run: poetry run mypy
37+
uv run poe lint

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,7 @@ cython_debug/
173173

174174
# Received approval test files
175175
*.received.*
176+
177+
.references/
178+
179+
*.xml

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
- id: ruff-format
55
name: ruff-format
66
description: "Run 'ruff format' for extremely fast Python formatting"
7-
entry: poetry run ruff format
7+
entry: uv run ruff format
88
language: system
99
types: [python]
1010
args: []
@@ -15,7 +15,7 @@ repos:
1515
- id: ruff
1616
name: ruff
1717
description: "Run 'ruff' for extremely fast Python linting"
18-
entry: poetry run ruff check
18+
entry: uv run ruff check
1919
language: system
2020
"types": [python]
2121
args: [--fix]
@@ -27,7 +27,7 @@ repos:
2727
- id: mypy
2828
name: mypy
2929
description: "`mypy` will check Python types for correctness"
30-
entry: poetry run mypy
30+
entry: uv run mypy
3131
language: system
3232
types_or: [python, pyi]
3333
require_serial: true
@@ -38,7 +38,7 @@ repos:
3838
- id: docstrings-check
3939
name: docstrings-check
4040
description: "Check docstrings for correctness"
41-
entry: poetry run poe docstrings-check
41+
entry: uv run poe docstrings-check
4242
language: system
4343
types: [python]
4444
files: "^(src)/"

.vscode/settings.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,11 @@
1919
// Python
2020
"platformSettings.autoLoad": true,
2121
"python.defaultInterpreterPath": "${workspaceFolder}/.venv",
22-
"python.analysis.extraPaths": [
23-
"${workspaceFolder}/src"
24-
],
2522
"[python]": {
2623
"editor.defaultFormatter": "charliermarsh.ruff"
2724
},
28-
"python.analysis.exclude": [
29-
"tests/artifacts/**"
30-
],
31-
"python.analysis.typeCheckingMode": "basic",
3225
"ruff.enable": true,
33-
"ruff.lint.run": "onSave",
34-
"ruff.lint.args": [
35-
"--config=pyproject.toml"
36-
],
26+
"ruff.configuration": "pyproject.toml",
3727
"ruff.importStrategy": "fromEnvironment",
3828
"ruff.fixAll": true, //lint and fix all files in workspace
3929
"ruff.organizeImports": true, //organize imports on save
@@ -57,7 +47,5 @@
5747
}
5848
]
5949
},
60-
"python.testing.pytestArgs": [
61-
"."
62-
],
50+
"python.testing.pytestArgs": ["tests"]
6351
}

docs/markdown/autoapi/algokit_utils/applications/enums/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
## Module Contents
1111

12-
### *class* algokit_utils.applications.enums.OnSchemaBreak(\*args, \*\*kwds)
12+
### *class* algokit_utils.applications.enums.OnSchemaBreak
1313

1414
Bases: `enum.Enum`
1515

@@ -27,7 +27,7 @@ Create a new Application and delete the old Application in a single transaction
2727

2828
Create a new Application
2929

30-
### *class* algokit_utils.applications.enums.OnUpdate(\*args, \*\*kwds)
30+
### *class* algokit_utils.applications.enums.OnUpdate
3131

3232
Bases: `enum.Enum`
3333

@@ -49,7 +49,7 @@ Create a new Application and delete the old Application in a single transaction
4949

5050
Create a new application
5151

52-
### *class* algokit_utils.applications.enums.OperationPerformed(\*args, \*\*kwds)
52+
### *class* algokit_utils.applications.enums.OperationPerformed
5353

5454
Bases: `enum.Enum`
5555

0 commit comments

Comments
 (0)