Skip to content

Commit

Permalink
Use poetry-dynamic-versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
chdemko committed Jan 21, 2024
1 parent d78883b commit f6456ad
Show file tree
Hide file tree
Showing 12 changed files with 1,315 additions and 575 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ name: Python package

on:
push:
branches: [ develop ]
branches: [develop]
pull_request:
branches: [ develop ]
branches: [develop]

jobs:
python:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
poetry-version: ["1.5.1"]
pandoc-version: ["3.1.6"]
python-version: ['3.9', '3.10', '3.11', '3.12']
poetry-version: [1.7.1]
pandoc-version: [3.1.11.1]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -40,11 +40,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
poetry-version: ["1.2.2", "1.3.2", "1.4.2", "1.5.1"]
pandoc-version: ["3.1.6"]
python-version: ['3.12']
poetry-version: [1.2.2, 1.3.2, 1.4.2, 1.5.1, 1.6.1, 1.7.1]
pandoc-version: [3.1.11.1]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -66,11 +66,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
poetry-version: ["1.5.1"]
pandoc-version: ["2.11.4", "2.12", "2.13", "2.14.2", "2.15", "2.16.2", "2.17.1.1", "2.18", "2.19.2", "3.0.1", "3.1.6"]
python-version: ['3.12']
poetry-version: [1.7.1]
pandoc-version: [2.11.4, '2.12', '2.13', 2.14.2, '2.15', 2.16.2, 2.17.1.1, '2.18', 2.19.2, 3.0.1, 3.1.11.1]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -95,11 +95,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.5.1'
poetry-version: 1.7.1
- name: Install dependencies
run: |
poetry install
Expand All @@ -111,19 +111,19 @@ jobs:
cov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.5.1'
poetry-version: 1.7.1
- name: Install dependencies
run: |
wget https://github.com/jgm/pandoc/releases/download/3.1.6/pandoc-3.1.6-1-amd64.deb
sudo dpkg -i ./pandoc-3.1.6-1-amd64.deb
wget https://github.com/jgm/pandoc/releases/download/3.1.11.1/pandoc-3.1.11.1-1-amd64.deb
sudo dpkg -i ./pandoc-3.1.11.1-1-amd64.deb
poetry install
- name: Test
env:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.5.1'
poetry-version: 1.7.1
- name: Set up poetry-dynamic-versioning
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
- name: Install dependencies
run: |
poetry install
Expand Down
82 changes: 82 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.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.10.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.17.0
hooks:
- id: slotscheck
language: system
exclude: ^(?!pandoc_latex_newpage.py)

- repo: https://github.com/dosisod/refurb
rev: v1.20.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.0.287
hooks:
- id: ruff
language: system
exclude: ^(?!pandoc_latex_newpage.py)

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

- repo: https://github.com/PyCQA/doc8/
rev: v1.1.1
hooks:
- id: doc8
args: [docs]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
language: system
exclude: ^(?!pandoc_latex_newpage.py)

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
language: system
exclude: ^(?!pandoc_latex_newpage.py)

- repo: https://github.com/pre-commit/mirrors-pylint
rev: v3.0.0a5
hooks:
- id: pylint
language: system
exclude: ^(?!pandoc_latex_newpage.py)
26 changes: 15 additions & 11 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,24 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
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]"
# Tell poetry to not use a virtual environment
- poetry config virtualenvs.create false
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
- poetry install --with docs

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- htmlzip

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt

- htmlzip
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2018-2023, Christophe Demko
Copyright (c) 2018-2024, Christophe Demko
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
Loading

0 comments on commit f6456ad

Please sign in to comment.