-
Notifications
You must be signed in to change notification settings - Fork 91
Use pyproject and remove setup.py #188
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ dist | |
MANIFEST | ||
bagit.egg-info | ||
.idea | ||
uv.lock | ||
*.log |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
[build-system] | ||
requires = ["setuptools>=64", "setuptools-scm>=8"] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["hatchling", "hatch-vcs"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "bagit" | ||
dynamic = ["version"] | ||
description = "Create and validate BagIt packages" | ||
readme = {file = "README.rst", content-type = "text/x-rst"} | ||
authors = [ | ||
{ name = "Ed Summers", email = "[email protected]" }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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! |
||
{ name = "Chris Adams", email = "[email protected]" }, | ||
{ name = "Ed Summers", email = "[email protected]" } | ||
] | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
|
@@ -18,6 +19,10 @@ classifiers = [ | |
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: System :: Filesystems", | ||
] | ||
requires-python = ">= 3.9" | ||
|
||
[project.scripts] | ||
"bagit" = "bagit:main" | ||
|
||
[project.urls] | ||
Homepage = "https://libraryofcongress.github.io/bagit-python/" | ||
|
@@ -27,14 +32,34 @@ Homepage = "https://libraryofcongress.github.io/bagit-python/" | |
[tool.ruff] | ||
target-version = "py38" | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hatch-vcs seems like it is doing this work now when i do a |
||
[tool.setuptools_scm] | ||
|
||
[tool.isort] | ||
line_length = 110 | ||
default_section = "THIRDPARTY" | ||
known_first_party = "bagit" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Switching to using pytest to run the tests... |
||
[tool.pytest.ini_options] | ||
testpaths = ["test.py"] | ||
addopts = "-v" | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
include = "bagit.py" | ||
include = "src" | ||
|
||
[tool.hatch.version] | ||
source = "vcs" | ||
|
||
[tool.hatch.build.targets.sdist] | ||
packages = ["src/bagit"] | ||
include = [ | ||
"src/bagit/*.py", | ||
"src/bagit/locale/*.po", | ||
"src/bagit/locale/*.mo", | ||
] | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding these here means that ruff will ensure they are available when running tests. |
||
[dependency-groups] | ||
dev = [ | ||
"coverage>=7.8.2", | ||
"pytest>=8.4.0", | ||
"ruff>=0.11.12", | ||
] |
This file was deleted.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -240,7 +240,7 @@ def make_bag( | |
) | ||
|
||
LOGGER.info(_("Creating bagit.txt")) | ||
txt = """BagIt-Version: 0.97\nTag-File-Character-Encoding: UTF-8\n""" | ||
txt = """BagIt-Version: 1.0\nTag-File-Character-Encoding: UTF-8\n""" | ||
with open_text_file("bagit.txt", "w") as bagit_file: | ||
bagit_file.write(txt) | ||
|
||
|
@@ -1479,10 +1479,7 @@ def _make_parser(): | |
|
||
checksum_args = parser.add_argument_group( | ||
_("Checksum Algorithms"), | ||
_( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a formatting change that my local ruff suggested. I'm not sure why CI didn't care too... |
||
"Select the manifest algorithms to be used when creating bags" | ||
" (default=%s)" | ||
) | ||
_("Select the manifest algorithms to be used when creating bags (default=%s)") | ||
% ", ".join(DEFAULT_CHECKSUMS), | ||
) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2018-06-26 10:28-0400\n" | ||
"POT-Creation-Date: 2025-06-05 12:14-0400\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -226,20 +226,23 @@ msgid "" | |
"%(found_byte_count)d bytes" | ||
msgstr "" | ||
|
||
msgid "Bag validation failed" | ||
msgid "Bag is incomplete" | ||
msgstr "" | ||
|
||
#, python-format | ||
msgid "Unable to calculate file hashes for %s" | ||
msgstr "" | ||
|
||
msgid "Bag validation failed" | ||
msgstr "" | ||
|
||
msgid "bagit.txt must not contain a byte-order mark" | ||
msgstr "" | ||
|
||
#, python-format | ||
msgid "" | ||
"%(path)s %(algorithm)s validation failed: expected=\"%(expected)s\" found=" | ||
"\"%(found)s\"" | ||
"%(path)s %(algorithm)s validation failed: expected=\"%(expected)s\" " | ||
"found=\"%(found)s\"" | ||
msgstr "" | ||
|
||
#, python-format | ||
|
@@ -345,16 +348,23 @@ msgstr "" | |
msgid "bagit-python version %s" | ||
msgstr "" | ||
|
||
msgid "The number of processes must be 0 or greater" | ||
msgid "The number of processes must be greater than 0" | ||
msgstr "" | ||
|
||
msgid "--fast is only allowed as an option for --validate!" | ||
msgstr "" | ||
|
||
msgid "--completeness-only is only allowed as an option for --validate!" | ||
msgstr "" | ||
|
||
#, python-format | ||
msgid "%s valid according to Payload-Oxum" | ||
msgstr "" | ||
|
||
#, python-format | ||
msgid "%s is complete and valid according to Payload-Oxum" | ||
msgstr "" | ||
|
||
#, python-format | ||
msgid "%s is valid" | ||
msgstr "" | ||
|
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.
The gettext files have been moved down into src.