Contributing to AutoAFIDs๏ƒ

AutoAFIDs is a Python-based BIDS App for automatic anatomical fiducial detection. Development is managed using pixi for dependency and environment management.

๐Ÿ› ๏ธ These instructions are intended for contributors making code changes to the AutoAFIDs codebase or using advanced features such as Snakemake cluster execution profiles.


๐Ÿ“ฆ Prerequisites๏ƒ

Ensure pixi is installed on your system. You can install pixi by following the official guide:
๐Ÿ‘‰ https://pixi.prefix.dev/latest/installation/

Note: AutoAFIDs primarily supports T1-weighted images. For additional modalities (e.g., T2w), SynthSR will be triggered, though compatibility varies by operating system.

๐Ÿงช Setting Up the Development Environment๏ƒ

  1. Clone the repository:

git clone https://github.com/afids/autoafids.git
cd autoafids
  1. Create and activate the development environment:

pixi shell
  1. Run AutoAFIDs with development dependencies:

./autoafids/run.py -h

๐Ÿงน Code Quality and Formatting๏ƒ

AutoAFIDs uses several tools to ensure clean and consistent code:

  • isort โ€“ for sorting imports.

  • snakefmt โ€“ for formatting Snakemake files

  • black โ€“ for formatting Python code

Check formatting:๏ƒ

  1. Activate the development environment:

pixi shell --environment dev
  1. Run tools

isort autoafids/*.py -c
snakefmt autoafids --check
black autoafids --check

Auto-fix formatting:๏ƒ

isort autoafids/*.py
snakefmt autoafids
black autoafids

๐Ÿงช Dry Run / Workflow Testing๏ƒ

To test the Snakemake workflow without running any jobs, use the built-in dry-run feature:

./autoafids/run.py tests/data tests/output participant -n

The tests/data directory contains a lightweight fake BIDS dataset (with zero-byte files) useful for testing the pipeline logic.

You can simulate more complex scenarios by modifying the tests/ configuration and rerunning dry-runs with --modality and other options.


๐Ÿ™‹ Questions, Issues, and Feedback๏ƒ

We welcome all forms of feedback and contributions.

  • ๐Ÿ’ฌ For questions or suggestions, use the Discussions page.

  • ๐Ÿ› For bugs or feature requests, open an issue on the Issues page.

  • ๐Ÿ“ง You may also contact dbansal7@uwo.ca or reach out to Alaa Taha, the Science Lead.

Thanks for helping improve AutoAFIDs!