Open corentincarton opened 9 months ago
Add version
as ecflow variable at suite level for any module provided. Use wellies tools key, which is already unique, as variable name.
example
tools:
modules:
python:
name: python3
version: 3.10
python_new:
name: python3
version: 3.12
pf.Suite(
(...)
variables={
"PYTHON_VERSION":"3.10",
"PYTHON_NEW_VERSION": "3.12",
},
(...)
)
This is something we discussed with @oiffrig a few weeks ago as it was needed in one of the operational suites. There's a way to do this without modifying the wellies code:
tools:
modules:
python:
name: python3
version: ${PYTHON_VERSION:-3.10}
python_new:
name: python3
version: ${PYTHON_VERSION_NEW:-3.12}
The good thing with this approach is that it doesn't pollute your list of variables by default and you can just add the variable to the suite when you need it. But I agree it's not straightforward, so maybe it could be featured in the documentation or the quickstart?
How about changing pyflow to identify bash variables in scripts with defaults and treat them as exportables even if not defined on a node/tree?
Ah yes, you're right, it will need to be identified in the script generation otherwise the variable will not be exported. Not sure it's safe to do that automatically in pyflow... I would prefer your first suggestion. What bothers me is that we do all sorts of gymnastics when we could use directly ecflow variables with default values %PYTHON_VERSION:3.12% :D
Another thing that came to me (it might not belong to wellies but maybe tracksuits, not sure):
deploy_dir
# deployed with tracksuite from efas@release/5.1+12314312321asdve324234
Second one could be replaced by tracksuite commit message but do we include there information about the git state of the source project by default?
Yes we could definitely do that! It doesn't belong in tracksuite, but more in wellies. We already have add a wellies-specific message which includes the version of wellies used to deploy the suite, but we could add the local git hash/branch/tag as well if we find one.
Is your feature request related to a problem? Please describe.
Some things that should be changed for next release: