This PR provides functionality to access nested keys in the list command, typically the nested keys of the organization dictionary, or the keys of lists such as tags and groups.
As a result of changing the global git config handling line endings, all(?) many lines of code appeared to have changed but I believe this is just a line ending change.
Versioning
hdx-cli-toolkit uses the CalVer versioning scheme with format YYYY.MM.Micro i.e. 2022.12.1 which is updated manually in pyproject.toml. The "Micro" component is simply an integer increased by 1 at each version, starting from 0.
[x] Version updated in pyproject.toml and PR description
[x] Update README.md and DEMO.md with any new CLI commands
resources – produced a dictionary that didn’t fit in the table – it will output correctly to file – FIXED by providing an information message:
Field 'resources' is list or dict type, use --output_path to see full output
resources.fs_check_info.state – fails because it is 3 keys deep and first two are lists – FIXED by providing message:
resources.fs_check_info.state is nested to depth 3, maximum depth is 2
resources.nonsense – returns five rows with “absent key” – I think this behaviour is correct, we may have situations where some items in the list have the key but others don't - WONTFIX
Purpose
Version for this PR: 2024.7.1
This PR provides functionality to access nested keys in the
list
command, typically the nested keys of theorganization
dictionary, or the keys of lists such astags
andgroups
.5
Major file changes
The major change is the introduction of a new function,
query_dict
which is added toutilities.py
and tested intest_utilities.py
. It is invoked in the "list" command incli.py
: https://github.com/OCHA-DAP/hdx-cli-toolkit/blob/28fe9d8d60e59237b771e449540799c74bfd2d6b/src/hdx_cli_toolkit/cli.py#L102Minor file changes
As a result of changing the global git config handling line endings, all(?) many lines of code appeared to have changed but I believe this is just a line ending change.
Versioning
hdx-cli-toolkit
uses the CalVer versioning scheme with format YYYY.MM.Micro i.e. 2022.12.1 which is updated manually inpyproject.toml
. The "Micro" component is simply an integer increased by 1 at each version, starting from 0.pyproject.toml
and PR description