ACED-IDP / gen3_util

Collection of command line tools to interact with a Gen3 instance
MIT License
3 stars 1 forks source link

Simplify CLI user interface #34

Closed bwalsh closed 10 months ago

bwalsh commented 11 months ago

from https://ohsucomputationalbio.slack.com/archives/D0AQV57D2/p1703194001745479

Metadata operations

Copy project meta to local storage

gen3_util meta pull --profile=aced --project_id=aced-test <PATH-TO-FHIR>

FHIR to TSV

gen3_util meta to_tabular <PATH-TO-FHIR> <PATH-TO-TABULAR>

FHIR to Excel

gen3_util meta to_tabular --excel <PATH-TO-FHIR> <PATH-TO-TABULAR>

TSV to FHIR

gen3_util meta from_tabular <PATH-TO-TABULAR> <PATH-TO-FHIR>

Validate local files

gen3_util meta validate <PATH-TO-FHIR>

Push local FHIR to Gen3 instance

gen3_util meta push --profile=aced --project_id=aced-test <PATH-TO-FHIR>

File Operations

List files in a project

gen3_util files ls-remote

Remove files from a project index and bucket

gen3_util files rm-remote <REMOTE-ID>

or

gen3_util files rm --remote <REMOTE-ID>

Add file meta information to current index

gen3_util files add <LOCAL-PATH>

Read working index

gen3_util files status

Upload working index and files

gen3_util files push

Remove local file(s) from working index

gen3_util files rm <LOCAL-PATH>
bwalsh commented 11 months ago

@kellrott I believe that files ls will always be "remote" because files status will list current working index

bwalsh commented 11 months ago

Current files vocabulary:

Usage: gen3_util files [OPTIONS] COMMAND [ARGS]...

  Manage file transfers.

Options:
  --help  Show this message and exit.

Commands:
  ls      List uploaded files in a project bucket.
  add     Add file to the working index.
  status  List files in working index.
  push    Upload working index to project bucket.
  rm      Remove files from the working index or project bucket.
bwalsh commented 11 months ago

Current meta vocabulary:

Usage: gen3_util meta [OPTIONS] COMMAND [ARGS]...

  Manage meta data.

Options:
  --help  Show this message and exit.

Commands:
  create        Create minimal study metadata from uploaded files
  pull          Retrieve all FHIR meta data from portal
  to_tabular    Convert FHIR to tabular format
  from_tabular  Convert tabular to FHIR format
  validate      Validate FHIR data
  push          Publish FHIR meta data on the portal