-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from alexpron/packaging
Installation mechanism and basic CI. That worked like a charm for me.
- Loading branch information
Showing
4 changed files
with
143 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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,41 @@ | ||
name: Python installation | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.8", "3.9", "3.10"] | ||
#TODO: use github action to read python version from pyproject.toml | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-update-conda: true | ||
activate-environment: working-env | ||
python-version: ${{ matrix.python-version }} | ||
auto-activate-base: false | ||
- name: Install dependencies | ||
shell: bash -el {0} | ||
run: | | ||
conda config --set pip_interop_enabled True | ||
python -m pip install . | ||
conda update --all | ||
conda install -c conda-forge heudiconv bids-validator dcm2niix git-annex=*=alldep* datalad | ||
# Create virtual env under each python version | ||
# (optional and a bit redundant because we are already on a specific python) | ||
# it insures installation instruction provided in README are working | ||
# - name: Test with pytest | ||
# run: pytest tests.py --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml | ||
# - name: Upload pytest test results | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: pytest-results-${{ matrix.python-version }} | ||
# path: junit/test-results-${{ matrix.python-version }}.xml | ||
# # Use always() to always run this step to publish test results when there are test failures | ||
# if: ${{ always() }} |
This file contains 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,36 @@ | ||
name: Python installation | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.8", "3.9", "3.10"] | ||
#TODO: use github action to read python version from pyproject.toml | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python # Set Python version | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# Create virtual env under each python version | ||
# (optional and a bit redundant because we are already on a specific python) | ||
# it insures installation instruction provided in README are working | ||
- name: Install dependencies | ||
run: | | ||
python -m venv working-env --clear | ||
source working-env/bin/activate | ||
python -m pip install --upgrade pip | ||
python -m pip install -e . | ||
# - name: Test with pytest | ||
# run: pytest tests.py --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml | ||
# - name: Upload pytest test results | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: pytest-results-${{ matrix.python-version }} | ||
# path: junit/test-results-${{ matrix.python-version }}.xml | ||
# # Use always() to always run this step to publish test results when there are test failures | ||
# if: ${{ always() }} |
This file contains 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 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,49 @@ | ||
[build-system] | ||
requires = ["setuptools>=64", "setuptools_scm>=8"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "shanoir-downloader" | ||
version = "0.0.1" | ||
|
||
dynamic = ["dependencies", "optional-dependencies"] | ||
|
||
requires-python = ">=3.8, <3.11" | ||
|
||
authors = [ | ||
{name = "Arthur Masson",email = "[email protected]"}, | ||
{name = "Quentin Duché", email = "[email protected]"}, | ||
{name = "Malo Gaubert", email = "[email protected]"}, | ||
] | ||
maintainers = [ | ||
{name = "Quentin Duché", email = "[email protected]"} | ||
] | ||
description = "Download Shanoir Datasets in various format using Python" | ||
readme = "README.md" | ||
license = {file = "LICENSE"} | ||
keywords = ["Shanoir", "DICOM", "NIFTI", "BIDS"] | ||
classifiers = [ | ||
"Programming Language :: Python" | ||
] | ||
|
||
[project.urls] | ||
Repository = "https://github.com/Inria-Empenn/shanoir_downloader.git" | ||
"Bug Tracker" = "https://github.com/Inria-Empenn/shanoir_downloader/issues" | ||
Changelog = "https://github.com/Inria-Empenn/shanoir_downloader/blob/master/CHANGELOG.md" | ||
|
||
[tool.setuptools] | ||
py-modules = [] | ||
|
||
[tool.setuptools_scm] | ||
|
||
[tool.setuptools.dynamic] | ||
dependencies = {file = ["requirements.txt"]} | ||
|
||
|
||
#optional-dependencies = {dev = { file = ["requirements-dev.txt"] }} | ||
#[project.scripts] | ||
#spam-cli = "shanoir-downloader:main_cli" | ||
|
||
# | ||
#[project.entry-points."spam.magical"] | ||
#tomatoes = "spam:main_tomatoes" |