CEOS-ARD CLI
CLI for working with the CEOS-ARD building blocks and PFSes.
- Getting Started
- Commands
ceos-ard compile: Compile PFS document to a Markdown fileceos-ard generate: Create Word/HTML/PDF documents for a single PFSceos-ard generate-all: Create Word/HTML/PDF documents for all PFSesceos-ard validate: Validate CEOS-ARD componentsceos-ard check-changes: Check for missing changelog entries- Document History
- Development
Getting Started
In order to make working with CEOS-ARD easier we have developed command-line interface (CLI) tools.
Installation
Pixi is a modern package management tool that handles both conda and PyPI dependencies.
- Install Pixi by following the installation instructions (don't follow the "Get Started" instructions, you only need to run the single command provided in the "Installation" section).
- Clone this repository and the ceos-ard repository:
git clone https://github.com/ceos-org/ceos-ardgit 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 the CLI
- Run
pixi shell - Switch into the folder that contains the contents of the
ceos-ardrepository:cd ../ceos-ard - Run
ceos-ardwith the command you want to execute, e.g.ceos-ard generate-all -o build
See the available commands for further details.
Commands
ceos-ard compile: Compile PFS document to a Markdown file
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 NRB.
Check ceos-ard compile --help (or ceos-ard compile --help) for more details.
ceos-ard generate: Create Word/HTML/PDF documents for a single PFS
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 NRB.
To create a combined PFS, e.g. SAR, the following command can be used:
ceos-ard generate NRB POL ORB GSLC -o ../ceos-ard/build/Combined-SAR -i ../ceos-ard --title="Combined Synthetic Aperture Radar" --pfs-type="SAR" --id="SAR"
By default, HTML, PDF, and Word documents are generated.
Pass --pdf to skip the PDF output and/or --docx to skip the Word output; the HTML version is always generated.
If the templates in the input directory provide the pandoc Lua filter templates/toc.lua, it is used to add a table of contents.
Check ceos-ard generate --help (or ceos-ard generate --help) for more details.
ceos-ard generate-all: Create Word/HTML/PDF documents for all PFSes
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
As with ceos-ard generate, pass --pdf and/or --docx to skip the PDF and/or Word outputs.
Check ceos-ard generate-all --help (or ceos-ard generate-all --help) for more details.
ceos-ard validate: Validate CEOS-ARD components
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.
ceos-ard check-changes: Check for missing changelog entries
To check that all building blocks that have been changed compared to a git branch have a new entry in their changes, run:
- With Pixi:
ceos-ard check-changes --base main - With traditional setup:
ceos-ard check-changes --base main
The working tree is compared against the merge base of the given git ref and HEAD.
Files that only differ in changes or history don't need a new entry.
Requires that git is installed. The command exits with a non-zero exit code if entries are missing, so it can be used in CI.
Check ceos-ard check-changes --help for more details.
Document History
By default, the generated documents don't include the document history as compiling it requires the git history and network access.
Pass --history to ceos-ard compile, ceos-ard generate, or ceos-ard generate-all to compile it, e.g. ceos-ard generate ST --history --stable.
The input directory must be a git checkout with the full history and the release tags (e.g. fetch-depth: 0 for actions/checkout, or git fetch --tags locally).
The document history is compiled from the changes of the PFS document and of all building blocks that are used by the PFS.
The changes are grouped by the GitHub releases of the PFS (tags <PFS>-v<major>.<minor>.<patch>), draft releases and pre-releases are ignored.
As releases are always created from main, a change is part of a release if the commit that merged it into main
(the first commit in the first-parent history of HEAD that contains the change) is an ancestor of the release tag.
Edited changes and changes in renamed files keep their original commit.
Changes that are not part of a release are listed for the draft version, together with the next version number that the changes suggest.
This also applies if the version of the PFS document has been released already.
Only the changes back to the previous major version are listed.
Patch-level (editorial) changes are not listed, pass --patch-changes to list them as well.
They are still considered for the change level of a version and the proposed next version number.
For each of these releases, only the changes of building blocks that were part of the PFS in that release are listed,
including the glossary terms that were referenced by them and following renamed files.
Building blocks that have been deleted since are read from the release tag.
If HEAD has a release tag for the PFS, its version must match the version of the PFS document.
If no release exists on GitHub yet, no document history is generated. If versions before the oldest listed version exist (e.g. legacy documents before the first GitHub release), the document history refers to them. Combined documents never include a document history.
The history is rendered as a table per version with one row per building block (document first, then sections, requirements and glossary terms in document order), listing its changes from the oldest to the newest and the highest change level. As Markdown tables can't contain lists or multiple paragraphs, the template emits the rows as fenced divs and the pandoc Lua filter templates/changelog-table.lua from the ceos-ard repository converts them into a table. The filter is only loaded if the file exists.
The releases are read from the GitHub repository ceos-org/ceos-ard, which can be changed with --github-repo.
A GitHub token can be provided through the GITHUB_TOKEN environment variable to avoid rate limits.
Development
- 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 -e dev 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.
Metadata
Release files for ceos-ard-cli 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ceos_ard_cli-0.6.1.tar.gz | 60.1 kB | Without provenance | Details for ceos_ard_cli-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ceos_ard_cli-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for ceos_ard_cli-0.6.1-py3-none-any.whl |
Total release size: 98.6 kB
Release files / ceos_ard_cli-0.6.1.tar.gz
| Download URL | ceos_ard_cli-0.6.1.tar.gz |
|---|---|
| Size | 60.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b055d931fa05f9afe1f2bc330c51e16d27525b06cfeb305b82112eeaa69457c
|
|
BLAKE2b-256 checksum How to use checksums |
a066543f32ea1279925104b9832a934de5ac3db3bae9de1f6605133f3822052e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / ceos_ard_cli-0.6.1-py3-none-any.whl
| Download URL | ceos_ard_cli-0.6.1-py3-none-any.whl |
|---|---|
| Size | 38.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8a55b62ff0033509c94b4e5299693684c0d93373d40563d7453537e61f6109f
|
|
BLAKE2b-256 checksum How to use checksums |
333cacfc478f15482ba1c18d88ec7c1286994d6002abeaf5d0dfbd0754616b03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for ceos-ard-cli 0.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.