Skip to content

Commit

Permalink
Merge pull request #8 from scil-vital/atheb/final_pre_release
Browse files Browse the repository at this point in the history
ENH: final pre release
  • Loading branch information
AntoineTheb authored Mar 27, 2024
2 parents daad8a9 + 516124b commit 7eea8e7
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 4 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --user wheel
pip install --user packaging
./install.sh
- name: Lint with flake8
run: |
python -m pip install --upgrade pip
pip install --user wheel
python3 -m pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python3 -m pip install pytest pytest-console-scripts
python3 -m pytest .
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ Streamlines will be colored according to their predicted scores (if saving a `.t
TractOracle-Net is available through Docker Hub. You can pull the image by running

```
docker pull TODO
docker pull scilus/tractoracle-net:v2024b
```

You can then score a tractogram by running

```
sudo docker run -v .:/workspace/${TRACTOGRAM_LOCATION} tractoracle-net predictor.py /workspace/${TRACTOGRAM_FILE} ${OUT} [...]
sudo docker run -v .:/workspace/${TRACTOGRAM_LOCATION} scilus/tractoracle-net:v2024b predictor.py /workspace/${TRACTOGRAM_FILE} ${OUT} [...]
```

See [Docker volumes](https://docs.docker.com/storage/volumes/) for an explanation of the `-v` flag. **To use CUDA capabilities with Docker, you will need to install the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)**. You will then be able to use the `--gpus` flag. For example:

```
sudo docker run --gpus all -v .:/workspace/${TRACTOGRAM_LOCATION} tractoracle-net predictor.py /workspace/${TRACTOGRAM_FILE} ${OUT} [...]
sudo docker run --gpus all -v .:/workspace/${TRACTOGRAM_LOCATION} scilus/tractoracle-net:v2024b predictor.py /workspace/${TRACTOGRAM_FILE} ${OUT} [...]
```

## Training
Expand Down Expand Up @@ -120,6 +120,6 @@ options:

## References

See preprint: COMING SOON
See preprint: https://arxiv.org/abs/2403.17845

See conference paper: (hopefully) COMING SOON
6 changes: 6 additions & 0 deletions tests/test_runners.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def test_ttl_track(script_runner):
# Call 'ttl_track.py' from the command line and assert that it
# runs without errors

ret = script_runner.run('predictor.py', '--help')
assert ret.success

0 comments on commit 7eea8e7

Please sign in to comment.