You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a matrix environment defined and want to run a script/command in a subset of all matrix based environments. For that purpose the run command has the + and - options and the env run command the -i and -x options to select a subset of all environments.
With both commands and options it is possible to select a value along one dimension/list, but not along more than one dimension/list.
Should it be possible to select/include values along multiple dimensions/lists?
My goal is e. g. to run a script/command in the environment with python 3.8 and tensorflow 2.11.*. Next are my tries with their result. Note that I included runs to show that the * in the value shouldn't be the problem.
hatch run +tensorflow=2.11.* test:test
works correctly, all python versions: test.py3.8-2.11.*, test.py3.9-2.11.*
hatch run +python=3.8 test:test
works correctly, all tensorflow versions
hatch run +tensorflow=2.11.* +python=3.8 test:test and hatch run +python=3.8 +tensorflow=2.11.* test:test
neither python specific nor tensorflow specific, thus all python versions and all tensorflow versions
hatch run +python=3.8,tensorflow=2.11.* test:test
python specific but not tensorflow specific, thus all tensorflow versions
hatch run +tensorflow=2.11.*,python=3.8 test:test
tensorflow specific but not python specific, thus all python versions
Then I tried env run:
hatch env run -i tensorflow=2.11.* -i python=3.8 test:test
error: Variable selection is unsupported for non-matrix environments: default
hatch env run --env test -i tensorflow=2.11.* -i python=3.8 test
neither python specific nor tensorflow specific, thus all python versions and all tensorflow versions
hatch env run --env test -i tensorflow=2.11.* test
works correctly, all python versions
hatch env run --env test -i python=3.8 test
works correctly, all tensorflow versions
hatch env run --env test -i tensorflow=2.11.* python=3.8 test
no error message, no output, just does nothing
hatch env run --env test -i tensorflow=2.11.*,python=3.8 test
tensorflow specific but not python specific, thus all python versions
The only way I found to run scripts in exactly one matrix based environment, python 3.8 and tensorflow 2.11.*, is without the options -i or + but:
hatch env run --env test.py3.8-2.11.* test
It is unclear to me, if it shouldn't be possible and if the documentation is unclear and the command line parser has a bug or if it should be possible and there is a bug in the selection process and another one in the command line parser / option error handling.
The text was updated successfully, but these errors were encountered:
I have a matrix environment defined and want to run a script/command in a subset of all matrix based environments. For that purpose the
run
command has the+
and-
options and theenv run
command the-i
and-x
options to select a subset of all environments.With both commands and options it is possible to select a value along one dimension/list, but not along more than one dimension/list.
Should it be possible to select/include values along multiple dimensions/lists?
Environment definition from
pyproject.toml
:My goal is e. g. to run a script/command in the environment with python
3.8
and tensorflow2.11.*
. Next are my tries with their result. Note that I included runs to show that the*
in the value shouldn't be the problem.hatch run +tensorflow=2.11.* test:test
test.py3.8-2.11.*
,test.py3.9-2.11.*
hatch run +python=3.8 test:test
hatch run +tensorflow=2.11.* +python=3.8 test:test
andhatch run +python=3.8 +tensorflow=2.11.* test:test
hatch run +python=3.8,tensorflow=2.11.* test:test
hatch run +tensorflow=2.11.*,python=3.8 test:test
Then I tried
env run
:hatch env run -i tensorflow=2.11.* -i python=3.8 test:test
Variable selection is unsupported for non-matrix environments: default
hatch env run --env test -i tensorflow=2.11.* -i python=3.8 test
hatch env run --env test -i tensorflow=2.11.* test
hatch env run --env test -i python=3.8 test
hatch env run --env test -i tensorflow=2.11.* python=3.8 test
hatch env run --env test -i tensorflow=2.11.*,python=3.8 test
The only way I found to run scripts in exactly one matrix based environment, python
3.8
and tensorflow2.11.*
, is without the options-i
or+
but:hatch env run --env test.py3.8-2.11.* test
It is unclear to me, if it shouldn't be possible and if the documentation is unclear and the command line parser has a bug or if it should be possible and there is a bug in the selection process and another one in the command line parser / option error handling.
The text was updated successfully, but these errors were encountered: