howfairis.compliance module

class howfairis.compliance.Compliance(repository: bool = False, license_: bool = False, registry: bool = False, citation: bool = False, checklist: bool = False)

Bases: object

Compliance of a repo against the 5 FAIR software recommendations

Parameters
  • repository – Whether repository is publicly accessible with version control

  • license – Whether repository has a license

  • registry – Whether code is in a registry

  • citation – Whether software is citable

  • checklist – Whether a software quality checklist is used

repository

Whether repository is publicly accessible with version control

Type

bool

license

Whether repository has a license

Type

bool

registry

Whether code is in a registry

Type

bool

citation

Whether software is citable

Type

bool

checklist

Whether a software quality checklist is used

Type

bool

COMPLIANT_SYMBOL = '●'
NONCOMPLIANT_SYMBOL = '○'
as_unicode()str

String representation of each 5 recommendations. Where a full dot means compliant with the recommendation and a open dot means not-compliant.

Returns: A string

calc_badge(readme_file_format: howfairis.readme_format.ReadmeFormat)Optional[str]

Calculate FAIR software badge image URL and URL in format of README.

Parameters

readme_file_format – Format of README.

Returns

Badge image link or None when format of README is unsupported.

count(value=True)int

Number of recommendations which are compliant or non-compliant

Parameters

value – If True then counts number of recommendations that are compliant.

Returns

Count

urlencode(separator: str = '%20%20')str

Encodes compliance into string which can be used in a URL.

Parameters

separator

Returns

String that can be used in a URL