Skip to content

Expose gedi CLI to users#108

Merged
chuckwondo merged 1 commit intomainfrom
cli
Feb 28, 2025
Merged

Expose gedi CLI to users#108
chuckwondo merged 1 commit intomainfrom
cli

Conversation

@chuckwondo
Copy link
Collaborator

This PR adjusts the project configuration such that the command gedi is exposed when the subsetter is installed. The changes are quite small because the CLI has always existed (so that the algorithm's "run" script [subset.sh] can call it), but it simply was not previously configured as a package entry point.

Given that we now use pixi, we can see this works as follows:

$ pixi run gedi --help
                                                                                                       
 Usage: gedi [OPTIONS]                                                                                 
                                                                                                       
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────╮
│ *  --aoi                                FILE     Area of Interest (path to GeoJSON file) [required] │
│ *  --doi                                TEXT     Digital Object Identifier (DOI) of collection to   │
│                                                  subset (https://www.doi.org/), or one of these     │
│                                                  logical, case-insensitive names: L1B, L2A, L2B,    │
│                                                  L4A, L4C                                           │
│                                                  [required]                                         │
│ *  --lat                                TEXT     Latitude dataset used in the geometry of the       │
│                                                  dataframe                                          │
│                                                  [required]                                         │
│ *  --lon                                TEXT     Longitude dataset used in the geometry of the      │
│                                                  dataframe                                          │
│                                                  [required]                                         │
│ *  --columns                            TEXT     Comma-separated list of columns to select          │
│                                                  [required]                                         │
│ *  --output         -o                  PATH     Output file path for generated subset file         │
│                                                  [default: None]                                    │
│                                                  [required]                                         │
│    --beams                              TEXT     Which beams to include in the subset.  Must be     │
│                                                  'all', 'coverage', 'power', OR a comma-separated   │
│                                                  list of beam names, with or without the 'BEAM'     │
│                                                  prefix (e.g., 'BEAM0000,BEAM0001' or '0000,0001')  │
│                                                  [default: all]                                     │
│    --query                              TEXT     Boolean query expression to select rows            │
│                                                  [default: None]                                    │
│    --limit                              INTEGER  Maximum number of granules to subset               │
│                                                  [default: 100000]                                  │
│    --temporal                           TEXT     Temporal range to subset (e.g.,                    │
│                                                  '2019-01-01T00:00:00Z,2020-01-01T00:00:00Z')       │
│                                                  [default: None]                                    │
│    --verbose            --no-verbose             Provide verbose output [default: no-verbose]       │
│    --fsspec-kwargs                      JSON     Keyword arguments (as JSON object) to pass to      │
│                                                  fsspec.url_to_fs for reading HDF5 files            │
│                                                  [default: None]                                    │
│    --processes                          INTEGER  Number of processes to use for parallel processing │
│                                                  [default: 8]                                       │
│    --help                                        Show this message and exit.                        │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯

Fixes #95

@chuckwondo chuckwondo requested a review from jjfrench February 27, 2025 20:39
@chuckwondo chuckwondo merged commit 0d010ea into main Feb 28, 2025
4 checks passed
@chuckwondo chuckwondo deleted the cli branch February 28, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CLI command upon installation of the GEDI Subsetter package

2 participants