Skip to content

Commit

Permalink
Update github actions and other CI improvements (#7)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
GianlucaFicarelli authored Mar 22, 2024
1 parent 9954630 commit b62fe2d
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 25 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/run-tox.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run all tox python3
name: Run tox

on:
pull_request:
Expand All @@ -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 }}"
12 changes: 12 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -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
-------------

Expand Down
7 changes: 3 additions & 4 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/blueetl_core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""BlueETL core transformations."""

from blueetl_core._version import __version__ # noqa
from blueetl_core.etl import register_accessors

Expand Down
1 change: 1 addition & 0 deletions src/blueetl_core/etl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Pandas accessors."""

from abc import ABC, abstractmethod
from collections import namedtuple
from collections.abc import Iterator
Expand Down
1 change: 1 addition & 0 deletions src/blueetl_core/logging.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""BlueETL core transformations."""

import logging
from typing import Optional, Union

Expand Down
1 change: 1 addition & 0 deletions src/blueetl_core/parallel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities for parallelization."""

import logging
import os
from collections.abc import Iterable
Expand Down
1 change: 1 addition & 0 deletions src/blueetl_core/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Core utilities."""

import operator
from collections.abc import Callable, Mapping
from copy import deepcopy
Expand Down
12 changes: 1 addition & 11 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit b62fe2d

Please sign in to comment.