Command Line Interface Programs

The CLI of cedar is built using Click.

cedar

The main entrypoint to the CEDAR command line interface. Controls program-wide features like logging verbosity and configuration file specification.

Usage: cedar [OPTIONS] COMMAND [ARGS]...

  cedar command line interface

Options:
  -C, --config_file FILE  Configuration file
  --version               Show the version and exit.
  -v, --verbose           Be verbose
  -q, --quiet             Be quiet
  -h, --help              Show this message and exit.

Commands:
  auth      Log in to GEE pre-ARD services
  clean     Clean/delete exported "pre-ARD" data from storage
  config    Create or check cedar configuration files
  console   Enter cedar interactive console
  convert   Convert downloaded "pre-ARD" data to ARD NetCDFs
  download  Download exported "pre-ARD" data from storage
  gee       Check status GEE tasks
  status    Check status of tasks and exports
  submit    Submit "pre-ARD" data processing tasks

cedar auth

The group of commands used for authenticating and testing authentication against the various services used by the project (GEE and GDrive or GCS).

Usage: cedar auth [OPTIONS] COMMAND [ARGS]...

  Log in to GEE pre-ARD services

Options:
  -h, --help  Show this message and exit.

Commands:
  clear   Clear credentials
  ee      Test logging into to GEE service
  gcs     Login to use Google Cloud Storage
  gdrive  Login to use Google Drive

cedar auth ee

Used to test authentication with the Google Earth Engine API.

Usage: cedar auth ee [OPTIONS]

  Test logging into to GEE service

Options:
  -h, --help  Show this message and exit.

cedar auth gdrive

Used to help authenticate and test authentication with the Google Drive API.

Usage: cedar auth gdrive [OPTIONS]

  Login to use Google Drive

Options:
  --client_secrets_file FILE  OAuth2 "client secrets" file
  --credentials_file FILE     OAuth2 credentials
  --browser                   Open a web browser instead of terminal to
                              authenticate
  -h, --help                  Show this message and exit.

cedar auth gcs

Used to test authentication with the Google Cloud Storage API.

Usage: cedar auth gcs [OPTIONS]

  Login to use Google Cloud Storage

Options:
  --service_account_file PATH  Google service account file for GCS
  --project TEXT               GCS project to use
  -h, --help                   Show this message and exit.

cedar config

The group of commands used to generate and validate configuration files.

cedar config print

Validates and prints your configuration file.

Usage: cedar config print [OPTIONS] CONFIG_FILE

  This program should help you check your config file is valid

Options:
  -h, --help  Show this message and exit.

cedar config template

Prints or saves a template configuration file that you can modify.

Usage: cedar config template [OPTIONS] [DEST]

  Generate a template configuration file

Options:
  --comment   Comment out the template file
  -h, --help  Show this message and exit.

cedar submit

Command to submit “pre-ARD” creation orders to the GEE.

Usage: cedar submit [OPTIONS] IMAGE_COLLECTION...

  Submit "pre-ARD" processing orders and create tracking metadata

Options:
  -i, --index <INTEGER INTEGER>...
                                  TileGrid (row, col) index(es) to submit
  -r, --row INTEGER               TileGrid row(s) to submit. Use in
                                  conjunction with `--col`
  -c, --col INTEGER               TileGrid col(s) to submit. Use in
                                  conjunction with `--row`
  --period_start TEXT             Starting time period for submission
  --period_end TEXT               Ending time period for submission
  --period_freq TEXT              Split start/end time into periods of this
                                  frequency
  --date_format TEXT              Format string for dates  [default: %Y-%m-%d]
  -h, --help                      Show this message and exit.

cedar gee

Group of commands for checking on GEE tasks

Usage: cedar gee [OPTIONS] COMMAND [ARGS]...

Options:
  -h, --help  Show this message and exit.

Commands:
  tasks  List Google Earth Engine tasks

cedar gee tasks

List or summarize GEE tasks

Usage: cedar gee tasks [OPTIONS]

  Get info about Google Earth Engine tasks

Options:
  --list      List information for all tasks
  -h, --help  Show this message and exit.

cedar status

Group of commands to check “pre-ARD” orders

Usage: cedar status [OPTIONS] COMMAND [ARGS]...

  Programs for checking, printing, modifying, and cancelling orders

Options:
  -h, --help  Show this message and exit.

Commands:
  cancel     Cancel Earth Engine tasks for this order
  completed  Check if order has completed
  list       List tracked metadata
  print      Print job tracking info
  update     Update tracking info

cedar status list

List tracked “pre-ARD” orders.

Usage: cedar status list [OPTIONS]

  List tracked orders

Options:
  -h, --help  Show this message and exit.

cedar status print

Print “pre-ARD” order tracking metadata

Usage: cedar status print [OPTIONS] TRACKING_NAME

  Print job submission tracking info

Options:
  --order INTEGER  Display verbose info about a specific order
  --all            Display verbose info about all orders
  -h, --help       Show this message and exit.

cedar status update

Read “pre-ARD” order tracking metadata and update with GEE task status

Usage: cedar status update [OPTIONS] [TRACKING_NAME]

  Update job submission tracking info

Options:
  --all             Update all tracked orders
  --dest DIRECTORY  Save a local copy of tracking information to this folder
  -h, --help        Show this message and exit.

cedar status completed

Check if a submitted order has completed. The exit code of this program will be 0 if completed and 1 otherwise, making it potentially useful as part of a larger pipeline.

Usage: cedar status completed [OPTIONS] TRACKING_NAME

  Print percent of order completed & exit 1 if not complete

Options:
  --update    Update the tracking info before continuing
  -h, --help  Show this message and exit.

cedar download

Read “pre-ARD” order tracking metadata and update with GEE task status

Usage: cedar download [OPTIONS] TRACKING_NAME

  Download pre-ARD for a tracked order

  Downloads data into a directory named after the order name. Pass
  ``--dest`` to change the root location of this directory.

  TODO
  ----
  * Silence / don't use progressbar if we're quiet

Options:
  --update          Update the tracking info before continuing
  --clean           Run `cedar clean` for order if completed and successfully
                    downloaded
  --dest DIRECTORY  Specify destination root directory. If not specified,
                    downloads order into current directory
  --overwrite       Overwrite existing files
  -h, --help        Show this message and exit.

cedar clean

Delete “pre-ARD” images and metadata that have been exported to your storage as part of a CEDAR order.

Usage: cedar clean [OPTIONS] TRACKING_NAME

  Clean pre-ARD described by tracking information

Options:
  --keep-tracking  Preserve tracking information (deleted by default)
  -h, --help       Show this message and exit.

cedar convert

Convert “pre-ARD” images and metadata (GeoTIFFs and JSON) to ARD.

Usage: cedar convert [OPTIONS] PREARD

  Convert "pre-ARD" GeoTIFF(s) to ARD data cubes in NetCDF4 format

Options:
  --dest DIRECTORY             Override config file destination directory
  --executor <CHOICE TEXT>...  Configure parallel processing options for Dask
                               locally ("sync", "threads", or "processes") or
                               using Distributed ("distributed"). Must provide
                               either worker count or scheduler address
                               (ip:port).  [default: sync, None]
  --overwrite                  Overwrite existing files
  --skip-metadata              Skip copying the metadata
  -h, --help                   Show this message and exit.