Closed alexander-haller closed 3 months ago
In GitLab by @mhxion on Feb 14, 2024, 18:42
After some quick tests, I think I know why. This turns out to be much of larger issue stemming from some unrefactored code in src/elapi/configuration/config.py
.
elapi --help
.typer
which also provides the auto-completion bash/zsh script) from src/elapi/cli/elapi.py
.APP_NAME
== "elapi") from src/elapi/configuration/config.py
.config.py
prints any critical error message (if those errors exist) to STDERR as a priority before continuing with anything else. elapi
is invoked in any way!The best solution would be to refactor config.py
such that the error messages aren't really printed anytime elapi
command is run. config.py
also requires refactoring to allow for elapi plugins to make use of elapi.yml
, e.g., if a third-party developer writing an elapi plugin (and any script using the elapi package would be a valid elapi plugin!) wants to add their own key: value
in elapi.yml
. Doing the latter would solve this bug as well. However, that would take some work that maybe we can set to do at a later time.
In GitLab by @mhxion on Mar 19, 2024, 02:05
mentioned in commit 603cd4e4a662a81860fb46c4c8a9e1d390530c1c
In GitLab by @mhxion on Mar 21, 2024, 02:07
Partially fixed in https://gitlab.urz.uni-heidelberg.de/urz-elabftw/elapi/-/commit/603cd4e4a662a81860fb46c4c8a9e1d390530c1c.
In GitLab by @mhxion on Jun 15, 2024, 13:07
Actually it is fixed.
In GitLab by @mhxion on Feb 14, 2024, 18:13
Reported by @alexander-haller.
When pressing
TAB
for auto-completion, elapi also shows any unresolved error message along with the suggestions for auto-completions.This is also reproducible on iTerm on MacOS which suggests this isn't necessarily a terminal issue.