Skip to main content

FAIR4RS compliance checker for research software

Project description

FAIRGuard

PyPI Python CI License

FAIR4RS compliance checker for research software.

Checks your software project against the 17 FAIR4RS principles (Findable, Accessible, Interoperable, Reusable) and gives you a compliance score.

Work in progress.

How it works

FAIRGuard uses a plugin system to check each FAIR4RS principle. Built-in plugins cover all 17 principles:

  • Findable: persistent identifiers, metadata, searchability
  • Accessible: retrieval protocols, access documentation
  • Interoperable: standard data formats, qualified references
  • Reusable: license, provenance, community standards

Install

pip install fairguard

For development:

pip install -e ".[dev]"

Usage

Basic assessment

# assess the current directory
fairguard assess

# assess a specific repository
fairguard assess /path/to/repo

# assess a remote repository
fairguard assess https://github.com/org/repo

# shorthand for GitHub repos
fairguard assess org/repo

# Codeberg / Gitea / Forgejo repos work the same way
fairguard assess https://codeberg.org/owner/repo

# verbose output with evidence details
fairguard assess . -v

# quiet mode (exit code only, no output)
fairguard assess . -q

Forge support

Forge Token env var CLI flag Notes
GitHub GITHUB_TOKEN or GH_TOKEN --github-token github.com and self-hosted GHE
GitLab GITLAB_TOKEN --gitlab-token gitlab.com and self-hosted (set GITLAB_URL)
Codeberg CODEBERG_TOKEN --gitea-token codeberg.org
Gitea / Forgejo GITEA_TOKEN --gitea-token self-hosted (set GITEA_URL if needed)

Tokens are only required for higher rate limits or to read private repositories. Public repos on any supported forge can be assessed anonymously.

Output formats

FAIRGuard supports three output formats: text (default), json, and markdown.

# print json to terminal
fairguard assess . --format json

# print markdown to terminal
fairguard assess . --format markdown

Saving reports to file

Use --output (-o) to write the report to a file. The format is determined by --format:

# save as markdown
fairguard assess . --format markdown --output report.md

# save as json
fairguard assess . --format json --output results.json

# save as plain text
fairguard assess . --output report.txt

If you pass a directory instead of a file, FAIRGuard auto-names the file:

# creates ./reports/fairguard-report.md
fairguard assess . --format markdown --output ./reports/

Publishing to a FAIRGuard backend

One-step assess + upload, no JSON file in between:

export FAIRGUARD_BACKEND_URL=https://fairguard.example.org
export FAIRGUARD_API_KEY=fg_xxxxxxxxxxxxxxxx

fairguard assess . --publish

The two-step flow still works if you need the JSON for something else:

fairguard assess . --format json --output report.json
fairguard publish report.json

fairguard publish - reads JSON from stdin, so this also works:

fairguard assess . --format json | fairguard publish -

Resolution order for --backend-url and --api-key: CLI flag, then FAIRGUARD_BACKEND_URL / FAIRGUARD_API_KEY env vars, then backend_url and api_key in .fairguard.yml, then default http://localhost:8000. Avoid committing api_key to the config file -- the CLI warns when it loads one from disk.

Profiles

# use a specific profile
fairguard assess . --profile minimal

# list available profiles
fairguard profile list

# show profile details
fairguard profile show strict

Skip indicators

# skip an indicator
fairguard assess . --skip persistent_identifier

# skip with a reason
fairguard assess . --skip "persistent_identifier:no DOI yet"

# skip multiple
fairguard assess . --skip persistent_identifier --skip metadata_persistence

Other commands

# list plugins and their indicators
fairguard plugin list
fairguard plugin info license_check

# list FAIR4RS indicators
fairguard indicator list
fairguard indicator list -v             # with descriptions
fairguard indicator list --unimplemented

# initialize a config file
fairguard init

# validate config
fairguard validate

# check plugin dependencies
fairguard deps

Exit codes

Code Meaning
0 All indicators pass
1 One or more indicators failed
2 Error or quality gate failed

Configuration

FAIRGuard looks for a .fairguard.yml file in the repository root (or any parent directory). You can also pass a config file explicitly with --config. Run fairguard init to create one.

Example .fairguard.yml:

profile: default
skip_indicators:
  - metadata_persistence

quality_gate:
  min_compliance: bronze
  min_score: 4.0
  required_indicators:
    - clear_license

quality_goals:
  target_compliance: gold
  target_score: 7.0

Profiles

Three built-in profiles are available:

  • default -- all 17 indicators, threshold 5.0
  • minimal -- only the 4 Bronze-essential indicators (persistent_identifier, clear_license, open_access_protocol, community_standards)
  • strict -- all 17 indicators at Platinum threshold (8.0)

Select a profile via --profile flag or the profile key in .fairguard.yml.

Quality Gates

Quality gates enforce minimum requirements. The assessment will report PASSED or FAILED:

  • min_compliance: minimum compliance level (none/bronze/silver/gold/platinum)
  • min_score: minimum overall score
  • required_indicators: list of indicators that must pass

Quality Goals

Quality goals are aspirational targets for tracking progress. They are non-blocking -- the assessment always completes, but shows whether each goal is met.

Extra Features

For detailed HTML reports, assessment trends, team dashboards, batch/organization scanning, and more, visit fairguard.org.

License

AGPL-3.0 with Commons Clause

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fairguard-0.10.1-cp313-cp313-manylinux_2_17_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

fairguard-0.10.1-cp312-cp312-manylinux_2_17_x86_64.whl (9.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

fairguard-0.10.1-cp311-cp311-manylinux_2_17_x86_64.whl (9.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

File details

Details for the file fairguard-0.10.1-cp313-cp313-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for fairguard-0.10.1-cp313-cp313-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 5de331ec98c7fa8e2dd29a7c33fe537d09662d12b2e588c21fe83c1b1e645e3a
MD5 23ad7687e173d77ce8f0d23aa35997b8
BLAKE2b-256 b0473839f0f6826e36daf82604213d7bec3c9d7ba6f0c47261aa489147c6319f

See more details on using hashes here.

File details

Details for the file fairguard-0.10.1-cp312-cp312-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for fairguard-0.10.1-cp312-cp312-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 71b1222145c71785e8a3bb16ca1f4685bf777d854da1f5876cdc7be206fd3801
MD5 9866ee154250fe219b49ba7fe56edf72
BLAKE2b-256 e8e464be2d36b31aa27843fb51b821fe4120e4c850f4f74767af185595d7532d

See more details on using hashes here.

File details

Details for the file fairguard-0.10.1-cp311-cp311-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for fairguard-0.10.1-cp311-cp311-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 8d1ded06cf63cf7e06b46c0cea7984bcfbe00feeb4c3694985ff1a57f705d64b
MD5 d82ec3b1d448d534370401e81a294ea4
BLAKE2b-256 e9e8e24bf8703c576d16e9b46e44070127a84f8fc401ca102efc11d847a0d1eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page