diff --git a/demo.py b/demo.py index 60e757c..da001a6 100755 --- a/demo.py +++ b/demo.py @@ -16,9 +16,15 @@ def run(): copytree(my_repo, 'my_repo', symlinks=True) # 2. prepare repositories you'd be using. For this demo we only set up Hypothesis - hypothesis_repo = abspath('hypothesis_repo') - check_call(['git', 'clone', 'https://github.com/karlicoss/hypexport.git', hypothesis_repo]) - # + tox = 'TOX' in os.environ + if tox: # tox doesn't like --user flag + check_call('pip3 install git+https://github.com/karlicoss/hypexport.git'.split()) + else: + try: + import hypexport + except ModuleNotFoundError: + check_call('pip3 install --user git+https://github.com/karlicoss/hypexport.git'.split()) + # 3. prepare some demo Hypothesis data hypothesis_backups = abspath('backups/hypothesis') @@ -45,7 +51,7 @@ def run(): check_call(['python3', '-c', ''' import my.hypothesis -pages = my.hypothesis.get_pages() +pages = my.hypothesis.pages() from itertools import islice for page in islice(pages, 0, 8): diff --git a/doc/MODULES.org b/doc/MODULES.org index 5011cae..2f34665 100644 --- a/doc/MODULES.org +++ b/doc/MODULES.org @@ -137,10 +137,6 @@ for cls, p in modules: # paths[s]/glob to the exported JSON data export_path: Paths - - # path to a local clone of hypexport - # alternatively, you can put the repository (or a symlink) in $MY_CONFIG/my/config/repos/hypexport - hypexport : Optional[PathIsh] = None #+end_src ** [[file:../my/reddit.py][my.reddit]] diff --git a/tox.ini b/tox.ini index 9a724a3..f5fabca 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ envlist = py3,mypy # pylint # TODO ugh. unclear how to reuse setup.cfg deps in tox [testenv] passenv = CI CI_* -# deliberately set to nonexistent pathe to check the fallback logic +# deliberately set to nonexistent path to check the fallback logic setenv = MY_CONFIG = nonexistent commands = pip install -e .[testing] @@ -21,11 +21,6 @@ commands = [testenv:demo] -# TODO wtf???? -changedir = {toxworkdir}/{envname}/../.. -# TODO not sure?? also reuse installed my. instead on installing in demo.py? -skip_install = true -# TODO need to keep full config as example? to dummy run CI commands = ./demo.py