https://bugzilla.redhat.com/show_bug.cgi?id=2255786
Bug ID: 2255786 Summary: Review Request: python-argparse-dataclass - Declarative CLIs with argparse and dataclasses Product: Fedora Version: rawhide Hardware: All OS: Linux Status: NEW Component: Package Review Severity: medium Priority: medium Assignee: nobody@fedoraproject.org Reporter: code@musicinmybrain.net QA Contact: extras-qa@fedoraproject.org CC: package-review@lists.fedoraproject.org Target Milestone: --- Classification: Fedora
Spec URL: https://music.fedorapeople.org/python-argparse-dataclass.spec SRPM URL: https://music.fedorapeople.org/python-argparse-dataclass-2.0.0-1.fc39.src.rp...
Description:
Declarative CLIs with argparse and dataclasses.
Fedora Account System Username: music
Koji scratch builds:
F40: https://koji.fedoraproject.org/koji/taskinfo?taskID=110809443 F39: https://koji.fedoraproject.org/koji/taskinfo?taskID=110809449 F38: https://koji.fedoraproject.org/koji/taskinfo?taskID=110809451
This is a dependency for python-snakemake-interface-common (https://pypi.org/project/snakemake-interface-common/), which in turn is a new dependency for snakemake 8.0. It will be a neuro-sig package.
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
Ben Beasley code@musicinmybrain.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Doc Type|--- |If docs needed, set a value Whiteboard| |Trivial Blocks| |1276941 | |(fedora-neuro,NeuroFedora), | |2255578
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1276941 [Bug 1276941] Fedora NeuroImaging and NeuroScience tracking bug https://bugzilla.redhat.com/show_bug.cgi?id=2255578 [Bug 2255578] snakemake-8.0.1 is available
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
Ben Beasley code@musicinmybrain.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends On| |2255788
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=2255788 [Bug 2255788] Review Request: python-snakemake-interface-common - Common functions and classes for Snakemake and its plugins
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #1 from Fedora Review Service fedora-review-bot@fedoraproject.org --- Copr build: https://copr.fedorainfracloud.org/coprs/build/6813958 (succeeded)
Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-rev...
Please take a look if any issues were found.
--- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service
If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
Sandro gui1ty@penguinpee.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gui1ty@penguinpee.nl
--- Comment #2 from Sandro gui1ty@penguinpee.nl --- My first thought glancing over the spec file:
# We use the GitHub archive instead of the PyPI sdist to get CHANGELOG.md and # the tests. Source: %{url}/archive/%{version}/argparse_dataclass-%{version}.tar.gz
Doesn't that scream `%forgesource`, pretty please with sugar on top?
It would also let you do away with `%autosetup -n argparse_dataclass-%{version}` in favor of `%forgeautosetup`.
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #3 from Ben Beasley code@musicinmybrain.net --- (In reply to Sandro from comment #2)
My first thought glancing over the spec file:
# We use the GitHub archive instead of the PyPI sdist to get CHANGELOG.md and # the tests. Source: %{url}/archive/%{version}/argparse_dataclass-%{version}.tar.gz
Doesn't that scream `%forgesource`, pretty please with sugar on top?
You know, I personally find that it’s not worth defining %forgeurl and adding %forgemeta just to simplify the source URL and avoid writing out the extraction directory name for %autosetup. There is just as much noise added to the spec file as is removed, and at the cost of an extra layer of indirection. I do find the forge macros can be worth it for forges with much less straightforward URL schemes (GitLab), and perhaps when frequently alternating between snapshots and proper releases.
I’m not opposed to the general NeuroFedora habit of adding forge macros or to working on packages that use them. I just don’t *personally* find that they add much in straightforward cases like this.
It would also let you do away with `%autosetup -n argparse_dataclass-%{version}` in favor of `%forgeautosetup`.
On the other hand, considering the comments in
https://git.sr.ht/~gotmax23/forge-srpm-macros/tree/354ce4a51e80f6d524084d496...
about possibly removing %forgeautosetup in the future, this is probably better written as
%autosetup %{forgesetupargs}
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #4 from Sandro gui1ty@penguinpee.nl --- (In reply to Ben Beasley from comment #3)
(In reply to Sandro from comment #2)
My first thought glancing over the spec file:
# We use the GitHub archive instead of the PyPI sdist to get CHANGELOG.md and # the tests. Source: %{url}/archive/%{version}/argparse_dataclass-%{version}.tar.gz
Doesn't that scream `%forgesource`, pretty please with sugar on top?
You know, I personally find that it’s not worth defining %forgeurl and adding %forgemeta just to simplify the source URL and avoid writing out the extraction directory name for %autosetup. There is just as much noise added to the spec file as is removed, and at the cost of an extra layer of indirection. I do find the forge macros can be worth it for forges with much less straightforward URL schemes (GitLab), and perhaps when frequently alternating between snapshots and proper releases.
I’m not opposed to the general NeuroFedora habit of adding forge macros or to working on packages that use them. I just don’t *personally* find that they add much in straightforward cases like this.
I guess this boils down to a matter of personal preferences. I quite like just throwing the URL in the spec and maybe a tag and let the forge macros do their magic. If needed, a `-v` or `rpmspec --parse` will let me peek under the hood.
I promise I'll try being a bit less noisy when it comes to forge macros next year. ;)
It would also let you do away with `%autosetup -n argparse_dataclass-%{version}` in favor of `%forgeautosetup`.
On the other hand, considering the comments in
https://git.sr.ht/~gotmax23/forge-srpm-macros/tree/ 354ce4a51e80f6d524084d49612d77e69336cb71/item/rpm/macros.d/macros.forge#L65
about possibly removing %forgeautosetup in the future, this is probably better written as
%autosetup %{forgesetupargs}
Ouch! I don't like the look of that. The comment reads "this will probably be removed since it is unsafe in presence of multiple sources". Assuming `%autosetup` is safe in presence of multiple sources. How can `%forgeautosetup` be unsafe in the same situation? It already calls `%autosetup %{forgesetupargs}` under the hood.
On a different note, I find it amusing that people actually scroll through the code for information / documentation. I had a PR on one of my packages a couple of days ago, fixing an issue with `%forgesource` being wrong for a GitHub project that did not have it's version munged (tag == version). I was pointed to a comment in the source code, explaining the issue.
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
Sandro gui1ty@penguinpee.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |POST Assignee|nobody@fedoraproject.org |gui1ty@penguinpee.nl Flags| |fedora-review+
--- Comment #5 from Sandro gui1ty@penguinpee.nl --- Notes =====
[x]: Package is named according to the Package Naming Guidelines.
=> While the package name is correct, it is unfortunate that it clashes with `python-argparse`, making this package look like a sub package of the former.
[-]: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it.
=> This could be your first package using the `-l` flag for `%pyproject_save_files`. I know the f38 update is still pending. But it should get there before the package is pushed to f38.
Package is APPROVED.
Package Review ==============
Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed
===== MUST items =====
Generic: [x]: Package successfully compiles and builds into binary rpms on at least one supported primary architecture. [x]: Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines. [x]: License field in the package spec file matches the actual license. [x]: Package contains no bundled libraries without FPC exception. [x]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [-]: Package contains desktop file if it is a GUI application. [-]: Development files must be in a -devel package [x]: Package uses nothing in %doc for runtime. [x]: Package consistently uses macros (instead of hard-coded directory names). [x]: Package is named according to the Package Naming Guidelines. [x]: Package does not generate any conflict. [x]: Package obeys FHS, except libexecdir and /usr/target. [-]: If the package is a rename of another package, proper Obsoletes and Provides are present. [x]: Requires correct, justified where necessary. [x]: Spec file is legible and written in American English. [-]: Package contains systemd file(s) if in need. [x]: Package is not known to require an ExcludeArch tag. [-]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 15416 bytes in 2 files. [x]: Package complies to the Packaging Guidelines [x]: Package installs properly. [x]: Rpmlint is run on all rpms the build produces. Note: No rpmlint messages. [x]: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package is included in %license. [x]: The License field must be a valid SPDX expression. [x]: Package requires other packages for directories it uses. [x]: Package must own all directories that it creates. [x]: Package does not own files or directories owned by other packages. [x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT [x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the beginning of %install. [x]: Macros in Summary, %description expandable at SRPM build time. [x]: Dist tag is present. [x]: Package does not contain duplicates in %files. [x]: Permissions on files are set properly. [x]: Package must not depend on deprecated() packages. [x]: Package use %makeinstall only when make install DESTDIR=... doesn't work. [x]: Package is named using only allowed ASCII characters. [x]: Package does not use a name that already exists. [x]: Package is not relocatable. [x]: Sources used to build the package match the upstream source, as provided in the spec URL. [x]: Spec file name must match the spec package %{name}, in the format %{name}.spec. [x]: File names are valid UTF-8. [x]: Packages must not store files under /srv, /opt or /usr/local
Python: [-]: Binary eggs must be removed in %prep [-]: Python eggs must not download any dependencies during the build process. [-]: A package which is used by another package via an egg interface should provide egg info. [x]: Package meets the Packaging Guidelines::Python [x]: Package contains BR: python2-devel or python3-devel [x]: Packages MUST NOT have dependencies (either build-time or runtime) on packages named with the unversioned python- prefix unless no properly versioned package exists. Dependencies on Python packages instead MUST use names beginning with python2- or python3- as appropriate. [x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
===== SHOULD items =====
Generic: [x]: Reviewer should test that the package builds in mock. [-]: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. [x]: Final provides and requires are sane (see attachments). [?]: Package functions as described. [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [-]: Sources are verified with gpgverify first in %prep if upstream publishes signatures. [x]: Package should compile and build into binary rpms on all supported architectures. [x]: %check is present and all tests pass. [x]: Packages should try to preserve timestamps of original installed files. [x]: Spec use %global instead of %define unless justified. [x]: Buildroot is not present [x]: Package has no %clean section with rm -rf %{buildroot} (or $RPM_BUILD_ROOT) [x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin. [x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file [x]: Sources can be downloaded from URI in Source: tag [x]: SourceX is a working URL.
===== EXTRA items =====
Generic: [x]: Rpmlint is run on all installed packages. Note: No rpmlint messages.
Rpmlint ------- Checking: python3-argparse-dataclass-2.0.0-1.fc40.noarch.rpm python-argparse-dataclass-2.0.0-1.fc40.src.rpm ============================ rpmlint session starts ============================ rpmlint: 2.4.0 configuration: /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-legacy-licenses.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml rpmlintrc: [PosixPath('/tmp/tmp9bxbpl7j')] checks: 31, packages: 2
2 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.1 s
Rpmlint (installed packages) ---------------------------- (none): E: there is no installed rpm "python3-argparse-dataclass". There are no files to process nor additional arguments. Nothing to do, aborting. ============================ rpmlint session starts ============================ rpmlint: 2.5.0 configuration: /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-legacy-licenses.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml checks: 32, packages: 1
0 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 filtered, 0 badness; has taken 0.0 s
Source checksums ---------------- https://github.com/mivade/argparse_dataclass/archive/2.0.0/argparse_dataclas... : CHECKSUM(SHA256) this package : 4840dc5c793bfeea4864371f21a341dcf6592047755f558c1c2814c0724b4119 CHECKSUM(SHA256) upstream package : 4840dc5c793bfeea4864371f21a341dcf6592047755f558c1c2814c0724b4119
Requires -------- python3-argparse-dataclass (rpmlib, GLIBC filtered): python(abi)
Provides -------- python3-argparse-dataclass: python-argparse-dataclass python3-argparse-dataclass python3.12-argparse-dataclass python3.12dist(argparse-dataclass) python3dist(argparse-dataclass)
Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24 Command line :/bin/fedora-review --no-colors --prebuilt --rpm-spec --name python-argparse-dataclass --mock-config /var/lib/copr-rpmbuild/results/configs/child.cfg Buildroot used: fedora-rawhide-x86_64 Active plugins: Generic, Python, Shell-api Disabled plugins: Perl, PHP, Ocaml, SugarActivity, fonts, Haskell, R, C/C++, Java Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #6 from Ben Beasley code@musicinmybrain.net ---
I guess this boils down to a matter of personal preferences. I quite like just throwing the URL in the spec and maybe a tag and let the forge macros do their magic. If needed, a `-v` or `rpmspec --parse` will let me peek under the hood.
Yes, I agree this is a matter of personal preference. I don’t think there’s an overwhelming technical argument either for or against the use of the forge macros in trivial cases like this.
(In reply to Sandro from comment #5)
Notes
[x]: Package is named according to the Package Naming Guidelines.
=> While the package name is correct, it is unfortunate that it clashes with `python-argparse`, making this package look like a sub package of the former.
I agree it could be a bit confusing. At least it is in fact an *extension* of argparse. There’s also no python-argparse in Fedora because argparse is in the standard library now.
=> This could be your first package using the `-l` flag for `%pyproject_save_files`. I know the f38 update is still pending. But it should get there before the package is pushed to f38.
I am *very* excited about %pyproject_save_files. I’ve already added it to a bunch of “my” packages in Rawhide even though it’s not in F38/F39 yet and it still breaks Zuul.
I’ve been trying to avoid inflicting it on reviewers just yet, but I’ll add it after import in the rawhide branch.
Package is APPROVED.
Thank you for the review!
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #7 from Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org --- The Pagure repository was created at https://src.fedoraproject.org/rpms/python-argparse-dataclass
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #8 from Sandro gui1ty@penguinpee.nl --- (In reply to Ben Beasley from comment #6)
(In reply to Sandro from comment #5)
Notes
[x]: Package is named according to the Package Naming Guidelines.
=> While the package name is correct, it is unfortunate that it clashes with `python-argparse`, making this package look like a sub package of the former.
I agree it could be a bit confusing. At least it is in fact an *extension* of argparse. There’s also no python-argparse in Fedora because argparse is in the standard library now.
Yeah, I just realized I was confusing `python-argparse` with `python-argcomplete`. No name clash there. Although, my brains beg to disagree.
Note to self: Don't pay to much attention to that grey mass.
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|POST |MODIFIED
--- Comment #9 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-14239a051f has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-14239a051f
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |ERRATA Status|MODIFIED |CLOSED Last Closed| |2023-12-26 13:36:10
--- Comment #10 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-14239a051f has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=2255786 Bug 2255786 depends on bug 2255788, which changed state.
Bug 2255788 Summary: Review Request: python-snakemake-interface-common - Common functions and classes for Snakemake and its plugins https://bugzilla.redhat.com/show_bug.cgi?id=2255788
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |CLOSED Resolution|--- |ERRATA
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #11 from Ben Beasley code@musicinmybrain.net --- https://release-monitoring.org/project/78366/
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #12 from Fedora Update System updates@fedoraproject.org --- FEDORA-EPEL-2023-e1b4aa4a21 has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-e1b4aa4a21
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #13 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-524422d73f has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-524422d73f
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #14 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-336a69b3a6 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-336a69b3a6
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #15 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-336a69b3a6 has been pushed to the Fedora 38 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-336a69b3a6 *` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-336a69b3a6
See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #16 from Fedora Update System updates@fedoraproject.org --- FEDORA-EPEL-2023-e1b4aa4a21 has been pushed to the Fedora EPEL 9 testing repository.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-e1b4aa4a21
See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #17 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-524422d73f has been pushed to the Fedora 39 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-524422d73f *` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-524422d73f
See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #18 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-336a69b3a6 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #19 from Fedora Update System updates@fedoraproject.org --- FEDORA-EPEL-2023-e1b4aa4a21 has been pushed to the Fedora EPEL 9 stable repository. If problem still persists, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #20 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-524422d73f has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #21 from Fedora Update System updates@fedoraproject.org --- FEDORA-EPEL-2024-101258377c (python-argparse-dataclass-2.0.0-8.el10_0) has been submitted as an update to Fedora EPEL 10.0. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-101258377c
https://bugzilla.redhat.com/show_bug.cgi?id=2255786
--- Comment #22 from Fedora Update System updates@fedoraproject.org --- FEDORA-EPEL-2024-101258377c (python-argparse-dataclass-2.0.0-8.el10_0) has been pushed to the Fedora EPEL 10.0 stable repository. If problem still persists, please make note of it in this bug report.
package-review@lists.fedoraproject.org