compliance-trestle icon indicating copy to clipboard operation
compliance-trestle copied to clipboard

`trestle author catalog-generate` command has misleading `-n` option documentation and only works for one particular catalog json file

Open Ma1h01 opened this issue 6 months ago • 1 comments

Describe the bug

There are two potential issues regarding the trestle author catalog-generate command:

  1. The documentation shows that the -n option looks for the name of the catalog model in the trestle workspace. But it, in fact, looks for the sub-directory of catalogs/ that contains the catalog JSON file we want to generate markdowns from.
  2. The command only works for the catalog file named specifically catalog.json. Any other names would cause an error.

To Reproduce

Steps to reproduce the behavior:

  1. Initalizae a trestle workspace
  2. Import a catalog JSON file to the catalogs/, and ensure it is NOT named catalog.json
  3. Create a directory md/ in the root to store the markdowns
  4. Run trestle author catalog-generate -n catalog -o md/ to reproduce the first issue.
  5. Run trestle author catalog-generate -n . -o md/ to reproduce the second issue.

Expected behavior

The -n option documentation should match what it is looking for.
The command should also work on catalog JSON files named other than catalog.json

Screenshots / Logs.

Environment

  • OS: [e.g. iOS]
  • Python version:
  • Installed packages:

Ma1h01 avatar Jul 31 '24 03:07 Ma1h01