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
(v1.2.0) is used to manage dependencies. To install, run the following command:
curl -sSL https://install.python-poetry.org | python3 - --version 1.2.0
For detailed setup instructions, see the documentation here.
Install via apt-get
or snap
- postgresql
- Git clone the afids-validator repository
git clone https://github.com/afids/afids-validator.git
- Set up python environment via
poetry shell
- Install the required libraries via
poetry install --with dev
- Install the pre-commit action via
poetry run poe setup
. This will automatically perform quality tasks for each new commit. - Access the postgres CLI via
sudo su - postgres
- Create a database via postgres
createdb fid_db
- Set password for the created database
psql fid_db \password
- Update configuration in
.env.template
and rename to.env
file python manage.py db upgrade
python manage.py runserver
If there are no errors, you can test it out locally at http://localhost:5000
To test the login with ORCID iD:
- Create an account (with a mailinator.com email address) on sandbox.orcid.org
- Follow these instructions to get a client ID and client secret. Set the
Redirect URIs
to your local testing address (eg.127.0.0.1:5000
,localhost:5000
) - Update your local
.env
file with your new credentials. - Locally change the URLs in
afidsvalidator/orcid.py
to start with api.sandbox.orcid.org - Run the application and test your login.