-
Notifications
You must be signed in to change notification settings - Fork 5
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
👷♻️ Use hatch as build backend #204
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🧹 Remove duplicate doc dependency 🧹 Use pinned requiremets for docs as well
In some shells (e.g. zsh) opening and closing square backets have a special meaning, thus actionlint throws an error (on linux only)
Codecov ReportPatch has no changes to coverable lines.
📢 Thoughts on this report? Let us know!. |
jsnel
approved these changes
Sep 9, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvements, thanks!
s-weigand
added a commit
that referenced
this pull request
Sep 15, 2023
[Hatch](https://github.com/pypa/hatch) is the new modern python build system which out of the box comes with a package-aware venv setup system (`hatch shell` will set up the dev env). The package is fully configured via `pyproject.toml` eliminating the need for husk only `setup.py` and the `setup.cfg` which were needed for the old `setuptools` way of installing. One of the main advantages of this change is that `hatch` by default uses `.pth` files for editable installs which [are needed for proper static analysis and auto-completion by tools like pylance](https://github.com/microsoft/pylance-release/blob/main/TROUBLESHOOTING.md#common-questions-and-issues) (vscode). While there is a [workaround for `setuptools`](https://setuptools.pypa.io/en/latest/userguide/development_mode.html#legacy-behavior) (`pip install -e . --config-settings editable_mode=compat`) that workaround is due to deprecation, so it is best to switch now. During this refactoring of the build system the documentation file format was changed from `reStructuredText` to [myst parser](https://myst-parser.readthedocs.io/en/latest/) flavored markdown using [`rst2myst`](https://rst-to-myst.readthedocs.io/en/latest/). This gives us the full `rst` power as opt-in without needing to always deal `rst`. **Note:** For the development of `pyglotaran` **AND** `pyglotaran-extras` at the same time (side by side), one should still use a common environment (e.g. conda env) with `pip install -e .` instead of `hatch shell`. But `hatch shell` is a convenient way to develop against the latest stable version of `pyglotaran` without creating a dedicated global env. ### Change summary - [👷 Use hatch as build backend](f117a43) - [🧹 Cleanup old installation residuals](5107828) - [📚👌 Convert docs from RST to MD](eca6588)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hatch is the new modern python build system which out of the box comes with a package-aware venv setup system (
hatch shell
will set up the dev env).The package is fully configured via
pyproject.toml
eliminating the need for husk onlysetup.py
and thesetup.cfg
which were needed for the oldsetuptools
way of installing.One of the main advantages of this change is that
hatch
by default uses.pth
files for editable installs which are needed for proper static analysis and auto-completion by tools like pylance (vscode).While there is a workaround for
setuptools
(pip install -e . --config-settings editable_mode=compat
) that workaround is due to deprecation, so it is best to switch now.During this refactoring of the build system, I also changed the documentation file format from
reStructuredText
to myst parser flavored markdown usingrst2myst
.This gives us the full
rst
power as opt-in without needing to always dealrst
.Note:
For the development of
pyglotaran
ANDpyglotaran-extras
at the same time (side by side), one should still use a common environment (e.g. conda env) withpip install -e .
instead ofhatch shell
. Buthatch shell
is a convenient way to develop against the latest stable version ofpyglotaran
without creating a dedicated global env.Change summary
Checklist