Anatomical fiducials (AFIDs) is an open framework for evaluating correspondence in brain images and teaching neuroanatomy using anatomical fiducial placement. The AFIDs Validator project aims to build a web application that allows the user to upload an FCSV file generated using the AFIDs protocol, and validate that it conforms to the protocol.
poetry
is used to manage dependencies. To install, run the following command:
curl -sSL https://install.python-poetry.org | python3 -
For detailed setup instructions, see the documentation here.
Once installed, you can set up your development environment by:
git clone https://github.com/afids/afids-validator.git
poetry shell
poetry install --with dev
poetry run poe setup
. This will automatically perform quality tasks for each new commit..env.template
and rename to .env
fileThis will allow you to make changes and perform the necessary formatting and linting tasks. To test changes, the easiest way is via docker compose
. To use this, you will need to install Docker.
Once installed, you can run docker compose up --build
in the terminal.
If there are no errors, you can test it out locally at http://localhost:5001
After you are done testing, you can hit CTRL/CMD+C
on the terminal to exit out of the instance and run docker compose down
to remove unused containers.
If docker compose
successfully starts the required services, you will first want to enter the afids-validator container interactively to migrate the database, enabling testing of database uploads.
# Enter the container interactively
docker exec -it afids-validator-afidsvalidator-1 bash
# Migrate the database
flask db upgrade -d /usr/local/lib/python3.9/dist-packages/migrations/
Note: You may need to change the container name (i.e. afids-validator-afidsvalidator-1
) accordingly.
To test the login with ORCID iD:
Redirect URIs
to your local testing address (eg. 127.0.0.1:5001
, localhost:5001
).env
file with your new credentials.afidsvalidator/orcid.py
to start with api.sandbox.orcid.org