From 3883884c194bad6710a34b682b7faf5278e5b67f Mon Sep 17 00:00:00 2001 From: Sadha Chilukoori Date: Sat, 12 Jul 2025 11:07:51 -0700 Subject: [PATCH 1/3] Adds tox to test multiple python environment --- .gitignore | 2 ++ requirements.txt | 1 + setup.py | 2 ++ tox.ini | 8 ++++++++ 4 files changed, 13 insertions(+) create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index a3f68fe..31f58fe 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ *.pyo *.egg *.egg-info/ +*.tox +**/.python-version .DS_Store .coverage diff --git a/requirements.txt b/requirements.txt index 5d91b1e..fc36cfb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ pandas scipy numpy scikit-learn >= 1.6.0 +tox >= 4 diff --git a/setup.py b/setup.py index 9fc7890..e5b4276 100644 --- a/setup.py +++ b/setup.py @@ -45,6 +45,8 @@ def requirements(): # noqa: D103 "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ], zip_safe=True, ) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..8ea32b5 --- /dev/null +++ b/tox.ini @@ -0,0 +1,8 @@ +[tox] +env_list = py39, py310, py311, py312, py313 + +[testenv] +deps = + pytest + -r requirements.txt +commands = pytest From 5166fc06422323941e74a613e0f40bdb26021af6 Mon Sep 17 00:00:00 2001 From: Sadha Chilukoori Date: Sat, 12 Jul 2025 11:49:44 -0700 Subject: [PATCH 2/3] adds linter tests to tox --- tox.ini | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 8ea32b5..d6454ee 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,15 @@ [tox] -env_list = py39, py310, py311, py312, py313 +env_list = lint, 3.9, 3.1{0, 1, 2, 3} [testenv] deps = pytest -r requirements.txt -commands = pytest +commands = pytest -W ignore::UserWarning -W ignore::DeprecationWarning + +[testenv:lint] +description = run linters +skip_install = true +deps = + black +commands = black {posargs:.} From 94d2b1f9515304be2a4c5e7157f649ad9cf618af Mon Sep 17 00:00:00 2001 From: Sadha Chilukoori Date: Sat, 12 Jul 2025 15:02:23 -0700 Subject: [PATCH 3/3] updates gitlab ci test --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ea07c88..f20eb31 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,12 +4,15 @@ stages: - test variables: - PYVERSION: "3.11" + PYVERSION: "" LOGCAPTURE_LEVEL: "DEBUG" CODECOV_TOKEN: "034f0bb1-e590-406f-820c-4e7c41b17712" # set up the basic job .runtests: + parallel: + matrix: + - PYVERSION: ["3.9", "3.10", "3.11", "3.12", "3.13"] before_script: - "conda create --prefix /root/factordev --channel conda-forge --file requirements.txt python=${PYVERSION} curl nose2 coverage --yes --quiet" - /root/factordev/bin/pip install -e .