The pull request enables parsing of the client configuration when Keycloak-related options are present. Specifically, it now supports the following options:
hs_keycloak_client_id
hs_keycloak_realm
hs_keycloak_uri
Previously, client commands would fail with a confusing error message like the following:
Traceback (most recent call last):
File "(...)/bin/hsls", line 5, in <module>
from h5pyd._apps.hsls import main
File "(...)/site-packages/h5pyd/_apps/hsls.py", line 17, in <module>
cfg = Config()
^^^^^^^^
File "(...)/site-packages/h5pyd/_apps/config.py", line 130, in __init__
raise ValueError(f"undefined option: {name}")
ValueError: undefined option: ignore
Issue 2: Correcting ValueError Parameter
The second issue is related to the ValueError exception above, which was using the incorrect parameter. The name variable was mistakenly used, leading to confusion, as it was actually a list of known options generated earlier in the code (see this line, where it gets last set to ignore, the last option in default_cfg). The pull request corrects this by using the k variable, which holds the current option name being parsed (v holds the value).
If additional subkeys (e.g., flags) need to be added to the new default_cfg keys, please advise on where to find the necessary information.
This pull request addresses two issues.
Issue 1: Keycloak Configuration Parsing
The pull request enables parsing of the client configuration when Keycloak-related options are present. Specifically, it now supports the following options:
hs_keycloak_client_id
hs_keycloak_realm
hs_keycloak_uri
Previously, client commands would fail with a confusing error message like the following:
Issue 2: Correcting ValueError Parameter
The second issue is related to the
ValueError
exception above, which was using the incorrect parameter. Thename
variable was mistakenly used, leading to confusion, as it was actually a list of known options generated earlier in the code (see this line, where it gets last set toignore
, the last option indefault_cfg
). The pull request corrects this by using thek
variable, which holds the current option name being parsed (v
holds the value).If additional subkeys (e.g.,
flags
) need to be added to the newdefault_cfg
keys, please advise on where to find the necessary information.