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

💡 [REQUEST] - Migrate to a modern Python stack #459

Open
1 task done
lvaylet opened this issue May 15, 2024 · 1 comment · May be fixed by #460
Open
1 task done

💡 [REQUEST] - Migrate to a modern Python stack #459

lvaylet opened this issue May 15, 2024 · 1 comment · May be fixed by #460
Assignees
Labels
ci dependencies Pull requests that update a dependency file docs documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code refactor tests Testing improvements / bugs

Comments

@lvaylet
Copy link
Collaborator

lvaylet commented May 15, 2024

Summary

Following up on issues like #432 and #456 that involve dependency management and packaging, moving to a more modern Python stack would make things a lot simple and a lot easier.

Basic Example

For example, mature tools like Poetry and Hatch support lock files for reproducibility. They can also isolate different parts of a CI pipeline in dedicated virtual environments, allowing linting and testing to have different dependencies from the default installation. Finally, they are able to publish to PyPi without twine.

Ruff is a fast and reliable drop-in replacement for packages like flake8, black, isort and pylint. And it is written in Rust! It does not replace type checkers like mypy though.

Screenshots

No response

Drawbacks

A bit of work required to migrate. Hatch is able to migrate from setuptools with hatch new --init.

Unresolved questions

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@lvaylet lvaylet added documentation Improvements or additions to documentation tests Testing improvements / bugs docs ci refactor dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels May 15, 2024
@lvaylet lvaylet self-assigned this May 15, 2024
@lvaylet lvaylet linked a pull request May 15, 2024 that will close this issue
@lvaylet
Copy link
Collaborator Author

lvaylet commented May 22, 2024

Hatch has an interesting concept with environment matrices. Compared to GitHub matrix strategies, Hatch might be able to speed up CI as a whole. For example by automatically caching pytype artifacts in .pytype/, as the different Python versions used in the matrix seem to share the checked-out codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci dependencies Pull requests that update a dependency file docs documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code refactor tests Testing improvements / bugs
1 participant