Skip to content

Commit

Permalink
Merge branch 'release/3.4.2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
chdemko committed Oct 22, 2024
2 parents 75102d4 + 7e05391 commit 3f4c69a
Show file tree
Hide file tree
Showing 22 changed files with 406 additions and 2,608 deletions.
105 changes: 38 additions & 67 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,122 +14,93 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
poetry-version: [1.8.3]
pandoc-version: [3.2.1]
python-version: ['3.10', '3.11', '3.12', '3.13']
pandoc-version: ['3.5']
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: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install Hatch
run: pipx install hatch
- name: Install dependencies
run: |
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
poetry install
- name: Test with tox
- name: Test
run: |
poetry run tox -e py
hatch test -py ${{ matrix.python-version }}
poetry:
pandoc:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
poetry-version: [1.2.2, 1.3.2, 1.4.2, 1.5.1, 1.6.1, 1.7.1, 1.8.3]
pandoc-version: [3.2.1]
pandoc-version: [2.14.2, '2.15', 2.16.2, 2.17.1.1, '2.18', 2.19.2, 3.0.1, 3.1.13, 3.2.1, '3.3', '3.4', '3.5']
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: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install Hatch
run: pipx install hatch
- name: Install dependencies
run: |
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
poetry install
- name: Test with tox
- name: Test
run: |
poetry run tox -e py
hatch test
pandoc:
style:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
poetry-version: [1.8.3]
pandoc-version: [2.14.2, '2.15', 2.16.2, 2.17.1.1, '2.18', 2.19.2, 3.0.1, 3.1.13, 3.2.1]
pandoc-version: ['3.5']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install Hatch
run: pipx install hatch
- name: Install dependencies
run: |
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
poetry install
- name: Test with tox
- name: Static check
run: |
poetry run tox -e py
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.8.3
- name: Install dependencies
hatch fmt --check
- name: Dynamic check
run: |
poetry install
- name: Test with tox
run: |
poetry run tox -e style
poetry run tox -e linter
hatch run lint:check
cov:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
pandoc-version: ['3.5']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
uses: actions/setup-python@v5
with:
poetry-version: 1.8.3
python-version: ${{ matrix.python-version }}
- name: Install Hatch
run: pipx install hatch
- name: Install dependencies
run: |
wget https://github.com/jgm/pandoc/releases/download/3.2.1/pandoc-3.2.1-1-amd64.deb
sudo dpkg -i ./pandoc-3.2.1-1-amd64.deb
poetry install
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
- name: Test
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
poetry run tox -e coverage
poetry run pip install coveralls
poetry run coveralls
run: |-
hatch test --cover
hatch run pip install coveralls
hatch run coveralls
31 changes: 13 additions & 18 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,24 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.8.3
- name: Set up poetry-dynamic-versioning
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
- name: Install dependencies
run: |
poetry install
poetry run pip install twine
python-version: ${{ matrix.python-version }}
- name: Install Hatch
run: pipx install hatch
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry build
poetry run twine upload dist/*
HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }}
HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }}
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.ref_name }}
run: |-
hatch build -t wheel
hatch publish dist/*.whl
91 changes: 22 additions & 69 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,90 +1,43 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml

- repo: https://gitlab.com/smop/pre-commit-hooks
rev: v1.0.0
hooks:
- id: check-poetry

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-toml
exclude: ^poetry.lock$
args: [--autofix, --no-sort]
- id: pretty-format-yaml
args: [--autofix]

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.3.1
hooks:
- id: tox-ini-fmt

- repo: https://github.com/ariebovenberg/slotscheck
rev: v0.19.0
hooks:
- id: slotscheck
language: system
exclude: ^(?!pandoc_numbering/.*.py)

- repo: https://github.com/dosisod/refurb
rev: v2.0.0
hooks:
- id: refurb

- repo: https://github.com/isidentical/teyit
rev: 0.4.3
hooks:
- id: teyit

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.4
hooks:
- id: ruff
language: system
exclude: ^(?!pandoc_numbering/.*.py)

- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black-jupyter
args: [--config=pyproject.toml, pandoc_numbering, tests]

- repo: https://github.com/PyCQA/doc8/
rev: v1.1.1
- repo: https://github.com/asottile/pyupgrade
rev: v3.18.0
hooks:
- id: doc8
args: [docs]
- id: pyupgrade
args: [--py310-plus]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.0
- repo: local
hooks:
- id: mypy
- id: format
name: format
entry: hatch fmt --check
language: system
exclude: ^(?!pandoc_numbering/.*.py)

- repo: https://github.com/pycqa/flake8
rev: 7.1.0
hooks:
- id: flake8
pass_filenames: false
- id: lint
name: lint
entry: hatch run lint:check
language: system
exclude: ^(?!pandoc_numbering/.*.py)

- repo: https://github.com/pre-commit/mirrors-pylint
rev: v3.0.0a5
hooks:
- id: pylint
pass_filenames: false
- id: test
name: test
entry: hatch test
language: system
exclude: ^(?!pandoc_numbering/.*.py)


- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
hooks:
- id: pyupgrade
pass_filenames: false
- id: lock
name: lock
entry: uv lock --upgrade
language: system
args: [--py310-plus]
pass_filenames: false
20 changes: 4 additions & 16 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,10 @@ build:
os: ubuntu-22.04
tools:
python: '3.11'
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- pip install poetry
- poetry self add "poetry-dynamic-versioning[plugin]"
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
# VIRTUAL_ENV needs to be set manually for now.
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
commands:
- git fetch --unshallow || true
- pip install hatch
- hatch run docs:build $READTHEDOCS_OUTPUT/html/

# Optionally build your docs in additional formats such as PDF and ePub
formats:
Expand Down
Loading

0 comments on commit 3f4c69a

Please sign in to comment.