It was “Python developers”. I was focusing on the benefits that would be gained by the developer writing the pyproject.toml
that contained the task definitions. Sorry for not being clearer.
Distro testing is a different problem as they have stated that they wouldn’t want a test
command that ran nox -s test
.
And even in an editor/IDE, a command like test.command = ["mv test_data test_data_copy; pytest"]
would still be non-portable. Maybe portability isn’t important, but if it is, shell commands are strictly less portable than a Python command (that’s basically my point).
I didn’t mean to suggest you’d be compelled to do so. Just that this is simply another feature that you can choose to adopt, and standardising doesn’t give any “free” benefit. After all, I can already get VS Code to run my tests by using its existing task definition capability. But I don’t want to push back too hard on what you said - my point was that there is some merit to this argument, I’m just not sure it’s enough to justify a standard, so I’d like to either here other benefits, or hear how this is more beneficial than I think it is…
I don’t think that at all. But not all nox sessions are as simple as this proposal would support, so there will be cases where the only way of using this proposal would be to use it to invoke nox, and let nox do the heavy lifting. And if nox did support this proposal, it would need to take this into account, as a user could easily want to have build
and test
tasks defined in pyproject.toml
, while having a docs
task defined in Python code in a noxfile
and invoked from pyproject.toml
as nox -s docs
. So yes, I was taking a simplified view, but it wasn’t “nox won’t support this proposal”, it was “how does this proposal support using nox when the nox session is too complex for this proposal to handle natively?”
Edit: For context, my mental image is pip’s noxfile.py
, where the test
session is way more complicated than I’d want to put in a simple task definition of the form being described here (as are most of the other sessions we have).