fair-software / howfairis

Command line tool to analyze a GitHub or GitLab repository's compliance with the fair-software.eu recommendations
https://pypi.org/project/howfairis/
Apache License 2.0
58 stars 23 forks source link

Document how to use it as a library #192

Open sverhoeven opened 3 years ago

sverhoeven commented 3 years ago

Howfairis can not only be used from the command line, but also programmaticly as a library. It would be nice to show how to use it as a library.

For example

from howfairis import Checker, Repo

url = 'https://github.com/fair-software/howfairis'
repo = Repo(url)
checker = Checker(repo)
compliance = checker.check_five_recommendations()
# do something with compliance
sverhoeven commented 3 years ago

Updated example. Example could be added to docstring of Checker in #229

sverhoeven commented 3 years ago

Added code example in API docs at https://github.com/fair-software/howfairis/blob/1c0fe9fef2671b794afa337a1a505145575baef7/howfairis/checker.py#L37-L48

sverhoeven commented 3 years ago

See https://howfairis.readthedocs.io/en/latest/apidocs/howfairis.html#howfairis.Checker