From b2733981a81855c07a5ce4c7c0622f8ee7039004 Mon Sep 17 00:00:00 2001 From: Maxime Liquet <35924738+maximlt@users.noreply.github.com> Date: Mon, 30 Jan 2023 09:41:42 +0100 Subject: [PATCH] General maintenance (#105) --- .github/workflows/test.yaml | 33 ++++++++++++++++----------------- .gitignore | 2 ++ pyproject.toml | 3 ++- setup.cfg | 5 ----- setup.py | 3 +-- tox.ini | 17 +++++++++++++---- 6 files changed, 34 insertions(+), 29 deletions(-) delete mode 100644 setup.cfg diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e33f28a..56402f0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,32 +18,31 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] timeout-minutes: 45 defaults: run: shell: bash -l {0} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" + # env: + # SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" steps: - uses: actions/checkout@v3 with: - fetch-depth: "1" + fetch-depth: "100" + - name: fetch tags + run: git fetch --tags - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: setup pyctdev + - name: setup run: | python3 -m pip install --upgrade setuptools pip wheel - python3 -m pip install pyctdev - - name: install test deps - run: doit develop_install -o cmd -o tests - - name: doit test_flakes - run: doit test_flakes - - name: doit test_unit - run: doit test_unit - - name: doit test_cmd_examples - run: doit test_cmd_examples - - name: doit test_build_examples - run: doit test_build_examples + python3 -m pip install "tox<4" tox-gh-actions + - name: flakes + run: tox -e flakes + - name: unit + run: tox -e unit + - name: _cmd_examples + run: tox -e cmd_examples + - name: _build_examples + run: tox -e build_examples diff --git a/.gitignore b/.gitignore index 686fab8..6c8d2e7 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ venv/ # autover */.version + +build/ diff --git a/pyproject.toml b/pyproject.toml index 689fc49..46ee78f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,6 @@ [build-system] requires = [ "param >=1.7.0", - "setuptools >=30.3.0" + "setuptools >=61.0" ] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 74b403e..0000000 --- a/setup.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[metadata] -license_file = LICENSE.txt - -[wheel] -universal = 1 diff --git a/setup.py b/setup.py index aaf7077..272fffb 100755 --- a/setup.py +++ b/setup.py @@ -42,7 +42,6 @@ def get_setup_version(root, reponame): 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', @@ -61,7 +60,7 @@ def get_setup_version(root, reponame): }, include_package_data=True, packages=find_packages(), - python_requires='>=3.6', + python_requires='>=3.7', install_requires=[ 'param >=1.7.0', ], diff --git a/tox.ini b/tox.ini index a0a57b8..2541338 100644 --- a/tox.ini +++ b/tox.ini @@ -1,19 +1,27 @@ [tox] -envlist = {py36,py37,py38,py39,py310,py311}-{flakes,unit,cmd_examples,build_examples,all}-{default}-{dev,pkg} +envlist = {py37,py38,py39,py310,py311}-{flakes,unit,cmd_examples,build_examples,all}-{default}-{dev,pkg} build = wheel +[gh-actions] +python = + 3.7: py37 + 3.8: py38 + 3.9: py39 + 3.10: py310 + 3.11: py311 + [_flakes] commands = flake8 deps = .[tests] [_cmd_examples] commands = pytest pyct - python3 -c "import pyct; pyct.report('pyct','python','system')" + {envpython} -c "import pyct; pyct.report('pyct','python','system')" deps = .[tests,cmd] [_build_examples] # TODO: not much of a test yet... -commands = python3 -c "from pyct.build import examples, get_setup_version" +commands = {envpython} -c "from pyct.build import examples, get_setup_version" deps = .[tests] [_all] @@ -31,9 +39,10 @@ commands = pytest pyct pyct --version pyct report --help pyct report pyct python - python3 -m pyct --version + {envpython} -m pyct --version [testenv] +usedevelop = true changedir = {envtmpdir} commands = unit: {[_unit]commands}