diff --git a/Makefile b/Makefile index 0909f3e5..ce6c3f55 100644 --- a/Makefile +++ b/Makefile @@ -2,22 +2,20 @@ WORKDIR := /tsfresh TEST_IMAGE := tsfresh-test-image TEST_DOCKERFILE := Dockerfile.testing TEST_CONTAINER := tsfresh-test-container -# >= 3.9.2 ---> https://github.com/dask/distributed/issues/7956 -PYTHON_VERSIONS := "3.7.12 3.8.12 3.9.12 3.10.12 3.11.0" -BLACK_VERSION := 22.12.0 -# Isort 5.12.0 not supported with python 3.7.12 -ISORT_VERSION := 5.12.0 +PYTHON_VERSIONS := "3.7 3.8 3.9 3.10 3.11" -build-testenv: +# Tests `PYTHON_VERSIONS`, provided they are also +# specified in setup.cfg `envlist` +test-all-testenv: build-docker-testenv run-docker-tests clean + +build-docker-testenv: docker build \ -f $(TEST_DOCKERFILE) \ -t $(TEST_IMAGE) \ --build-arg PYTHON_VERSIONS=$(PYTHON_VERSIONS) \ . -# Tests `PYTHON_VERSIONS`, provided they are also -# specified in setup.cfg `envlist` -test-all-testenv: clean build-testenv +run-docker-tests: docker run --rm \ --name $(TEST_CONTAINER) \ -v .:$(WORKDIR) \ @@ -26,28 +24,8 @@ test-all-testenv: clean build-testenv -v egg_artifacts:$(WORKDIR)/tsfresh.egg-info \ $(TEST_IMAGE) -# Tests the python binaries installed -# on local machine, provided they are also -# specified in setup.cfg `envlist` -test-all-local: clean - tox -r -p auto - -# Tests for python version on local machine in -# current context (e.g. global or local version of -# python set by pyenv, or the python version in -# the active virtualenv). -test-local: clean - pip install .[testing] - pytest - clean: rm -rf .tox build/ dist/ *.egg-info -install-formatters: - pip install black==$(BLACK_VERSION) isort==$(ISORT_VERSION) - -format: install-formatters - black --extend-exclude \.docs . - isort --profile black --skip-glob="docs" . -.PHONY: clean test-all-local test-local test-all-testenv format install-formatters +.PHONY: build-docker-testenv clean run-docker-tests test-all-testenv diff --git a/docs/text/how_to_contribute.rst b/docs/text/how_to_contribute.rst index a5108eec..4f169e44 100644 --- a/docs/text/how_to_contribute.rst +++ b/docs/text/how_to_contribute.rst @@ -64,7 +64,7 @@ you have to: .. code:: - make test-local + pytest To test changes across multiple versions of Python, run: @@ -72,10 +72,10 @@ To test changes across multiple versions of Python, run: .. code:: - make test-all-local + tox -r -p auto -This will execute tests for the Python versions specified in `setup.cfg `_ using the `envlist` variable. For example, if `envlist` is set to `py37, py38`, the test suite will run for Python 3.7 and 3.8 on the local development platform, assuming the binaries for those versions are available locally. The exact Python microversions (e.g. `3.7.1` vs `3.7.2`) depend on what is installed on the local development machine. +This will execute tests for the Python versions specified in `setup.cfg `_ using the `envlist` variable. For example, if `envlist` is set to `py37, py38`, the test suite will run for Python 3.7 and 3.8 on the local development platform, assuming the binaries for those versions are available locally. The exact Python microversions (e.g. `3.7.1` vs `3.7.2`) depend on what is installed on the local development machine. A recommended way to manage multiple Python versions when testing locally is with `pyenv`, which enables organized installation and switching between versions.