general: get rid of example_config & use demo/stub my.config instead
This commit is contained in:
parent
96be32aa51
commit
1849a66f08
10 changed files with 27 additions and 34 deletions
17
tox.ini
17
tox.ini
|
@ -10,9 +10,6 @@ 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
|
||||
|
@ -27,7 +24,6 @@ commands =
|
|||
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 \
|
||||
|
@ -46,10 +42,8 @@ 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
|
||||
whitelist_externals = bash
|
||||
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
|
||||
|
@ -60,7 +54,12 @@ commands =
|
|||
|
||||
pip install git+https://github.com/karlicoss/porg
|
||||
|
||||
# todo I guess use a script...
|
||||
# ugh fuck. soo... need to reset HOME, otherwise user's site-packages are somehow leaking into mypy's path...
|
||||
# see https://github.com/python/mypy/blob/f6fb60ef69738cbfe2dfe56c747eca8f03735d8e/mypy/modulefinder.py#L487
|
||||
# this is particularly annoying when user's config is leaking and mypy isn't running against the repository config
|
||||
# maybe this issue... https://github.com/tox-dev/tox/issues/838
|
||||
# and also since it's Tox, we can't just set an env variable for a single command, have to spawn a subshell. jeez.
|
||||
bash -c 'HOME= \
|
||||
python3 -m mypy -p my.github.ghexport \
|
||||
-p my.hypothesis \
|
||||
-p my.instapaper \
|
||||
|
@ -75,7 +74,7 @@ commands =
|
|||
-p my.calendar.holidays \
|
||||
--txt-report .mypy-coverage \
|
||||
--html-report .mypy-coverage \
|
||||
{posargs}
|
||||
{posargs}'
|
||||
# txt report is a bit more convenient to view on CI
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue