Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider modernizing build system to use hatch or uv #1366

Closed
tleonhardt opened this issue Nov 3, 2024 · 5 comments · Fixed by #1375
Closed

Consider modernizing build system to use hatch or uv #1366

tleonhardt opened this issue Nov 3, 2024 · 5 comments · Fixed by #1375

Comments

@tleonhardt
Copy link
Member

There are several more advanced build system tools which are worth exploring. The current default recommendation from python seems to be hatch. It has impressive features including declaring build/test configurations and managing venv environments. @anselor tried hatch on a couple small projects and found it to be much faster than using nox to set up venvs. The problem is it currently doesn't support a monorepo project with multiple modules or plugin modules. There is a development ticket (pypa/hatch#233) that documents it and it is under active development now. Once that is complete we should be able to migrate to hatch with minimal fuss.

A newer alternative that is taking the Python world by storm is uv which is an extremely fast Python package and project manager, written in Rust. uv is a single tool to replace pip, pip-tools, pipx, poetry, pyenv, virtualenv, pipenv and more. I've used this at work to replace pip in some builds and it has typically sped things up by a factor of 2x.

@tleonhardt
Copy link
Member Author

#1367 added support for uv venvs.
#1368 fixed a few bugs with that above

uv virtual envs are now working great for cmd2 development on both the master and 3.0.0 branches.

@tleonhardt
Copy link
Member Author

tleonhardt commented Nov 3, 2024

TODO:

  • Replace use of nox in GitHub Action pytest runs with uv
  • Remove use of nox in tasks.py
  • Remove dependency on nox
  • Update CONTRIBUTING.md with invo on how to use uv for cmd2 development

@tleonhardt
Copy link
Member Author

#1370 Replaces the use of nox in GithHub Action pytest runs with uv, removes nox from tasks.py and removes the dependency on nox

@tleonhardt
Copy link
Member Author

#1375 Updates the Contributing Guide with info on how to use uv for cmd2 development

@tleonhardt
Copy link
Member Author

I was initially planning on replacing the use of twine with uv publish, but that feature of uv is experimental and subject to change in backwards incompatible ways, so that would be premature at this time.

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 a pull request may close this issue.

1 participant