Use pyproject and remove setup.py#188
Conversation
| clean: | ||
| rm -f locale/*/LC_MESSAGES/*.mo | ||
| rm -f src/bagit/locale/*/LC_MESSAGES/*.mo | ||
|
|
There was a problem hiding this comment.
The gettext files have been moved down into src.
| description = "Create and validate BagIt packages" | ||
| readme = {file = "README.rst", content-type = "text/x-rst"} | ||
| authors = [ | ||
| { name = "Ed Summers", email = "ehs@pobox.com" }, |
There was a problem hiding this comment.
Andy wrote much of the original code, and Chris has added to it since I last touched it, so this seems right?
There was a problem hiding this comment.
I guess that's an interesting question: do we try to list everyone who's made significant contributions in the past, or only the people who want to get emails when someone needs help?
There was a problem hiding this comment.
Yeah, good point -- maybe just you and me at this point? I guess things are busy at the fruit store for Mr Boyko...
Or perhaps just you, since I don't have rights to this repository anymore. I remain interested though!
| [tool.ruff] | ||
| target-version = "py38" | ||
|
|
||
|
|
There was a problem hiding this comment.
hatch-vcs seems like it is doing this work now when i do a uv build?
| line_length = 110 | ||
| default_section = "THIRDPARTY" | ||
| known_first_party = "bagit" | ||
|
|
There was a problem hiding this comment.
Switching to using pytest to run the tests...
| "src/bagit/locale/*.mo", | ||
| ] | ||
|
|
||
|
|
There was a problem hiding this comment.
Adding these here means that ruff will ensure they are available when running tests.
There was a problem hiding this comment.
I believe that bagit.py is v1.0 compliant. At least there haven't been any complaints that it isn't?
There was a problem hiding this comment.
I haven't heard any arguments otherwise. It's been a long time since I worked through that RFC and https://github.com/LibraryOfCongress/bagit-conformance-suite
| @@ -1481,10 +1481,7 @@ def _make_parser(): | |||
|
|
|||
| checksum_args = parser.add_argument_group( | |||
| _("Checksum Algorithms"), | |||
| _( | |||
There was a problem hiding this comment.
This was a formatting change that my local ruff suggested. I'm not sure why CI didn't care too...
74d1545 to
9ba473a
Compare
This commit includes changes to remove the use of setup.py and setuptools in favor of using the existing pyrproject.toml and hatch. A source layout was chosen, which required several changes such as: - pushing bagit.py into src/bagit/ - pushing locale into src/bagit/locale The gettext related code in setup.py was relocated to utils/locales.py It's possible the way that the gettext functionality is setup needs to adjustment, as I'm new to using it. Also we now rely on running tests with uv and pytest, which happens in the test github action. We could chose to update the PyPI publishing step to use uv build/publish too?
This commit includes changes to remove the use of setup.py and setuptools in favor of using the existing pyproject.toml and hatch.
A source layout was chosen, which required several changes such as:
The gettext related code in setup.py was relocated to utils/locales.py It's very possible the way that the gettext functionality is setup needs some adjustment, as I'm new to using it.
Also we now rely on running tests with uv and pytest, which happens in the test github action. We could chose to update the PyPI publishing step to use uv build/publish too?