howfairis.checker module

class howfairis.checker.Checker(repo: howfairis.repo.Repo, user_config_filename: Optional[str] = None, repo_config_filename: str = '.howfairis.yml', ignore_repo_config: bool = False, is_quiet: bool = False)

Bases: howfairis.mixins.repository_mixin.RepositoryMixin, howfairis.mixins.license_mixin.LicenseMixin, howfairis.mixins.registry_mixin.RegistryMixin, howfairis.mixins.citation_mixin.CitationMixin, howfairis.mixins.checklist_mixin.ChecklistMixin

Check the repo against the five FAIR software recommendations using supplied config.

Parameters
  • repo – Repository to check

  • user_config_filename – Filename of configuration file on users local filesystem.

  • repo_config_filename – Filename of configuration file on the repository. Default is “.howfairis.yml”.

  • ignore_repo_config – If True then the configuration file on the repository is not loaded. Default is False.

  • is_quiet – If True then less verbose output is printed. Default is False.

Example

The registry compliance of the https://github.com/fair-software/howfairis repository can be checked with:

>>> from howfairis import Repo, Checker
>>> url = "https://github.com/fair-software/howfairis"
>>> repo = Repo(url)
>>> checker = Checker(repo, is_quiet=True)
...
>>> compliance = checker.check_five_recommendations()
>>> compliance.registry
True
repo

Object describing the properties of the target repository.

Type

repo.Repo

is_quiet

If True then less verbose output is printed. Default is False.

Type

bool

readme

Retrieved README from the repository.

Type

readme.Readme

The skip_*_checks_reason and Checker.ignore_commented_badges properties are set based on merger of

  1. the default configuration (see howfairis/data/.howfairis.yml),

  2. config file from repo and

  3. config file from users local filesystem.

check_five_recommendations()howfairis.compliance.Compliance

Check the repo against the five FAIR software recommendations

Returns: compliance result

property ignore_commented_badges

If True then any commented out badges in the README of the repository are ignored.

Type

bool

property skip_checklist_checks_reason

If True then checks for the checklist recommendation are skipped and the recommendation is marked as compliant

Type

bool

property skip_citation_checks_reason

If True then checks for the citation recommendation are skipped and the recommendation is marked as compliant

Type

bool

property skip_license_checks_reason

If True then checks for the license recommendation are skipped and the recommendation is marked as compliant

Type

bool

property skip_registry_checks_reason

If True then checks for the registry recommendation are skipped and the recommendation is marked as compliant

Type

bool

property skip_repository_checks_reason

If True then checks for the repository recommendation are skipped and the recommendation is marked as compliant

Type

bool