From 6ece14b6d3a10c43500a34e66c076be274ca3143 Mon Sep 17 00:00:00 2001 From: Andrzej <6695650+thegrymek@users.noreply.github.com> Date: Wed, 26 Mar 2025 00:14:53 +0100 Subject: [PATCH 1/7] Upgrade tox to version 4.2 - drop `detox` package requirement - update readme Signed-off-by: Andrzej <6695650+thegrymek@users.noreply.github.com> --- README.rst | 64 ++++++++++++++++++++++-------------------------------- setup.py | 1 - tox.ini | 25 ++++++++++----------- 3 files changed, 37 insertions(+), 53 deletions(-) diff --git a/README.rst b/README.rst index cb2176b..3837000 100644 --- a/README.rst +++ b/README.rst @@ -197,55 +197,43 @@ Contribute .. code-block:: bash - $ sudo apt-get install pyenv tox + $ sudo apt-get install pyenv tox==4.23.2 virtualenv-pyenv==0.5.0 -#. Install other python versions +#. Install python versions .. code-block:: bash $ pyenv install 3.7 3.8 3.9 3.10 3.11 3.12 3.13 -#. Make them global for **detox** package +#. Check your code and tests with **tox** .. code-block:: bash - $ pyenv global 3.7 3.8 3.9 3.10 3.11 3.12 3.13 + $ tox + ---------- coverage: platform linux, python 3.13.2-final-0 ----------- + Name Stmts Miss Branch BrPart Cover Missing + ------------------------------------------------------------------------------------ + diskcollections/__init__.py 0 0 0 0 100% + diskcollections/iterables/__init__.py 7 0 0 0 100% + diskcollections/iterables/clients.py 112 1 28 1 99% 90 + diskcollections/iterables/iterables.py 159 0 74 0 100% + diskcollections/serializers.py 32 0 0 0 100% + ------------------------------------------------------------------------------------ + TOTAL 310 1 102 1 99% + + Required test coverage of 95% reached. Total coverage: 99.51% + ====================================================================================================== 63 passed, 1 warning in 0.46s ======================================================================================================= + lint: OK (0.55=setup[0.03]+cmd[0.20,0.32] seconds) + py37: OK (0.47=setup[0.01]+cmd[0.46] seconds) + py38: OK (0.47=setup[0.01]+cmd[0.46] seconds) + py39: OK (0.47=setup[0.01]+cmd[0.46] seconds) + py310: OK (0.63=setup[0.01]+cmd[0.62] seconds) + py311: OK (0.45=setup[0.01]+cmd[0.45] seconds) + py312: OK (0.69=setup[0.01]+cmd[0.69] seconds) + py313: OK (0.75=setup[0.01]+cmd[0.74] seconds) + evaluation failed :( (4.12 seconds) -#. Install globally **detox** - -.. code-block:: bash - - $ sudo pip install detox - -#. Check your code and tests with **detox** - -.. code-block:: bash - - $ detox -n 1 - GLOB sdist-make: python-disk-collections/setup.py - lint inst-nodeps: python-disk-collections/.tox/.tmp/package/7/python-disk-collections-0.0.4.zip - lint run-test-pre: PYTHONHASHSEED='1334400931' - lint runtests: commands[0] | flake8 - lint runtests: commands[1] | python setup.py check -r -s -m - py27 inst-nodeps: python-disk-collections/.tox/.tmp/package/7/python-disk-collections-0.0.4.zip - py27 run-test-pre: PYTHONHASHSEED='1334400931' - py27 runtests: commands[0] | py.test -v --cov diskcollections --cov-config .coveragerc --cov-report term-missing --cov-fail-under 95 - ... - py311 inst-nodeps: python-disk-collections/.tox/.tmp/package/7/python-disk-collections-0.0.4.zip - py311 run-test-pre: PYTHONHASHSEED='1334400931' - py311 runtests: commands[0] | py.test -v --cov diskcollections --cov-config .coveragerc --cov-report term-missing --cov-fail-under 95 - _________________________________________________________________________________________________________________ summary __________________________________________________________________________________________________________________ - lint: commands succeeded - py27: commands succeeded - py35: commands succeeded - py36: commands succeeded - py37: commands succeeded - py38: commands succeeded - py39: commands succeeded - py310: commands succeeded - py311: commands succeeded - congratulations :) #. Send a pull request! diff --git a/setup.py b/setup.py index d29aa76..2fa11a2 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,6 @@ def url(*args): 'like bulltins but keeps items at disk.', long_description=readme, packages=find_packages(), - tests_require=['pytest', 'tox', 'flake8'], url=url(url_profile, package_name), download_url=url(url_profile, package_name, 'archive/%s.tar.gz' % version), license='MIT', diff --git a/tox.ini b/tox.ini index 2cf1d7f..ab8dcb6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,19 +1,24 @@ [tox] -usedevelop = True -envlist = - lint, +min_version = 4.2 +use_develop = True +no_package = True +env_list = + lint py{37,38,39,310,311,312,313} [testenv] deps = pytest pytest-cov -commands = py.test -v \ +setenv = + PYTHONDONTWRITEBYTECODE=1 + VIRTUALENV_DISCOVERY=pyenv +commands = pytest -v \ --cov diskcollections \ --cov-config .coveragerc \ --cov-report term-missing \ --cov-fail-under 95 \ - {posargs} + {posargs:tests} passenv = TRAVIS TRAVIS_BRANCH @@ -21,7 +26,7 @@ passenv = [testenv:lint] -skipsdist = True +skips_dist = True skip_install = True deps = flake8 @@ -30,14 +35,6 @@ commands = flake8 python setup.py check -r -s -m -[testenv:build] -skip_install = true -deps = - wheel - setuptools -commands = - python setup.py -q sdist bdist_wheel - [flake8] select = E,F,W From f6666ac98e49522588837805aba775d7c3184797 Mon Sep 17 00:00:00 2001 From: Andrzej <6695650+thegrymek@users.noreply.github.com> Date: Wed, 26 Mar 2025 00:27:15 +0100 Subject: [PATCH 2/7] . Signed-off-by: Andrzej <6695650+thegrymek@users.noreply.github.com> --- .github/workflows/pull_request.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index f3863cd..e36c062 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -35,8 +35,7 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade 'tox>=4.0.0' + python -m pip install --upgrade pip setuptools wheel tox==4.23.2 virtualenv-pyenv==0.5.0 - name: Run tox targets for ${{ matrix.python-version }} run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .) From 684f4912ae5f31cf6da56b6becf84516ff4af478 Mon Sep 17 00:00:00 2001 From: Andrzej <6695650+thegrymek@users.noreply.github.com> Date: Wed, 26 Mar 2025 00:28:49 +0100 Subject: [PATCH 3/7] . Signed-off-by: Andrzej <6695650+thegrymek@users.noreply.github.com> --- .github/workflows/pull_request.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index e36c062..b67150b 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -36,6 +36,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip setuptools wheel tox==4.23.2 virtualenv-pyenv==0.5.0 + pyenv install ${{ matrix.python-version }} - name: Run tox targets for ${{ matrix.python-version }} run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .) From cade3ac7271b3b38f13f2b0c8a7f539a5b29be9d Mon Sep 17 00:00:00 2001 From: Andrzej <6695650+thegrymek@users.noreply.github.com> Date: Wed, 26 Mar 2025 00:32:00 +0100 Subject: [PATCH 4/7] . Signed-off-by: Andrzej <6695650+thegrymek@users.noreply.github.com> --- .github/workflows/pull_request.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index b67150b..c6d0321 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -36,6 +36,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip setuptools wheel tox==4.23.2 virtualenv-pyenv==0.5.0 + curl -fsSL https://pyenv.run | bash pyenv install ${{ matrix.python-version }} - name: Run tox targets for ${{ matrix.python-version }} From 66edb74fe530b8d67d083483ab8e147d021e2f8c Mon Sep 17 00:00:00 2001 From: Andrzej <6695650+thegrymek@users.noreply.github.com> Date: Wed, 26 Mar 2025 00:36:14 +0100 Subject: [PATCH 5/7] . Signed-off-by: Andrzej <6695650+thegrymek@users.noreply.github.com> --- README.rst | 2 +- tox.ini | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 3837000..ec6367d 100644 --- a/README.rst +++ b/README.rst @@ -210,7 +210,7 @@ Contribute .. code-block:: bash - $ tox + $ VIRTUALENV_DISCOVERY=pyenv tox ---------- coverage: platform linux, python 3.13.2-final-0 ----------- Name Stmts Miss Branch BrPart Cover Missing ------------------------------------------------------------------------------------ diff --git a/tox.ini b/tox.ini index ab8dcb6..5a1877d 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,6 @@ deps = pytest-cov setenv = PYTHONDONTWRITEBYTECODE=1 - VIRTUALENV_DISCOVERY=pyenv commands = pytest -v \ --cov diskcollections \ --cov-config .coveragerc \ From 33a89c9505f9e6b53224e28dfcfd3213ca1b8bf4 Mon Sep 17 00:00:00 2001 From: Andrzej <6695650+thegrymek@users.noreply.github.com> Date: Wed, 26 Mar 2025 00:37:43 +0100 Subject: [PATCH 6/7] . Signed-off-by: Andrzej <6695650+thegrymek@users.noreply.github.com> --- .github/workflows/pull_request.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index c6d0321..03c9ca2 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -35,9 +35,7 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools wheel tox==4.23.2 virtualenv-pyenv==0.5.0 - curl -fsSL https://pyenv.run | bash - pyenv install ${{ matrix.python-version }} + python -m pip install --upgrade pip setuptools wheel tox==4.23.2 - name: Run tox targets for ${{ matrix.python-version }} run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .) From bb446b2fef93b057eb4171babd1d6a408888e324 Mon Sep 17 00:00:00 2001 From: Andrzej <6695650+thegrymek@users.noreply.github.com> Date: Wed, 26 Mar 2025 00:39:00 +0100 Subject: [PATCH 7/7] . Signed-off-by: Andrzej <6695650+thegrymek@users.noreply.github.com> --- .github/workflows/pull_request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 03c9ca2..dd9c7ec 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -35,7 +35,7 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools wheel tox==4.23.2 + python -m pip install --upgrade pip setuptools wheel tox>=4.2 - name: Run tox targets for ${{ matrix.python-version }} run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .)