pyfairdatatools is a Python package that includes functions of fairhub.io for making data FAIR. This consists of a collection of helpful functions for extracting, transforming raw data, generating relevant metadata files and validating the data and metadata files against the FAIR guidelines adopted by the AI-READI project. Beside supporting fairhub.io, our aim is that the package can be used by anyone wanting to make their data FAIR according to the AI-READI FAIR guidelines.
You will need the following installed on your system:
Install it directly into an activated virtual environment:
pip install pyfairdatatools
or add it to your Poetry project:
poetry add pyfairdatatools
After installation, the package can be imported:
$ python
>>> import pyfairdatatools
>>> pyfairdatatools.__version__
The input of most functions will be a json format schema (see "Standards followed" sections) that contain data and metadata related information. The outputs of most functions will be standards metadata files, structured data, etc.
This software is being developed following the Software Development Best Practices of the AI-READI Project, which include following the FAIR-BioRS guidelines. Amongs other, we are following closely the PEP 8 Style Guide for Python Code.
The input structure of the function is currently being developed but anticipated to follow existing schemas such as schema.org and bioschemas.org.
Contributions are always welcome!
If you are interested in reporting/fixing issues and contributing directly to the code base, please see CONTRIBUTING.md for more information on what we're looking for and how to get started.
To report any issues with the software, suggest improvements, or request a new feature, please open a new issue via the Issues tab. Provide adequate information (operating system, steps leading to error, screenshots) so we can help you efficiently.
If you would like to update the package, please follow the instructions below.
-
Create a local virtual environment and activate it:
python -m venv .venv source .venv/bin/activate
If you are using Anaconda, you can create a virtual environment with:
conda create -n pyfairdatatools-env python conda activate pyfairdatatools-env
-
Install the dependencies for this package. We use Poetry to manage the dependencies:
pip install poetry==1.3.2 poetry install
You can also use version 1.2.0 of Poetry, but you will need to run
poetry lock
after installing the dependencies. -
Add your modifications and run the tests. You can also use the command
poe test
for running the tests.poetry run pytest
If you need to add new python packages, you can use Poetry to add them:
poetry add <package-name>
-
Format the code:
poe format
-
Check the code quality:
poetry run flake8 pyfairdatatools tests
-
Run the tests and check the code coverage:
poe test poe test --cov=pyfairdatatools
-
Build the package:
Update the version number in
pyproject.toml
andpyfairdatatools/__init__.py
and then run:poetry build
-
Publish the package:
poetry publish
Set your API token for PyPI in your environment variables:
poetry config pypi-token.pypi your-api-token
This work is licensed under MIT. See LICENSE for more information.
If you are using this package or reusing the source code from this repository for any purpose, please cite:
Coming soon...
This project is funded by the NIH under award number 1OT2OD032644. The content is solely the responsibility of the authors and does not necessarily represent the official views of the NIH.
Add any other acknowledgements here.