fairy
FAIRy is fairificaion tools for data management of general and especialy tabular data
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.6%) to scientific vocabulary
Repository
FAIRy is fairificaion tools for data management of general and especialy tabular data
Basic Info
- Host: GitHub
- Owner: martinschatz-cz
- License: mit
- Language: Python
- Default Branch: main
- Size: 548 KB
Statistics
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
FAIRy

FAIRy is a toolkit for FAIRification and quality control of data management, especially for tabular data. It helps you enforce naming conventions, generate data dictionaries, check data quality, and prepare metadata for repositories like Zenodo.
What does FAIRy do?
- Enforces file naming conventions using regex (customizable via an interactive builder)
- Generates data dictionaries for your tabular datasets, including all standard metadata fields
- Performs automated quality checks on tabular data based on your data dictionary (e.g., type, range, allowed values, uniqueness, missing values)
- Helps you prepare Zenodo metadata from a CSV template
- Supports automation via GitHub Actions for continuous data quality and FAIR compliance
How to Use FAIRy: Step by Step
1. Set Up Your Project
- Clone or generate your project using the Cookiecutter FAIR RDM template (or set up the folder structure as shown in
plan.md). - Place your data files in the
data/directory (e.g.,data/raw/).
2. Enforce and Customize Naming Conventions
- Edit
.project_config.jsonto set your initial naming convention regex. - Run the interactive regex builder to refine your rules:
powershell python src/utils/regex_builder.py- Test filenames and update the regex as needed.
Using the Regex Builder via CLI
You can launch the interactive regex builder at any time with:
bash
fairy --regex-builder
This will run the regex builder script and allow you to customize your naming convention interactively. The changes will be saved to .project_config.json.
Alternatively, you can still run it directly with:
bash
python src/utils/regex_builder.py
3. Generate a Data Dictionary
- Run the data dictionary generator to scan your data files and create a metadata-rich dictionary:
powershell python src/checks/generate_data_dictionary.py- This creates/updates
docs/data_dictionaries/data_dictionary.json. - Edit this file to add descriptions, types, allowed values, etc. for each column.
- This creates/updates
4. Check Data Quality
- Run the quality check script to validate your data against the data dictionary:
bash python src/checks/quality_check.py- This will report issues such as missing columns, type errors, invalid values, duplicates, and missing data.
5. (Advanced) Generate Great Expectations Suite from Data Dictionary
- If you want to generate a Great Expectations suite from your data dictionary CSV, use:
bash python src/utils/csv_to_ge_suite.py <data_dictionary.csv> <data_file.csv>- This will create a GE suite for advanced data validation workflows (optional).
- Note: The core FAIRy quality checks do not require Great Expectations and are tested independently for reliability.
6. Prepare Zenodo Metadata
- If you need to deposit your data in Zenodo, generate a metadata CSV (or use the template):
bash python src/utils/generate_zenodo_json.py input.csv .zenodo.json- If
input.csvdoes not exist, a template will be created for you to fill in. - Edit the CSV, then rerun the command to generate
.zenodo.json.
- If
7. Automate with GitHub Actions
- The provided workflows in
.github/workflows/will automatically check naming conventions and data quality on every push or pull request.
Quick Project Scaffolding with Cookiecutter
Clone the FAIRy template repository:
bash git clone https://github.com/martinschatz-cz/FAIRy.git cd FAIRyRun Cookiecutter from the template root:
bash cookiecutter .- Answer the prompts.
- Your new project will be created in a new folder.
Change into your new project folder and follow the README instructions.
Note:
- Do NOT run cookiecutter . from inside a generated project or a non-template folder.
- The fairy CLI is for running FAIRy’s Python tools inside your generated project, not for project scaffolding.
Using Cookiecutter to Start a New FAIRy Project
You can use Cookiecutter to quickly scaffold a new FAIR-compliant research data management project using this template:
Install Cookiecutter (if you haven't already):
bash pip install cookiecutterGenerate a new project using this template:
- If you have this repository locally, run:
bash cookiecutter .from the root of this repository. - Or, use a remote repository (replace URL as needed):
bash cookiecutter https://github.com/martinschatz-cz/FAIRy.git
- If you have this repository locally, run:
Answer the prompts to configure your new project (project name, config file name, etc.).
Your new project will be created in a new folder, with all the structure and scripts described below.
Follow the steps in the generated README of your new project to set up naming conventions, generate data dictionaries, check data quality, and automate with GitHub Actions.
FAIRy Command-Line Shortcuts
You can run all major FAIRy functions from the command line using the fairy command with the following options:
fairy --regex-builder— Launch the interactive regex builder to customize your naming convention.fairy --check-naming— Check all files in your data directory for naming convention compliance.fairy --generate-data-dictionary [--config <config.json>] [--out <output.json>]— Generate or update the data dictionary. You can specify a custom config file and output path.fairy --quality-check— Run the data quality check using your data dictionary. This command prints a detailed, user-friendly report for each file and column. If all checks pass, it will printAll files passed all quality checks!so you always know your data is fully compliant.fairy --zenodo-template— Generate a Zenodo metadata CSV template (input.csv).fairy --zenodo-json --csv <input.csv> --out <output.json>— Convert a metadata CSV to a Zenodo JSON file for upload.
These shortcuts make it easy to use FAIRy features without remembering long script paths. For example:
bash
fairy --generate-data-dictionary --config myconfig.json --out mydict.json
fairy --zenodo-json --csv input.csv --out .zenodo.json
Testing and Development Notes
- All core logic (including data dictionary parsing and quality checks) is tested with unit tests in
tests/. - Tests for CSV-to-expectations logic are decoupled from Great Expectations and use pandas for robust, fast validation.
- To run all tests:
bash pytest
Example Workflow
- Add a new CSV file to
data/raw/. - Run the data dictionary generator:
powershell python src/checks/generate_data_dictionary.py - Edit
docs/data_dictionaries/data_dictionary.jsonto fill in metadata for each column. - Run the quality check:
powershell python src/checks/quality_check.py - Fix any reported issues in your data.
- Prepare Zenodo metadata as needed.
For more details, see the documentation in the docs/ folder.
Owner
- Name: Martin Schätz
- Login: martinschatz-cz
- Kind: user
- Location: Prague, Czech republic
- Company: UCT Prague, VMCF - Science Faculty of Charles University, Natinal Technical Library in Prague
- Website: www.schaetz.cz
- Twitter: SchatzCZ
- Repositories: 9
- Profile: https://github.com/martinschatz-cz
BioImage Analyst
GitHub Events
Total
- Issues event: 1
- Push event: 1
Last Year
- Issues event: 1
- Push event: 1
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Martin Schätz | m****z@g****m | 7 |
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- martinschatz-cz (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- mcr.microsoft.com/devcontainers/python 3.10 build
- great_expectations *
- pandas *
- great_expectations *
- pandas *
- pytest *