Skip to content

v1.3.0: gcamreader

Choose a tag to compare

@crvernon crvernon released this 23 Aug 17:27
· 38 commits to main since this release
55a71c6

🥳 A new CLI was introduced by @publicmatt enabling the following:

python3 -m gcamreader -d /path/to/database -q /path/to/query.xml -o /path/to/output

This will run query.xml against database and output a .csv file for each query in the batch to output/*.csv

By default, the cli works with a local database, but a similar command for remote is also available:

python3 -m gcamreader remote --username admin --hostname localhost -d database_basex_[...] -q /path/to/query.xml -o /path/to/output

By default, the password flag can be left off, in which case, the user will be prompted for one. Additionally, the port number defaults to 8984, which is similar to the source.

Additionally, help docs can be accessed with:

> python3 -m gcamreader --help

Usage: python -m gcamreader [OPTIONS] COMMAND [ARGS]...

  Run queries against a gcam scenario database.

      Saves outputs as .csv

  Documentation: https://github.com/JGCRI/gcamreader/

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  local*  query gcam scenario databases
  remote  query a remote server containing gcam scenario databases

And version number can be viewed as well:

 > python3 -m gcamreader --version
python -m gcamreader, version 1.2.6

This commit adds the following dependencies for the cli functionality:

  • click
  • click-default-group-wheel