Repository navigation
Conversation
See Issue #130. For any boolean notebook parameter, xcengine now automatically parses not only a corresponding CLI parameter but also its inverse, so e.g. a parameter defined as `my_param: bool = True` in the notebook can be set to False with the CLI argument --no-my-param. (The CLI argument --my-param to set my_param to True is, of course, still supported.) The corresponding changes to the CWL generation code have not yet been implemented.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #134 +/- ##
==========================================
+ Coverage 98.46% 98.51% +0.05%
==========================================
Files 6 6
Lines 780 810 +30
Branches 100 110 +10
==========================================
+ Hits 768 798 +30
Misses 8 8
Partials 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
In which case do users actually interact with / see the no_<param_name> form generated by xcengine? At first glance I was confused that the description focuses on these, where I would have considered that an implementation detail. Isn't the interesting part, that the --no-<param-name> command line flag is added to the Docker images and EOAPs?
As a small comment, I would explicitly say "Container images" if someone else trips up on that for a second, like I did (what images does xcengine produce?)
There was a problem hiding this comment.
@Hneuschmidt I agree on "container images" -- fixed. Regarding parameter naming, it gets a little complicated because there are several layers and several ways of interacting with a generated script or image. If you have a boolean variable my_param in the parameters cell:
- In the notebook code, there is of course no
no_my_param(unless explicitly declared). - When parsing command-line arguments to the script generated from the notebook, the xcengine code understands the arguments
--my-paramand--no-my-param. - When parsing environment variables, the xcengine code understands
xce_my_paramandxce_no_my_param. (It strikes me now that I don't think I've documented environment variable parameter parsing at all! But so far I don't think that it was needed.) - In the CWL
CommandLineTooldefinition.my_paramandno_my_paramare defined, but I think that in this case you're right that the user is unlikely to see them. - In the CWL
Workflowdefinition,my_paramandno_my_paramare also defined. A user of the EOAP is likely to encounter these indirectly:- If running with
cwltoolor some other CWL runner, they are set with their CWL names if a YAML parameter value file is provided, and with--my_paramand--no_my_paramon the command line. (cwltool doesn't perform underscore-to-hyphen substitution, but does use a double hyphen as an argument prefix.) - If running on an EOAP platform, I'd expect them to see the names
my_paramandno_my_paramin whatever user interface is provided to OGC API -- Processes (e.g. eozilla-app).
- If running with
That level of detail in the docs might be off-putting for users, though. I'll think about how to improve the current description without making it too tedious.
See Issue #130 and explanations in comments.
|
@Hneuschmidt By the way, while checking details for my response above I discovered a serious bug in the inverted-parameter implementation which fortunately had a very simple fix. See commit 3dec21e, especially the code comments. |
Closes Issue #130.
For any boolean notebook parameter, xcengine now automatically parses not only a corresponding CLI parameter but also its inverse, so e.g. a parameter defined as
my_param: bool = Truein the notebook can be set to False with the CLI argument --no-my-param. (The CLI argument --my-param to set my_param to True is, of course, still supported.)To do: