From 9e1574d9c5efa5d52fbfe783a16b282a7301236b Mon Sep 17 00:00:00 2001 From: Mark Bonicillo Date: Fri, 5 Aug 2022 13:24:36 -0700 Subject: [PATCH] Fix setup.py; run tests using tox --- .gitignore | 2 ++ Makefile | 30 ++++++++++++++++++++++++++++++ setup.cfg | 2 +- setup.py | 1 + tox.ini | 13 +++++++++++++ 5 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 Makefile create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index 410bef46..5f496f23 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ tutorials/h2d-hnx-why_v5.tar.gz vis_develop dist/ *.egg-info* +.tox/ +venv* \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..a02b78bf --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ + +SHELL = /bin/bash + +# Variables +VENV = venv_test +PYTHON = $(VENV)/bin/python + +## Environment + +venv: + @rm -rf VENV; + @python -m venv $(VENV); + +deps: + @$(PYTHON) -m pip install tox + +.PHONY: venv deps + +## Test + +test: venv deps + rm -rf .tox + @$(PYTHON) -m tox + +.PHONY: test + +clean: + rm -rf .out .pytest_cache .tox *.egg-info dist build + +.PHONY: clean \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 778d2740..1faf14c7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,3 @@ [metadata] -description-file=README.md +description_file=README.md diff --git a/setup.py b/setup.py index f336c820..3caecc9a 100644 --- a/setup.py +++ b/setup.py @@ -32,6 +32,7 @@ "pandas>=0.23", "python-igraph>=0.9.6", "celluloid>=0.2.0", + "decorator>=5.1.1" ], license="3-Clause BSD license", long_description=""" diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..d498200e --- /dev/null +++ b/tox.ini @@ -0,0 +1,13 @@ +# 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 = py37 + +[testenv] +deps = + pytest +commands = + pytest hypernetx/ -v --disable-warnings