Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cf65681
add pixi logic
Dhananjhay Nov 4, 2025
7cf0875
change CI logic from poetry to pixi
Dhananjhay Nov 4, 2025
cd149ee
fix linting
Dhananjhay Nov 4, 2025
79c7ec3
fix recipe
Dhananjhay Nov 4, 2025
8e86447
remove home from about sectoin
Dhananjhay Nov 4, 2025
90abb4e
add snakemake dependency in recipe and toml files
Dhananjhay Nov 4, 2025
8373af5
remove snakemake explicit dependency from toml and recipe
Dhananjhay Nov 4, 2025
ff23bf0
update channel priority while building the package
Dhananjhay Nov 4, 2025
9931d53
remove unsued dev tools from pyproject.toml
Dhananjhay Nov 4, 2025
bf1b6c0
upgrade from python 3.10 to 3.11 for buildthedocs
Dhananjhay Nov 4, 2025
e99a4e8
lint
Dhananjhay Nov 4, 2025
1b694c7
update lock file
Dhananjhay Nov 4, 2025
a737a4a
fix build system backend syntax
Dhananjhay Nov 5, 2025
efab8fe
build conda package with --no-build-isolation
Dhananjhay Nov 5, 2025
ca063db
temporarily disable replacing latest git commit from the master branch
Dhananjhay Nov 5, 2025
4502446
revert changes to build-system and python install step in the recipe
Dhananjhay Nov 5, 2025
0dfbc71
build conda package using conda, drop rattler-build
Dhananjhay Nov 12, 2025
e9d7a02
temporarily disable fetching latest commit from master branch
Dhananjhay Nov 12, 2025
d8ddd0b
update sha256 checksum for the commit
Dhananjhay Nov 12, 2025
791bb49
fetch latest commit from master and stop building conda packages from…
Dhananjhay Nov 12, 2025
6760280
fix black linting errors
Dhananjhay Jan 19, 2026
76830f0
fix snakefmt linting errors
Dhananjhay Jan 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 23 additions & 21 deletions .github/workflows/lint-and-dryrun-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,42 @@ jobs:
name: Lint code
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v4

- name: Install non-python dependencies
run: |
sudo apt-get install -y graphviz-dev

- name: Setup Python environment
uses: khanlab/actions/.github/actions/action-setup_task-installPyProject@v0.3.6
uses: prefix-dev/setup-pixi@v0.8.14
with:
python-version: '3.10'
- name: yamlfix
run: poetry run poe yamlfix-check
- name: ruff
run: poetry run poe ruff-lint-check
environments: >-
dev-only
activate-environment: dev-only

- name: isort
run: isort autoafids/*.py -c

- name: black
run: black autoafids --check

- name: snakefmt
run: poetry run poe snakefmt-check
run: snakefmt autoafids --check

test:
runs-on: ubuntu-latest
needs: [quality]
defaults:
run:
shell: bash -l {0}

steps:
- name: checkout repository
uses: actions/checkout@v4
- name: Setup Miniforge and mamba
uses: conda-incubator/setup-miniconda@v3

- name: Setup Pixi environment
uses: prefix-dev/[email protected]
with:
miniforge-variant: Miniforge3
miniforge-version: latest
mamba-version: '*'
use-mamba: true
conda-solver: libmamba
auto-activate-base: true
- name: Install snakebids
run: |
mamba install snakebids -c bioconda -c conda-forge -y
activate-environment: true

- name: Setup env for autoafids
run: |
echo "AUTOAFIDS_CACHE_DIR=`pwd`/test_data/autoafids_cache_dir" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ jobs:
--user khanlab \
--label main \
--force \
"$PACKAGE_PATH"
"$PACKAGE_PATH"
24 changes: 3 additions & 21 deletions .github/workflows/wetrun-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Miniforge and mamba
uses: conda-incubator/setup-miniconda@v3
- name: Setup Pixi environment
uses: prefix-dev/setup-[email protected]
with:
miniforge-variant: Miniforge3
miniforge-version: latest
mamba-version: '*'
use-mamba: true
conda-solver: libmamba
auto-activate-base: true
- name: Create environment with snakebids
run: |
mamba create -n snakebids-env snakebids scikit-learn pandas -c bioconda -c conda-forge -y
- name: Cache Snakemake Conda environments
uses: actions/cache@v4
with:
path: test_data/autoafids_cache_dir/conda
key: conda-env-${{ hashFiles('autoafids/workflow/envs/*.yaml') }}
restore-keys: |
conda-env-
activate-environment: true
- name: Restore cached CNN model
uses: actions/cache@v4
with:
Expand All @@ -46,19 +31,16 @@ jobs:
- name: Run wet-run test for T1w modality
shell: bash -l {0}
run: |
conda activate snakebids-env
./autoafids/run.py test_data/bids_wetrun_testing/bids_T1w test_out participant \
--cores all --force-output --stereotaxy STN --fidqc --conda-frontend mamba | tee autoafids_output.log
- name: Model accuracy check
shell: bash -l {0}
run: |
conda activate snakebids-env
python ./tests/test_fcsv_output.py \
--autoafids_fcsv ./test_out/sub-001/afids-cnn/*.fcsv \
--baseline_fcsv ./test_data/bids_wetrun_testing/bids_T1w/sub-001/anat/sub-001*.fcsv | tee test_fcsv_output.log
- name: Run wet-run test for T2w modality
shell: bash -l {0}
run: |-
conda activate snakebids-env
./autoafids/run.py test_data/bids_wetrun_testing/bids_T2w test_out participant \
--modality T2w --cores all --force-output --conda-frontend mamba
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ formats: [pdf]
build:
os: ubuntu-20.04
tools:
python: '3.10'
python: '3.11'
python:
install:
- requirements: docs/requirements.txt
Expand Down
14 changes: 0 additions & 14 deletions autoafids-dev.yml

This file was deleted.

9 changes: 3 additions & 6 deletions autoafids/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
from snakebids import bidsapp, plugins

try:
from autoafids.workflow.lib import (
utils as utils, # Works when run as a package
)
from autoafids.workflow.lib import utils as utils # Works when run as a package
except ImportError:
from workflow.lib import utils as utils # Works when run directly

Expand All @@ -27,14 +25,13 @@
conda_prefix = Path(utils.get_download_dir()) / "conda"

# Set templateflow directory
os.environ['TEMPLATEFLOW_HOME'] = str(
Path(utils.get_download_dir()) / "templateflow"
)
os.environ["TEMPLATEFLOW_HOME"] = str(Path(utils.get_download_dir()) / "templateflow")

# Set the environment variable SNAKEMAKE_CONDA_PREFIX if not already set
if "SNAKEMAKE_CONDA_PREFIX" not in os.environ:
os.environ["SNAKEMAKE_CONDA_PREFIX"] = str(conda_prefix)


def get_parser():
"""Exposes parser for sphinx doc generation, cwd is the docs dir"""
return app.build_parser().parser
Expand Down
Loading