Open willingc opened 10 months ago
I would love assistance with such a how-to document!
best practice for specifying optional dependencies and environments
https://hatch.pypa.io/latest/config/environment/overview/#features
the purpose of templates
Environment templates just make it easy to have a base environment that you can change in minor ways. For example, locally you would most likely want to use editable installs whereas in CI you might like to test a real installation like a user would experience. In this case you can have a separate environment that just disables dev mode.
There is also https://hatch.pypa.io/latest/meta/faq/#tool-migration
Hi @ofek, I've been playing around this week with migrating nteract's papermill project to using hatch as a replacement for setuptools and tox. I really think hatch would simplify the dev experience by removing tox and some of the tool config files. I've been walking through these steps:
pyproject.toml creation
pyproject.toml
withhatch new --init
hatch build
to see what errorspyproject.toml
fields for version location, license SPDX, dependency that had an inline comment (remove the comment which came over as part of the dependency string), dependency (remove-r ../requirements.txt
)hatch build
and see the sdist and wheel in the dist directory.Migrate tox config to hatch scripts
Update ci to use hatch scripts
One challenge that I am running across is the best practice for specifying optional dependencies and environments as well as the purpose of templates.
Happy to turn this into a how to doc once we fully migrate.