CLI for working with the CEOS-ARD building blocks and PFSes.
In order to make working with CEOS-ARD easier we have developed command-line interface (CLI) tools.
Pixi is a modern package management tool that handles both conda and PyPI dependencies.
- Install Pixi by following the installation instructions
- Clone this repository:
git clone https://github.com/ceos-org/ceos-ard-cli
- Navigate to the directory:
cd ceos-ard-cli
- Install dependencies:
pixi install
- Install browser for PDF rendering:
pixi run install-browser
- Run
pixi shell
- Switch into the folder that contains the contents of the
ceos-ard
repository - Run
ceos-ard
with the command you want to execute, e.g.ceos-ard generate-all -o build
See the available commands for further details.
To compile a PFS document to a Markdown file, run:
- With Pixi:
ceos-ard compile SR
- With traditional setup:
ceos-ard compile SR
The last part is the PFS to create, e.g. SR
or SAR-NRB
.
Check ceos-ard compile --help
(or ceos-ard compile --help
) for more details.
To create the Word, HTML, and PDF versions of a single PFS, run:
- With Pixi:
ceos-ard generate SR
- With traditional setup:
ceos-ard generate SR
The last part is the PFS to create, e.g. SR
or SAR-NRB
.
Check ceos-ard generate --help
(or ceos-ard generate --help
) for more details.
To create the Word, HTML, and PDF versions for all PFSes, run:
- With Pixi:
ceos-ard generate-all
- With traditional setup:
ceos-ard generate-all
Check ceos-ard generate-all --help
(or ceos-ard generate-all --help
) for more details.
To validate (most of) the building blocks, run:
- With Pixi:
ceos-ard validate
- With traditional setup:
ceos-ard validate
Check ceos-ard validate --help
(or ceos-ard validate --help
) for more details.
- Fork this repository if you plan to change the code or create pull requests.
- Clone either your forked repository or this repository, e.g.
git clone https://github.com/ceos-org/ceos-ard-cli
- Switch into the newly created folder:
cd ceos-ard-cli
- Follow the Installation instructions above
- Install dependencies and set up the development environment:
pixi run install-dev
- Switch into the development envionment:
pixi shell -e dev
- You can now run the CLI in development mode as normal.
- Run the checks (lint, format, tests) through
pixi run check-all
- Optionally, you can install pre-commit hooks (
pre-commit install
) to run lint and format automatically for each commit.