Get started
This page guides you to choose where and how to create your FAIR tests.
♻️ Use an existing FAIR test repository
You are welcome to submit a pull request to propose to add your tests to our API in production: https://metrics.api.fair-enough.semanticscience.org
- Fork the repository https://github.com/MaastrichtU-IDS/fair-enough-metrics
- Clone your forked repository
- Checkout the
README.md
to run it in development - Send us a pull request to integrate your test to our API at {{cookiecutter.host_url}}
- Once your test is published, register it in existing FAIR evaluation services (cf. the publish page.
📂 Create a new repository for your tests
🍪 With the cookiecutter interactive CLI
Install cookiecutter:
Initialize your FAIR tests repository using the interactive CLI:
Check the generated README.md
for more details on how to deploy the API in production or run the tests.
✍️ Manually
-
Create a
pyproject.toml
file:pyproject.toml[project] version = "0.1.0" name = "My FAIR test API" description = "Implementation of the FAIR metrics tests for..." readme = "README.md" requires-python = ">=3.9" license = { file = "LICENSE" } authors = [ { name = "Firstname Lastname", email = "firstname.lastname@example.com" }, ] dependencies = [ "fair-test >=0.0.7", ] [project.optional-dependencies] test = [ "pytest >=7.1.3,<8.0.0", ] dev = [ "uvicorn[standard] >=0.12.0,<0.19.0", ]
-
Define the API: create a
main.py
file to declare the API, you can provide a different folder thanmetrics
here, the folder path is relative to where you start the API (the root of the repository): -
Create a
.env
file to provide the global informations used for the API, such as contact details and the host URL (note that you don’t need to change it for localhost in development), e.g.:.envHOST_URL="https://metrics.api.fair-enough.semanticscience.org" CONTACT_URL="https://github.com/MaastrichtU-IDS/fair-enough-metrics" CONTACT_NAME="Firstname Lastname" CONTACT_EMAIL="firstname.lastname@example.com" CONTACT_ORCID="0000-0000-0000-0000" ORG_NAME="Affiliation" DEFAULT_SUBJECT="https://doi.org/10.1594/PANGAEA.908011"