[tox] minversion = 3.5 envlist = py3,mypy,mypy-modules # TODO ugh. unclear how to reuse setup.cfg deps in tox [testenv] passenv = CI CI_* # deliberately set to nonexistent path to check the fallback logic setenv = MY_CONFIG = nonexistent commands = pip install -e .[testing] # python -m pytest {posargs} # todo these are probably not necessary anymore? python3 -c 'from my.config import stub as config; print(config.key)' python3 -c 'import my.config; import my.config.repos' # shouldn't fail at least # my.location.google deps pip install geopy ijson python3 -m pytest \ tests/core.py \ tests/misc.py \ tests/get_files.py \ tests/config.py::test_set_repo \ tests/config.py::test_environment_variable \ tests/demo.py \ tests/bluemaestro.py \ tests/location.py # TODO add; once I figure out porg depdencency?? tests/config.py # TODO run demo.py? just make sure with_my is a bit cleverer? # TODO e.g. under CI, rely on installing hpi modules [testenv:demo] commands = ./demo.py # specific modules that are known to be mypy compliant (to avoid false negatives) [testenv:mypy-modules] # todo add a stub with all the various configs for mypy/doc setenv = MYPYPATH=doc/example_config commands = # TODO ugh. somehow, user installed (editable??) packages leak into this environment?? pip install -e .[testing] .[optional] pip install git+https://github.com/karlicoss/ghexport pip install git+https://github.com/karlicoss/hypexport pip install git+https://github.com/karlicoss/instapexport pip install git+https://github.com/karlicoss/pockexport pip install git+https://github.com/karlicoss/rexport pip install git+https://github.com/karlicoss/endoexport pip install git+https://github.com/karlicoss/porg # todo I guess use a script... python3 -m mypy -p my.github.ghexport \ -p my.hypothesis \ -p my.instapaper \ -p my.pocket \ -p my.reddit \ -p my.endomondo \ -p my.body.exercise.cardio \ -p my.body.exercise.cross_trainer \ -p my.bluemaestro \ -p my.location.google \ --txt-report .mypy-coverage \ --html-report .mypy-coverage \ {posargs} # txt report is a bit more convenient to view on CI # ideally, keep core modules only here [testenv:mypy] skip_install = true commands = pip install -e .[testing] .[optional] ./lint