Skip to content
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

Added distribution badges #1192

Merged
merged 4 commits into from
Feb 3, 2023
Merged

Added distribution badges #1192

merged 4 commits into from
Feb 3, 2023

Conversation

TheChymera
Copy link
Contributor

Added badges for distributions which usually provide more-or-less up-to-date versions of nibabel. I think it would be cool to notify users that they might be able to get nibabel directly via their package managers. Might also encourage people to package nibabel and/or keep it up to date (I know there's a pretty big science packaging effort on Arch's AUR as well, though they seem to have missed nibabel).

@yarikoptic
@liamtimms

Copy link
Contributor

@ZviBaratz ZviBaratz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
I'm planning to revamp the readme a little sometime next week, so this makes a perfect addition. Thank you very much!

@codecov
Copy link

codecov bot commented Feb 2, 2023

Codecov Report

Base: 92.17% // Head: 92.17% // No change to project coverage 👍

Coverage data is based on head (6553bca) compared to base (fc9a1c1).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1192   +/-   ##
=======================================
  Coverage   92.17%   92.17%           
=======================================
  Files          97       97           
  Lines       12341    12341           
  Branches     2535     2535           
=======================================
  Hits        11375    11375           
  Misses        645      645           
  Partials      321      321           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ZviBaratz
Copy link
Contributor

@effigies pre-release (windows-latest, 3.11, x64, pip, test, PRE_PIP_FLAGS, REQUIREMENTS, DEFAULT_OPT_DEPENDS) is raising:

FAILED tests/test_nifti1.py::TestNifti1Image::test_slicer - nibabel.spatialimages.HeaderDataError: shape (4, 5, 6, 2, 1, 1, 1, 1) does not fit in dim datatype

this certainly should not have anything to do with this PR, but it also wasn't raised in the latest commit to master 😕
Any ideas?

@liamtimms
Copy link

Regarding Arch: I have been keeping the AUR build for nibabel fairly up-to-date since 2019 actually https://aur.archlinux.org/cgit/aur.git/log/?h=python-nibabel

@effigies
Copy link
Member

effigies commented Feb 2, 2023

It's a stochastic bug, but I can't understand why it happens. Rerunning the tests will fix it.

@effigies
Copy link
Member

effigies commented Feb 2, 2023

I believe there are Fedora and Nix packages as well.

README.rst Show resolved Hide resolved
@ZviBaratz
Copy link
Contributor

Fedora and nix are outdated if I understand correctly.

@effigies
Copy link
Member

effigies commented Feb 2, 2023

I think nix (4.0.2) is not dramatically far behind, given 5.0.0 was only released a few weeks ago. They may be waiting on deprecation fixes in downstream packages.

@effigies
Copy link
Member

effigies commented Feb 2, 2023

cc @ashgillman and @sanjayankur31

@sanjayankur31
Copy link

Hi there, the Fedora package should be updated to the latest version soon. I just have to test all the other packages that depend on nibabel to see if they all continue to build/work with the new version (and file bugs if they don't).

@effigies
Copy link
Member

effigies commented Feb 2, 2023

No worries on speed. Just wanted to check in in case another maintainer had taken over.

The whole point of having semver releases is to warn that there may be breaking changes, and distributions are welcome to take their time to keep their ecosystem unbroken, so I don't see a lag in adopting a major version as a concern. Anything that's at 4.0.2 is probably currently maintained.

@TheChymera
Copy link
Contributor Author

@liamtimms thank you for pointing that out :)

Ok, so I added nix and Arch. Fedora is pretty severely out of date, @sanjayankur31 maybe sumbit a PR once it's at least 4.x?

Copy link
Member

@yarikoptic yarikoptic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even more badges could always be added

@yarikoptic yarikoptic merged commit 43885d7 into nipy:master Feb 3, 2023
@effigies
Copy link
Member

effigies commented Feb 3, 2023

@liamtimms Just looked at https://aur.archlinux.org/cgit/aur.git/commit/?h=python-nibabel&id=efdbaf50ad24c02f807e6cb7f55e34b71a4a8a71 and have a few notes:

  1. We do not require six directly, so I would pick it up through the dependency tree, if it's actually needed.
  2. setuptools-scm should be a build time, not run time, dependency, and it should be required by hatch-vcs.
  3. We do require packaging at runtime, as it's needed to emit deprecation warnings/errors based on the current version.
  4. We're currently building docs with Sphinx 5.3.0, so the comment about Sphinx 1.5.6 is out of date.

@liamtimms
Copy link

@effigies , thanks so much for this, there was definitely some crust and disorganization leftover in that packaging from a few years ago, plus my confusion about some more recent dependency changes. I've updated the package to reflect these notes now.

@effigies
Copy link
Member

effigies commented Feb 3, 2023

@liamtimms Sorry, one update: 5.0 does actually have runtime dependency on setuptools because of pkg_resources. I've removed it in #1190, but it is there in this version. We actually do not have a build-time dependency on it at all.

  depends=('python-numpy>=1.19' 
-          'python-packaging')
+          'python-packaging>=17'
+          'python-setuptools')
 makedepends=('python-hatch-vcs'
-             'python-setuptools'
              'python-build'

(I would run tests to be sure. You should be able to use pytest with pytest-httpserver. If you run doctests, you'll need pytest-doctestplus.)

@effigies
Copy link
Member

effigies commented Feb 3, 2023

Oh, and I would suggest using the sdist (.tar.gz) files from PyPI instead of the GitHub archive. You can use the following template: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz

So https://pypi.io/packages/source/n/nibabel/nibabel-5.0.0.tar.gz

@TheChymera TheChymera deleted the distribution branch February 3, 2023 20:27
archlinux-github pushed a commit to archlinux/aur that referenced this pull request Feb 10, 2023
archlinux-github pushed a commit to archlinux/aur that referenced this pull request Feb 10, 2023
@liamtimms
Copy link

@effigies just a quick question:

5.0 does actually have runtime dependency on setuptools because of pkg_resources. I've removed it in #1190, but it is there in this version.

is that still true for 5.0.1? Asking because I don't see #1190 mentioned in the release notes for 5.0.1.

@effigies
Copy link
Member

Yes. 5.0.1 (and bugfix releases generally) should not change APIs or dependencies.

@effigies effigies added this to the 5.1.0 milestone Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants