diff --git a/.github/workflows/run-tox.yml b/.github/workflows/run-tox.yml index 7da87c2..ecbbc58 100644 --- a/.github/workflows/run-tox.yml +++ b/.github/workflows/run-tox.yml @@ -1,4 +1,4 @@ -name: Run all tox python3 +name: Run tox on: pull_request: @@ -11,31 +11,44 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.10', '3.11'] - + include: + - python-version: '3.9' + tox-env: py39 + - python-version: '3.10' + tox-env: py310 + - python-version: '3.11' + tox-env: py311 + codecov: codecov + - python-version: '3.12' + tox-env: py312 + - python-version: '3.11' + tox-env: lint + - python-version: '3.11' + tox-env: docs steps: - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip setuptools wheel - python -m pip install tox-gh-actions + python -m pip install --upgrade tox tox-uv - name: Run tox run: | - tox + tox run -e ${{ matrix.tox-env }} - name: Upload to codecov - if: ${{matrix.python-version == '3.11'}} - uses: codecov/codecov-action@v3 + if: ${{ matrix.codecov == 'codecov' }} + uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: false files: ./coverage.xml flags: pytest - env_vars: OS,PYTHON verbose: true - name: "blueetl-core-py311" + name: "${{ github.repository }}-${{ matrix.tox-env }}" diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8e2ad6f..2472836 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,18 @@ Changelog ========= +Version 0.1.4 +------------- + +Improvements +~~~~~~~~~~~~ + +- Update github actions. +- Split lint and docs jobs in the CI. +- Remove tox-gh-actions in the CI. +- Use tox-uv in the CI. +- Update black formatting. + Version 0.1.3 ------------- diff --git a/doc/source/conf.py b/doc/source/conf.py index 008ac84..39cb59f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -4,6 +4,8 @@ # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html +import importlib.metadata + # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, @@ -14,15 +16,12 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) -from pkg_resources import get_distribution - - # -- Project information ----------------------------------------------------- project = "blueetl-core" # The short X.Y version -version = get_distribution("blueetl_core").version +version = importlib.metadata.version("blueetl_core") # The full version, including alpha/beta/rc tags release = version diff --git a/src/blueetl_core/__init__.py b/src/blueetl_core/__init__.py index 44e42c7..06994b0 100644 --- a/src/blueetl_core/__init__.py +++ b/src/blueetl_core/__init__.py @@ -1,4 +1,5 @@ """BlueETL core transformations.""" + from blueetl_core._version import __version__ # noqa from blueetl_core.etl import register_accessors diff --git a/src/blueetl_core/etl.py b/src/blueetl_core/etl.py index a3b4277..7af74a0 100644 --- a/src/blueetl_core/etl.py +++ b/src/blueetl_core/etl.py @@ -1,4 +1,5 @@ """Pandas accessors.""" + from abc import ABC, abstractmethod from collections import namedtuple from collections.abc import Iterator diff --git a/src/blueetl_core/logging.py b/src/blueetl_core/logging.py index 323a3d8..20ebd0e 100644 --- a/src/blueetl_core/logging.py +++ b/src/blueetl_core/logging.py @@ -1,4 +1,5 @@ """BlueETL core transformations.""" + import logging from typing import Optional, Union diff --git a/src/blueetl_core/parallel.py b/src/blueetl_core/parallel.py index 6a0e6fc..5934c1e 100644 --- a/src/blueetl_core/parallel.py +++ b/src/blueetl_core/parallel.py @@ -1,4 +1,5 @@ """Utilities for parallelization.""" + import logging import os from collections.abc import Iterable diff --git a/src/blueetl_core/utils.py b/src/blueetl_core/utils.py index 8f9cacf..5c848bc 100644 --- a/src/blueetl_core/utils.py +++ b/src/blueetl_core/utils.py @@ -1,4 +1,5 @@ """Core utilities.""" + import operator from collections.abc import Callable, Mapping from copy import deepcopy diff --git a/tox.ini b/tox.ini index ff68f51..609b2d4 100644 --- a/tox.ini +++ b/tox.ini @@ -10,13 +10,9 @@ envlist = docs py{39,310,311} -minversion = 3.1.0 - -# ignore basepython for envs that already specify a version -ignore_basepython_conflict = true +minversion = 4 [testenv] -basepython=python3.10 setenv = # Run serially BLUEETL_JOBLIB_JOBS=1 @@ -88,9 +84,3 @@ allowlist_externals = make # W504: line break before binary operator # E501: line too long (checked with pylint) ignore = E203,E731,W503,W504,E501 - -[gh-actions] -python = - 3.9: py39 - 3.10: py310, lint, docs - 3.11: py311