Skip to main content

A package to create, publish, and download research datasets

Project description

fairly

A package to create, publish and clone research datasets.

License: MIT

Installation

fairly requires Python 3.8 or later, and it can be installed directly using PIP.

pip install fairly

Installing from source

  1. Clone or download the source code:

    git clone https://github.com/ITC-CRIB/fairly.git
    
  2. Go to the root directory:

    cd fairly/
    
  3. Compile and install using PIP:

    pip install .
    

Usage

Basic example to create a local research dataset and deposit it to a repository:

import fairly

# Initialize a local dataset
dataset = fairly.init_dataset('/path/dataset')

# Set metadata
dataset.metadata['license'] = 'MIT'
dataset.set_metadata(
	title='My dataset',
	keywords=['FAIR', 'research', 'data'],
	authors=[
		'0000-0002-0156-185X',
		{'name': 'John', 'surname': 'Doe'}
	]
)

# Add data files
dataset.includes.extend([
	'README.txt',
	'*.csv',
	'train/*.jpg'
])

# Save dataset
dataset.save()

# Upload to a data repository
remote_dataset = dataset.upload('zenodo')

Basic example to access a remote dataset and store it locally:

import fairly

# Open a remote dataset
dataset = fairly.dataset('doi:10.4121/21588096.v1')

# Get dataset information
dataset.id
>>> {'id': '21588096', 'version': '1'}

dataset.url
>>> 'https://data.4tu.nl/articles/dataset/.../21588096/1'

dataset.size
>>> 33339

len(dataset.files)
>>> 6

dataset.metadata
>>> Metadata({'keywords': ['Earthquakes', 'precursor', ...], ...})

# Update metadata
dataset.metadata['keywords'] = ['Landslides', 'precursor']
dataset.save()

# Store dataset to a local directory (i.e. clone dataset)
local_dataset = dataset.store('/path/dataset')

Currently, the package supports the following research data management platforms:

All research data repositories based on the listed platforms are supported.

For more details and examples, consult the package documentation.

Testing

Unit tests can be run by using pytest command in the root directory.

Contributions

Read the guidelines to know how you can be part of this open source project.

Citation

Please cite this software using as follows:

Girgin, S., Garcia Alvarez, M., & Urra Llanusa, J., fairly: a package to create, publish and clone research datasets [Computer software]

Acknowledgements

This research is funded by the Dutch Research Council (NWO) Open Science Fund, File No. 203.001.114.

Project members:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fairly-0.2.1.tar.gz (208.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fairly-0.2.1-py3-none-any.whl (222.6 kB view details)

Uploaded Python 3

File details

Details for the file fairly-0.2.1.tar.gz.

File metadata

  • Download URL: fairly-0.2.1.tar.gz
  • Upload date:
  • Size: 208.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for fairly-0.2.1.tar.gz
Algorithm Hash digest
SHA256 576f57c28a162133aef745401a51f9f4fa5f471f33a4acd1e8018138e0dd4699
MD5 b3942a475338cb55ec99c31c1282e160
BLAKE2b-256 c76c365313927c0d2d554cb7270157add7d73f8d865f2dab6b44d621cbdb0382

See more details on using hashes here.

File details

Details for the file fairly-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: fairly-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 222.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for fairly-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da282a017a41c4e3418f73c901dc0c718342224822fee60beccb957294676285
MD5 50ffd8f8e3b31008f6eb3a3298a1b321
BLAKE2b-256 1266bf363d44b9ba15b423f06e72b56aae8c38f3351e44180348434d38a61648

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page