-
Notifications
You must be signed in to change notification settings - Fork 9
Include PiPy Package and non-iso pixel spacing #14
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
Open
mariamonzon
wants to merge
18
commits into
rwindsor1:main
Choose a base branch
from
mariamonzon:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c93f49b
make the pixel spacing compatible with no isometric values
mariamonzon fbae0c3
remove submodules
mariamonzon 9d3de76
pip installation
mariamonzon 30186ab
dependencies for publish pkg in pip
mariamonzon 779e974
include automatic upload to pip
mariamonzon 663e9fd
include some patches
mariamonzon 451d1a3
Merge branch 'dev' into update-numpy
mariamonzon 719d006
Merge pull request #1 from mariamonzon/update-numpy
mariamonzon 3f2d972
Include that pixel spacing is stored as array [x, y]
mariamonzon f2e85b5
Include that pixel spacing is stored as array [x, y]
mariamonzon a74c941
ensure detected coordinates
mariamonzon 9dfa19b
include basic testing
mariamonzon 2f81059
create github action for package release
mariamonzon 4e5711a
Merge pull request #2 from mariamonzon/dev
mariamonzon 5c6b183
include how to install in README
mariamonzon c4b17ed
Merge pull request #3 from mariamonzon/dev
mariamonzon fbc8b25
update to different x nd y PixelSpacing (v.2.0.4)
mariamonzon 052698b
Merge pull request #4 from mariamonzon/dev
mariamonzon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Test and Publish PiPY Package | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.9", "3.10", "3.11"] | ||
|
|
||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Cache pip dependencies | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt', '**/setup.py', '**/pyproject.toml') }} | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -e .[dev] || pip install -e . | ||
| pip install pytest | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| pytest --tb=short -v | ||
|
|
||
| build-and-publish: | ||
| needs: test # Only run if tests pass | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python 3.11 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: 3.11 | ||
|
|
||
| - name: Install build dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip build twine | ||
|
|
||
| - name: Build distributions | ||
| run: | | ||
| python -m build | ||
|
|
||
| - name: Verify build | ||
| run: | | ||
| python -m twine check dist/* | ||
|
|
||
| - name: Publish to PyPI | ||
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
| run: | | ||
| python -m twine upload dist/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,63 @@ | ||
| [project] | ||
| name = "spinenet" | ||
| version = "2.0.4" | ||
| description = "Automated software for analysing clinical spinal MRI scans." | ||
| readme = "README.md" | ||
| authors = [ | ||
| { name = "Maria Monzon", email = "[email protected]" }, | ||
| { name = "Rhydian Windsor", email = "" } | ||
| ] | ||
| keywords = ["medical-imaging", "deep-learning", "spine", "MRI", "segmentation"] | ||
| classifiers = [ | ||
| "Development Status :: 3 - Alpha", | ||
| "Intended Audience :: Science/Research", | ||
| "Topic :: Scientific/Engineering :: Medical Science Apps.", | ||
| "License :: OSI Approved :: MIT License", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
|
|
||
| ] | ||
| requires-python = ">=3.9,<3.12" | ||
| dependencies = [ | ||
| "opencv-python>=4.5.0,<4.8.0.76", # Exclude problematic version | ||
| "numpy<2", | ||
| "torch>=2.0.0,<=2.5.0", | ||
| "torchvision>=0.15.0", | ||
| "numpy>=1.20.0", | ||
| "scipy>=1.7.0", | ||
| "scikit-image>=0.19.0", | ||
| "nibabel>=3.2.0", | ||
| "pandas>=1.3.0", | ||
| "pydicom", | ||
| "shapely", | ||
| "matplotlib>=3.5.0", | ||
| "requests", | ||
| "tqdm" | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| dev = [ | ||
| "pytest>=7.0.0", | ||
| "pytest-cov>=4.0.0", | ||
| "black>=22.0.0", | ||
| "ruff>=0.1.0", | ||
| "mypy>=1.0.0", | ||
| ] | ||
| vis = [ | ||
| "matplotlib>=3.5.0", | ||
| "seaborn>=0.11.0", | ||
| "plotly>=5.0.0", | ||
| ] | ||
| [project.scripts] | ||
| spinenet = "spinenet:main" | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
|
|
||
| [tool.black] | ||
| line-length = 79 | ||
| include = '\.pyi?$' | ||
|
|
@@ -14,3 +74,4 @@ exclude = ''' | |
| | dist | ||
| )/ | ||
| ''' | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ requests | |
| scikit-image | ||
| scipy | ||
| shapely | ||
| torch | ||
| torch>=2.0.1,<=2.5.0 | ||
| torchvision | ||
| tqdm | ||
| matplotlib | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.13 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This python version doesn't match that in the .readthedocs.yaml file (3.9)