Skip to content

Make a report based on howfairis results

License

Notifications You must be signed in to change notification settings

fair-software/fairtally

Repository files navigation

fairtally

Python application to analyze multiple GitHub and GitLab repositories compliance with the fair-software.eu recommendations.

fair-software.nl recommendations Badges
1. Code repository GitHub Badge
2. License License Badge
3. Community Registry PyPI Badge Research Software Directory Badge
4. Enable Citation Zenodo Badge
5. Checklist CII Best Practices Badge
Other best practices  
Continuous integration Python Build Linter
DockerHub Docker Pulls

Installation

To install fairtally, do:

pip3 install --user fairtally

Usage

To use fairtally to check the compliance of multiple repositories, one can use the command below.

fairtally https://github.com/fair-software/fairtally https://github.com/fair-software/howfairis

This command will generate a html report called tally.html which will contain the results of the checks for each repository.

Then open the analysis in a web-browser, for example Firefox:

firefox tally.html

The report will look similar to the example below:

docs/_static/fairtally_example.png

You can sort the table by clicking on the table headers. The purple plus signs provide access to log messages of each repository.

Checking many repositories will quickly exceed the rate limit of the APIs of GitLab and GitHub and resulting in all remaining repositories to be fully non-compliantly. See howfairis docs how setup environment variables to increase the rate limit.

Using Docker image

You can run fairtally Docker image using the command below.

docker pull fairsoftware/fairtally

You can run fairtally Docker image using the command below.

docker run --rm fairsoftware/fairtally --help

--rm argument will remove Docker container after execution.

To tally 2 URLs and save the report as tally.html in the current working directory you can run the command below.

docker run --rm fairsoftware/fairtally -o - https://github.com/fair-software/fairtally https://github.com/fair-software/howfairis > tally.html

See developer documentation to learn how to modify the Docker image.

Research Software Directory

To FAIR tally the software listed on the Research Software Directory of the Netherlands eScience Center.

First download a list of software by calling RSD API

curl https://research-software.nl/api/software > software.json

Next, extract the repository URLs with jq.

cat software.json | jq -r '[.[].repositoryURLs.github] | flatten | .[]' > urls.txt

Finally run fairtally to generate a report.

fairtally --output-file report.html --input-file urls.txt

Documentation

Command line interface help can be retrieved with

fairtally --help

The output of the command will be something like:

Usage: fairtally [OPTIONS] [URLS]...

Options:
  -o, --output-file TEXT     Filename of where to write the results. Use `-`
                             to write to standard out.  [default: tally.html]

  -i, --input-file FILENAME  Check URLs in file. One URL per line. Use `-` to
                             read from standard input.

  --format [html|json]       Format of output.  [default: html]
  --version                  Show the version and exit.
  --help                     Show this message and exit.

Contributing

If you want to contribute to the development of fairtally, have a look at the contribution guidelines.

License

Copyright (c) 2021, Netherlands eScience Center

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Credits

This package was created with Cookiecutter and the NLeSC/python-template.

Instructions for developers

The developer documentation can be found in README.dev.rst.