Plasmapy: Have `setup.py test/build_docs` print a message that people should use `tox` instead

Created on 22 Oct 2019  路  2Comments  路  Source: PlasmaPy/PlasmaPy

python setup.py test is no longer supported after we removed the astropy-helpers submodule, use tox -e py36?

_Originally posted by @StanczakDominik in https://github.com/PlasmaPy/PlasmaPy/pull/709#issuecomment-544813340_

There's clearly popular demand for python setup.py test and python setup.py build_docs. However, they've been sort of replaced by tox -e py36 or whichever version of Python you're running and tox -e build_docs, respectively.

SunPy uses ah-helpers to get their test command, but I don't want to have to bring it back.

The options as I see them:

  • override the setup.py commands with Exceptions telling people to use the commands mentioned above (simple, but a bit "rude" in a way)
  • override the setup.py commands with subprocess calls to the above (likely to break one way or another)
  • override the setup.py commands with calls to tox itself, if that's possible

@Cadair, would you mind me asking if you perhaps have Views on this?

Documentation low Good first contribution Programming Testing

Most helpful comment

Thanks, I somehow managed to miss that part of the docs!

That sounds like a reasonable plan. I guess I'll hack something together as a proof of concept, and we can then compare/generalize implementations.

All 2 comments

The only one I would recommend is the first one, using setup.py to call tox is explicitly discouraged in the tox documentation.

The plan for Astropy (pending approval) and SunPy is to move away from the setup.py commands and replace them with a message telling people what to use instead. I was thinking we could write a single .py file we all could include in our repos that allow us to share this (i.e. by importing it into setup.py)

Thanks, I somehow managed to miss that part of the docs!

That sounds like a reasonable plan. I guess I'll hack something together as a proof of concept, and we can then compare/generalize implementations.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lemmatum picture lemmatum  路  4Comments

namurphy picture namurphy  路  4Comments

Griffintaur picture Griffintaur  路  5Comments

lemmatum picture lemmatum  路  5Comments

StanczakDominik picture StanczakDominik  路  5Comments