Skip to content

Commit

Permalink
Merge pull request #458 from effigies/tox-uv
Browse files Browse the repository at this point in the history
chore: Adopt src/ layout and tox
  • Loading branch information
effigies authored Dec 12, 2024
2 parents e2f720d + f911418 commit c974753
Show file tree
Hide file tree
Showing 81 changed files with 456 additions and 268 deletions.
98 changes: 0 additions & 98 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,64 +346,6 @@ jobs:
file: /tmp/data/pytest_cov.xml
flags: pytest

test_deploy_pypi:
<<: *python_defaults
steps:
- checkout
- run:
name: Update build tools
command: pip install --upgrade build twine hatch
- run:
name: Build sMRIPrep
command: python -m build
- run:
name: Twine check smriprep
command: twine check dist/*
- run:
name: Pre-run hatch version
command: hatch version
- store_artifacts:
path: /tmp/src/smriprep/dist
- run:
name: Check sdist distribution
command: |
THISVERSION=$( hatch version )
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
virtualenv --python=python sdist
source sdist/bin/activate
python -m pip install --upgrade pip
python -m pip install dist/smriprep*.tar.gz
which smriprep | grep sdist\\/bin
INSTALLED_VERSION=$(smriprep --version)
INSTALLED_VERSION=${INSTALLED_VERSION%$'\r'}
INSTALLED_VERSION=${INSTALLED_VERSION#*"smriprep v"}
echo "VERSION: \"$THISVERSION\""
echo "INSTALLED: \"$INSTALLED_VERSION\""
test "$INSTALLED_VERSION" = "$THISVERSION"
- run:
name: Check wheel distribution
command: |
THISVERSION=$( hatch version )
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
virtualenv --python=python wheel
source wheel/bin/activate
python -m pip install dist/smriprep*.whl
which smriprep | grep wheel\\/bin
INSTALLED_VERSION=$(smriprep --version)
INSTALLED_VERSION=${INSTALLED_VERSION%$'\r'}
INSTALLED_VERSION=${INSTALLED_VERSION#*"smriprep v"}
echo "VERSION: \"$THISVERSION\""
echo "INSTALLED: \"$INSTALLED_VERSION\""
test "$INSTALLED_VERSION" = "$THISVERSION"
- run:
name: Build smriprep-docker
command: python -m build wrapper
- run:
name: Twine check wrapper
command: twine check wrapper/dist/*
- store_artifacts:
path: /tmp/src/smriprep/wrapper/dist

ds005:
<<: *machine_defaults
working_directory: /tmp/ds005
Expand Down Expand Up @@ -743,23 +685,6 @@ jobs:
path: ./docs/_build/html
destination: versioned

deploy_pypi:
<<: *python_defaults
steps:
- checkout
- run:
name: Update build tools
command: pip install --upgrade build twine
- run:
name: Build sMRIPrep
command: python -m build
- run:
name: Build smriprep-docker
command: python -m build wrapper/
- run:
name: Upload packages to PyPI
command: python -m twine upload dist/smriprep* wrapper/dist/smriprep*

deploy_docker:
<<: *machine_defaults
working_directory: *src
Expand Down Expand Up @@ -826,17 +751,6 @@ workflows:
tags:
only: /.*/

- test_deploy_pypi:
context:
- nipreps-common
filters:
branches:
only:
- /rel\/.*/
- /maint\/.*/
tags:
only: /.*/

- test:
context:
- nipreps-common
Expand Down Expand Up @@ -909,25 +823,13 @@ workflows:
- build_docs
- ds005
- ds054
- test_deploy_pypi
- test
filters:
branches:
ignore: /.*/
tags:
only: /.*/

- deploy_pypi:
context:
- nipreps-common
requires:
- deploy_docs_tag
filters:
branches:
ignore: /.*/
tags:
only: /.*/

- deploy_docker:
context:
- nipreps-common
Expand Down
4 changes: 0 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ smriprep.egg-info
pip-wheel-metadata/**/*
pip-wheel-metadata

# pip installs
src/**/*
src/

# other
work/**/*
work
Expand Down
Loading

0 comments on commit c974753

Please sign in to comment.