Skip to main content

A cli for validating metadata, packaging ROCrates, and interacting with the FAIRSCAPE API

Project description

fairscape-cli

Data Validation and Packaging utility for sending evidence graphs to FAIRSCAPE

Functional Description

The fairscape-cli tool is used for client side remote teams to validate and assemble metadata. This tool is a command line interface for use in a command prompt or bash scripts. It will be used to construct RO crates with full providence preserved in the EVI ontology, and then transfer them into the fairscape ecosystem. This requires reserving identifiers, and authenticating against fairscape.

All installation requires is python 3 and using pip to install. An additional dependancy is sqlite as the tool will maintain a local cached record of all metadata records and RO crates assembled.

User interface

Validation


# take any class or list of objects
# and validate against pydantic
fairscape validate json ./path_to_json.json

Validating Individual Classes

fairscape validate dataset ./tests/data/dataset.json
fairscape validate software ./tests/data/software.json
fairscape validate computation ./tests/data/computation.json

ROCrate

# create a new ROcrate
fairscape rocrate create \
        --id "ark:5982/UVA/b2ai/examplecrate" \
        --name "b2ai example rocrate" \
        --organization "ark:5982/UVA" \
        --project "ark:5982/UVA/b2ai" \
        --path "./tests/example_rocrate"

Adding Contents


fairscape rocrate add dataset \
        --crateid "ark:5982/UVA/b2ai/examplecrate" \
        --id "ark:5982/UVA/b2ai/examplecrate/test-dataset" \
        --name "MuSIC software" \
        --source <PATH>

fairscape rocrate add software \
        --crateid "ark:5982/UVA/b2ai/examplecrate" \
        --id "ark:5982/UVA/b2ai/examplecrate/MuSIC" \
        --name "MuSIC software" \
        --source "https://github.com/idekerlab/MuSIC" 

fairscape rocrate add computation \
        --crateid "ark:5982/UVA/b2ai/examplecrate" \
        --id "ark:5982/UVA/b2ai/examplecrate/test-computation" \
        --name "b2ai computation" \
        --usedSoftware "ark:5982/UVA/b2ai/examplecrate/MuSIC" \
        --usedDataset "ark:5982/UVA/b2ai/examplecrate/test-dataset" \
        --generated "ark:5982/UVA/b2ai/examplecrate/test-results"

fairscape rocrate dumpmetadata

fairscape rocrate hash --id <CRATEID>

# creating gzipped output of full ROcrate with metadata
fairscape rocrate package --output-path ./

# list ROcrates
fairscape list ROcrate
fairscape describe ROcrate --id --name


# describe identifier metadata
fairscape describe --id "ark:5982/UVA/b2ai"
fairscape describe --name "b2ai computation"

Improving UX by removing arguments from previous commands

fairscape rocrate create ... --path ./myrocrate

cd myrocrate

# there is a hidden file created
# ./myrocrate/.metadata.sqlite
# it could be on another path
# has metadata on the following
#  - organization
#  - project
#  - author

fairscape add dataset ... --path /mnt/results/mytestfile.csv

# fairscape has every parameter required to auto generate identifiers
# ark:5982/<ORGANIZATION>/<PROJECT>/<ROCRATE>/postfix

fairscape setcontext crateid --id <CRATEID>

fairscape rocrate add compution/dataset/software/etc... 

Design Considerations

Dealing with Remote Content

remote paths examples

  1. github domain
  1. S3
  • s3://example-bucket/path/to/object
  • http(s)://<bucket>.s3.amazonaws.com/<object>
  • http(s)://s3.amazonaws.com//
    1. Local File URI

    2. identifier

    • Zenodo DOI
    1. external filesystems
    • RIVANNA project storage smb://qumulo.rc.virginia.edu/
    
    ## Milestones
    
    - 02-23
      - [ ] validate json command
      - [ ] pypi package for classes based on linkml description
    
    
    - 02-25
      - [ ] validate software
      - [ ] validate dataset
      - [ ] validate computation
    
    - 02-27
      - [ ] ROcrate create
      - [ ] ROcrate add software
      - [ ] ROcrate add dataset
      - [ ] ROcrate add computation
    
    - 02-28
      - [ ] ROcrate hash
      - [ ] list ROcrate
      - [ ] describe ROcrate
    
    

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

fairscape_cli-0.1.5a4.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

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

fairscape_cli-0.1.5a4-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file fairscape_cli-0.1.5a4.tar.gz.

File metadata

  • Download URL: fairscape_cli-0.1.5a4.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for fairscape_cli-0.1.5a4.tar.gz
Algorithm Hash digest
SHA256 717a675d79abfcc42adff2852af78361fbe810cab5379b88cfd6e37bddaf4f17
MD5 d7766ca6585610c407dfebe145a738cd
BLAKE2b-256 49eba2cd436f25689368631bea0cb338e799bcfba0ef349d89fc625cede234a9

See more details on using hashes here.

File details

Details for the file fairscape_cli-0.1.5a4-py3-none-any.whl.

File metadata

File hashes

Hashes for fairscape_cli-0.1.5a4-py3-none-any.whl
Algorithm Hash digest
SHA256 7f65b7ec13d7972e95a3bd2f9678804b3f439c79ed1782aa904d9dfe5f9e7663
MD5 19a9b762cf94549035e402e90a16f580
BLAKE2b-256 95b6e84b3a2d60f412f60652e424b895c779969e2768cf4a1cdc959491f1ded8

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