Skip to content

Commit

Permalink
[FIX] Make sure version docker images matches version of package in t…
Browse files Browse the repository at this point in the history
…he image (#169)

* update docker ignore

* update docker ingore

* speed up CLI

* print version in CI
  • Loading branch information
Remi-Gau authored Sep 1, 2024
1 parent 840b2b1 commit eb9a18f
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 20 deletions.
155 changes: 136 additions & 19 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,136 @@
# python cache
.cache/
__pycache__/**/*
__pycache__
*.pyc

# python distribution
build/**/*
build
dist/**/*
dist
*.egg-info/**/*
*.egg-info
.eggs/**/*
.eggs

docs

Makefile
*/_version.py
ds000017-fmriprep22.0.1-downsampled-nosurface
output/
work/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

*.code-workspace
3 changes: 3 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ jobs:
docker build . --file Dockerfile --tag ${{env.USER_NAME}}/${{env.REPO_NAME}}
mkdir -p ${{ env.IMAGE }}
docker save "${{env.USER_NAME}}/${{env.REPO_NAME}}" > "${{ env.IMAGE }}/image.tar"
- name: Check image size and version
run: |
docker images
docker run --rm ${{env.USER_NAME}}/${{env.REPO_NAME}} --version
- name: Upload docker artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions docs/source/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

### Fixes

- [FIX] Make sure version docker images matches version of package in the image (@Remi-Gau) [#169](https://github.com/bids-apps/giga_connectome/issues/169)
- [MAINT] Remove recurrsive import. (@htwangtw) [#135](https://github.com/bids-apps/giga_connectome/issues/135)
- [DOCS] Remove`meas` entity in timeseries outputs in the documentation. (@htwangtw) [#136](https://github.com/bids-apps/giga_connectome/issues/136)

Expand Down
5 changes: 4 additions & 1 deletion giga_connectome/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from typing import Sequence

from giga_connectome import __version__
from giga_connectome.workflow import workflow
from giga_connectome.atlas import get_atlas_labels
from giga_connectome.logger import gc_logger

Expand Down Expand Up @@ -157,6 +156,10 @@ def main(argv: None | Sequence[str] = None) -> None:

args = parser.parse_args(argv)

# local import to speed up CLI response
# when just askig for --help or --version
from giga_connectome.workflow import workflow

workflow(args)


Expand Down

0 comments on commit eb9a18f

Please sign in to comment.