Skip to content

feat: migrate from poetry to uv - support upcoming uv-first algokit version#112

Open
aorumbayev wants to merge 7 commits intoprep/beta-releasefrom
feat/uv-as-default
Open

feat: migrate from poetry to uv - support upcoming uv-first algokit version#112
aorumbayev wants to merge 7 commits intoprep/beta-releasefrom
feat/uv-as-default

Conversation

@aorumbayev
Copy link
Collaborator

@aorumbayev aorumbayev commented Mar 12, 2026

Proposed Changes

Follow up to algorandfoundation/algokit-cli#712

  • Migrate entire template from Poetry to uv as the sole Python package manager, dropping all Poetry support (pyproject.toml format, poetry.toml, poetry.lock, poetry run commands)
  • Remove the TypeScript deployer templatization option entirely — the deployment_language and use_typescript_jest copier questions, all TS deployer/jest template files, generated TS examples, and every related conditional across .algokit.toml, __main__.py, README, VSCode/JetBrains configs, and tests have been deleted. The Python template now only generates Python deployment code.
  • Cap requires-python to >=3.12,<3.14 to avoid coincurve sdist build failures (no cp314 wheels yet, upstream algorand-python-testing dependency) - Needs to be bumped on https://github.com/algorandfoundation/algorand-python-testing/tree/refactor/util-v5
  • Bump min_version to v2.11.0 so older AlgoKit CLIs warn users to upgrade before attempting uv-based workflows
  • Update CI/CD workflow templates to use astral-sh/setup-uv@v5 and uv tool install algokit instead of pipx/Poetry
  • Regenerate all example directories via test suite against algokit-cli decoupling branch

@p2arthur
Copy link

p2arthur commented Mar 13, 2026

Can we change the target branch from decoupling/remove-algosdk to the prep/beta-release #111

@aorumbayev
Copy link
Collaborator Author

@p2arthur whats the purpose of prep/beta-release - the decoupling/remove-algosdk was this repo's 'decoupling/alpha' branch - does prep/beta-release contain the changes from ? decoupling/remove-algosdk. If yes we should close the decoupling/remove-algosdk remove it and ill retarget this pr against prep/beta-release

@p2arthur
Copy link

p2arthur commented Mar 16, 2026

@aorumbayev Yeah, it is the decoupling/remove-algosdk with fixes on ESM compatibility. On the prep/beta-release the generated typescript templates are ESM first now 😄

@aorumbayev aorumbayev changed the base branch from decoupling/remove-algosdk to prep/beta-release March 16, 2026 14:06
- Convert pyproject.toml from Poetry to uv/hatchling build system
- Replace poetry.lock with uv.lock
- Remove poetry.toml configuration
- Add [tool.uv] and [tool.hatch.metadata] sections
- Rewrite pyproject.toml.jinja from Poetry to uv/hatchling format
- Cap requires-python to >=3.12,<3.14 (coincurve lacks 3.14 wheels)
- Replace all 'poetry run' with 'uv run' in .algokit.toml.jinja
- Bump min_version to v2.11.0 (old CLIs warn on version mismatch)
- Simplify audit description (remove poetry-plugin-export reference)
- Update CI/CD templates: astral-sh/setup-uv@v5, uv tool install algokit
- Update pre-commit hooks: poetry run -> uv run
- Update README.md.jinja: uv install guide, version references
- Delete template_content/poetry.toml
- Update PY_PKG_MGR_ARGS from poetry to uv in both test files
- Tests now configure generated projects to use uv as package manager
Auto-regenerated by running test_templates.py and test_generators.py
against the updated template with algokit-cli decoupling branch.

Changes across all examples:
- .algokit.toml: min_version v2.11.0, poetry run -> uv run
- pyproject.toml: Poetry format -> uv/hatchling with [project],
  [dependency-groups], [tool.hatch.metadata], [tool.uv]
- README.md: Poetry -> uv install guide and tool references
- poetry.toml: deleted
- uv.lock: added (replaces Poetry lock)

Production examples additionally:
- .pre-commit-config.yaml: poetry run -> uv run
- CI/CD workflows: astral-sh/setup-uv@v5, uv tool install algokit
- Add npm install step in check_codebase for TypeScript deployment
  projects (package.json present) to install @algorandfoundation/
  algokit-client-generator before build
- Patch jest.config.ts at test time to handle ESM node_modules:
  extend transform to cover .js files and add transformIgnorePatterns
  for @noble/hashes and @algorandfoundation packages (upstream
  generator template produces config without ESM support)

All 6 tests now pass: 2 template + 4 generator (python+typescript × starter+production)
The Python template no longer offers TypeScript as a deployment language.
All TS deployer files, TS jest test scaffolding, generated TS examples,
and the deployment_language/use_typescript_jest copier questions have been
removed. The template now generates Python-only deployer code.
@aorumbayev
Copy link
Collaborator Author

@p2arthur @lempira rebased against Arthur's branch, original PR from Neil is closed, the last commit also removes typescript templatization option completely in favor of dedicated typescript template - feel free to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants