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

Bugfix: fix versioning for user pip install #33

Merged
merged 48 commits into from
Mar 1, 2024

Conversation

tomaroberts
Copy link
Owner

@tomaroberts tomaroberts commented Feb 20, 2024

As per #30 and #31, pip install was failing because of issues with dunamai implementation.

In short: when users pip installed nii2dcm it would fail in __init__.py because dunamai was attempting to determine a version based on the assumption that the files underneath are in a Git repo. However, on a user's computer, it was unlikely they were working in a local version of the nii2dcm repo, hence dunamai would fail.

Reading more, the dunamai instructions imply here and in this issue that it is incompatible with Python sdist builds and wheels/bdist should be used.

This PR:

  • updates setup.py and the init.py versioning call
  • updates the publish GitHub Actions so that only wheels are built

@tomaroberts tomaroberts marked this pull request as ready for review February 20, 2024 10:49
Also uses Version.from_any_vcs instead of Version.from_git()
@tomaroberts
Copy link
Owner Author

tomaroberts commented Feb 20, 2024

@jcohen02 – I think I've fixed the dunamai issue. I've tested in a fresh venv using this TestPyPI version outside of my local nii2dcm repo folder and it worked for me. Any chance you could test locally? Can add you as PR reviewer even.

I'm going to build a nii2dcm Docker container as well, which ought to help with build testing too.

PS: I always find the TestPyPI install instruction fails, so I tend to use the following: pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ nii2dcm==0.1.2-post.11

@jcohen02 jcohen02 self-requested a review February 21, 2024 17:22
@jcohen02
Copy link
Collaborator

Thanks for the update @tomaroberts, happy to review/test.

Copy link

github-actions bot commented Mar 1, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
nii2dcm
   __main__.py34340%5–68
   dcm.py93298%165–166
   dcm_writer.py33682%89–95
   nii.py35294%34–35
   run.py30293%57, 66
   utils.py770%8–36
nii2dcm/modules
   mr_image.py59297%39–40
TOTAL4315587% 

Tests Skipped Failures Errors Time
18 0 💤 0 ❌ 0 🔥 4.987s ⏱️

Adds Docker build and associated build GHA
Copy link

github-actions bot commented Mar 1, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
nii2dcm
   __main__.py34340%5–68
   dcm.py93298%165–166
   dcm_writer.py33682%89–95
   nii.py35294%34–35
   run.py30293%57, 66
   utils.py770%8–36
nii2dcm/modules
   mr_image.py59297%39–40
TOTAL4315587% 

Tests Skipped Failures Errors Time
18 0 💤 0 ❌ 0 🔥 4.931s ⏱️

@tomaroberts tomaroberts merged commit 242cb46 into main Mar 1, 2024
3 checks passed
@tomaroberts
Copy link
Owner Author

@jcohen02 – I've test this quite a bit now and fairly sure it's fixed. Going to do a release soon – if it's still broken somehow I will reinvestigate (!)

@tomaroberts tomaroberts deleted the dunamai-production-fix branch March 1, 2024 16:28
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.

2 participants