howfairis.checker module
- class howfairis.checker.Checker(repo: Repo, user_config_filename: Optional[str] = None, repo_config_filename: str = '.howfairis.yml', ignore_repo_config: bool = False, is_quiet: bool = False)
Bases:
RepositoryMixin
,LicenseMixin
,RegistryMixin
,CitationMixin
,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
- readme
Retrieved README from the repository.
- Type
.readme.Readme
The
skip_*_checks_reason
andChecker.ignore_commented_badges
properties are set based on merger ofthe default configuration (see
howfairis/data/.howfairis.yml
),config file from repo and
config file from users local filesystem.
- check_five_recommendations() Compliance
Check the repo against the five FAIR software recommendations
Returns: compliance result
- property ignore_commented_badges: bool
If True then any commented out badges in the README of the repository are ignored.
- Type
- property skip_checklist_checks_reason: bool
If True then checks for the checklist recommendation are skipped and the recommendation is marked as compliant
- Type
- property skip_citation_checks_reason: bool
If True then checks for the citation recommendation are skipped and the recommendation is marked as compliant
- Type
- property skip_license_checks_reason: bool
If True then checks for the license recommendation are skipped and the recommendation is marked as compliant
- Type