From 731e0d1bd014b49339a82d63dff7fd7b15d8c3dc Mon Sep 17 00:00:00 2001 From: Gurupratap Matharu Date: Thu, 15 Oct 2020 17:30:53 -0300 Subject: [PATCH 1/3] tox configuration file to test the pypi package on various python versions with dependencies installed --- tox.ini | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..bc143fca3 --- /dev/null +++ b/tox.ini @@ -0,0 +1,36 @@ +# tox (https://tox.readthedocs.io/) is a tool for running tests +# in multiple virtualenvs. This configuration file will run the +# test suite on all supported python versions. To use it, "pip install tox" +# and then run "tox" from this directory. + +[tox] +envlist = py36, py37, py38 +skip_missing_interpreters = true + +[testenv] +deps = + pytest + pytest-cov + alabaster + babel + branca + docutils + folium==0.11.0 + ipython-genutils + jinja2 + jupyter + jupyter_client + markupsafe + nbval + nbconvert + nbformat + nbsphinx + plotly + pygments + snowballstemmer + sphinx + sphinx-rtd-theme + + +commands = + python setup.py test From bcdff6ebddabf6fde6dced99b977615354c58c57 Mon Sep 17 00:00:00 2001 From: Gurupratap Matharu Date: Thu, 15 Oct 2020 17:34:51 -0300 Subject: [PATCH 2/3] added tox command to developers.md --- DEVELOPERS.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/DEVELOPERS.md b/DEVELOPERS.md index 1e3dc0717..b118f8dd9 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -36,6 +36,12 @@ Then, run the tests: make test +Alternatively you can use tox. Its used for testing the package against different python versions in one go. Just make sure you have the python versions available globally or in your virtual environment + +Run tests + +`$ tox` + After that, go ahead and start hacking! The `source activate datascience` command must be run each time you develop in @@ -43,7 +49,7 @@ the package. Alternatively, you can install [direnv][direnv] to auto-load/unload the environment. Documentation is generated from the docstrings in the methods and is pushed online -at http://data8.org/datascience/ automatically. If you want to preview the docs +at automatically. If you want to preview the docs locally, use these commands: make docs # Generates docs inside doc/ folder From b88620a5b6897437aab13702c59cabc449848d82 Mon Sep 17 00:00:00 2001 From: Gurupratap Matharu Date: Thu, 15 Oct 2020 17:35:33 -0300 Subject: [PATCH 3/3] added pip command to install tox --- DEVELOPERS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DEVELOPERS.md b/DEVELOPERS.md index b118f8dd9..3cc01b7f4 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -38,6 +38,10 @@ Then, run the tests: Alternatively you can use tox. Its used for testing the package against different python versions in one go. Just make sure you have the python versions available globally or in your virtual environment +Install tox + +`pip install tox` + Run tests `$ tox`