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 3a35329 commit 00c9a5c
Show file tree
Hide file tree
Showing 13 changed files with 1,324 additions and 583 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/python-package.yml
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 @@ -91,15 +91,15 @@ jobs:
style:
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: |
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
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
@@ -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_environment.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_environment.py)

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black-jupyter
args: [--config=pyproject.toml, pandoc_latex_environment.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_environment.py)

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

- repo: https://github.com/pre-commit/mirrors-pylint
rev: v3.0.0a5
hooks:
- id: pylint
language: system
exclude: ^(?!pandoc_latex_environment.py)
26 changes: 15 additions & 11 deletions .readthedocs.yml
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
@@ -1,6 +1,6 @@
BSD 3-Clause License

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

Redistribution and use in source and binary forms, with or without
Expand Down
19 changes: 6 additions & 13 deletions README.md
Expand Up @@ -2,13 +2,16 @@ Installation
============

[![Python package](https://github.com/chdemko/pandoc-latex-environment/workflows/Python%20package/badge.svg?branch=develop)](https://github.com/chdemko/pandoc-latex-environment/actions/workflows/python-package.yml)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Coveralls](https://img.shields.io/coveralls/github/chdemko/pandoc-latex-environment/develop.svg?logo=Codecov&logoColor=white)](https://coveralls.io/github/chdemko/pandoc-latex-environment?branch=develop)
[![Scrutinizer](https://img.shields.io/scrutinizer/g/chdemko/pandoc-latex-environment.svg?logo=scrutinizer)](https://scrutinizer-ci.com/g/chdemko/pandoc-latex-environment/)
[![Code Climate](https://codeclimate.com/github/chdemko/pandoc-latex-environment/badges/gpa.svg)](https://codeclimate.com/github/chdemko/pandoc-latex-environment/)
[![CodeFactor](https://img.shields.io/codefactor/grade/github/chdemko/pandoc-latex-environment/develop.svg?logo=codefactor)](https://www.codefactor.io/repository/github/chdemko/pandoc-latex-environment)
[![Codacy](https://img.shields.io/codacy/grade/cf388bfa902c4afaaeae182594e5b38a.svg?logo=codacy)](https://app.codacy.com/gh/chdemko/pandoc-latex-environment/dashboard)
[![PyPI version](https://img.shields.io/pypi/v/pandoc-latex-environment.svg?logo=pypi&logoColor=white)](https://pypi.org/project/pandoc-latex-environment/)
[![PyPI format](https://img.shields.io/pypi/format/pandoc-latex-environment.svg?logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzIgMzIiCiAgIGhlaWdodD0iMzJweCIKICAgaWQ9InN2ZzIiCiAgIHZlcnNpb249IjEuMSIKICAgdmlld0JveD0iMCAwIDMyIDMyIgogICB3aWR0aD0iMzJweCIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgc29kaXBvZGk6ZG9jbmFtZT0iMTAzNTA5X3RleHRfZG9jdW1lbnRfaWNvbi5zdmciCiAgIGlua3NjYXBlOnZlcnNpb249IjEuMS4yICgwYTAwY2Y1MzM5LCAyMDIyLTAyLTA0KSIKICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiCiAgIHhtbG5zOnNvZGlwb2RpPSJodHRwOi8vc29kaXBvZGkuc291cmNlZm9yZ2UubmV0L0RURC9zb2RpcG9kaS0wLmR0ZCIKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcwogICAgIGlkPSJkZWZzMTIxNSIgLz48c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgaWQ9Im5hbWVkdmlldzEyMTMiCiAgICAgcGFnZWNvbG9yPSIjZmZmZmZmIgogICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCIKICAgICBpbmtzY2FwZTpwYWdlc2hhZG93PSIyIgogICAgIGlua3NjYXBlOnBhZ2VvcGFjaXR5PSIwLjAiCiAgICAgaW5rc2NhcGU6cGFnZWNoZWNr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OC40MTQsMEgwdjMyaDI0VjUuNTg0TDE4LjQxNCwweiBNMTcuOTk4LDIuNDEzTDIxLjU4Niw2aC0zLjU4OFYyLjQxM3ogTTIsMzBWMS45OThoMTR2Ni4wMDFoNlYzMEgyeiIKICAgICAgIGlkPSJwYXRoMTIwOSIKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmYiIC8+PC9nPjwvc3ZnPgo=)](https://pypi.org/project/pandoc-latex-environment/)
[![Latest release](https://img.shields.io/github/release-date/chdemko/pandoc-latex-environment.svg?logo=github)](https://github.com/chdemko/pandoc-latex-environment/releases)
[![Last commit](https://img.shields.io/github/last-commit/chdemko/pandoc-latex-environment/develop?logo=github)](https://github.com/chdemko/pandoc-latex-environment/commit/develop/)
[![License](https://img.shields.io/pypi/l/pandoc-latex-environment.svg?logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIEdlbmVyYXRvcjogU1ZHIFJlcG8gTWl4ZXIgVG9vbHMgLS0+Cgo8c3ZnCiAgIGhlaWdodD0iODAwcHgiCiAgIHdpZHRoPSI4MDBweCIKICAgdmVyc2lvbj0iMS4xIgogICBpZD0iX3gzMl8iCiAgIHZpZXdCb3g9IjAgMCA1MTIgNTEyIgogICB4bWw6c3BhY2U9InByZXNlcnZlIgogICBzb2RpcG9kaTpkb2NuYW1lPSJiYWxhbmNlLTEtc3ZncmVwby1jb20uc3ZnIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjEuMiAoMGEwMGNmNTMzOSwgMjAyMi0wMi0wNCkiCiAgIHhtbG5zOmlua3NjYXBlPSJodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy9uYW1lc3BhY2VzL2lua3NjYXBlIgogICB4bWxuczpzb2RpcG9kaT0iaHR0cDovL3NvZGlwb2RpLnNv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zNjMC0xOC41NDYtOS42MTYtMzMuNjQ4LTI4Ljg0NS0zMy42NDggICBjMCwwLDAuNjg2LTMyLjk2OS0yMi42NjgtMzIuOTY5Yy03LjMwNSwwLTE2LjE1OSwwLTI0Ljg3NCwwdi0yMy44NThoLTEzLjIwM1YxNDEuM2gtOC41MDd2LTI0LjIzICAgYzQ1LjA3MiwzLjAxNSw5Ny40NTcsMjIuNjA0LDEzNC42NCwzNC4wNzJsLTYwLjM1OCwxNzEuMTM0aC0xMS4zODdjMTEuNDk2LDM4LjAyNSw0Ni44MDQsNjUuNzM2LDg4LjU5LDY1LjczNiAgIGM0MS43OSwwLDc3LjA5OC0yNy43MTEsODguNTk0LTY1LjczNkg1MDAuNjA5eiBNMTQxLjI0MywzMjIuMjc1SDM1Ljk0OEw4OC41OTUsMTczTDE0MS4yNDMsMzIyLjI3NXogTTM3MC43NTgsMzIyLjI3NUw0MjMuNDEsMTczICAgbDUyLjY0MywxNDkuMjc1SDM3MC43NTh6IgogICBpZD0icGF0aDMzNzkiCiAgIHN0eWxlPSJmaWxsOiNmZmZmZmYiIC8+CjwvZz4KPC9zdmc+Cg==)](https://raw.githubusercontent.com/chdemko/pandoc-latex-environment/develop/LICENSE)
[![Python version](https://img.shields.io/pypi/pyversions/pandoc-latex-environment.svg?logo=Python&logoColor=white)](https://pypi.org/project/pandoc-latex-environment/)
[![Poetry version](https://img.shields.io/badge/poetry-1.2%20|%201.3%20|%201.4%20|%201.5-blue.svg?logo=poetry)](https://python-poetry.org/)
Expand Down Expand Up @@ -39,26 +42,16 @@ Instructions
Install *pandoc-latex-environment* using the bash command

~~~shell
$ pip install pandoc-latex-environment
$ pipx install pandoc-latex-environment
~~~

To upgrade to the most recent release, use

~~~shell
$ pip install --upgrade pandoc-latex-environment
~~~

To upgrade to the current code, use

~~~shell
$ pip install --upgrade --force git+https://github.com/chdemko/pandoc-latex-environment
$ pipx install --upgrade pandoc-latex-environment
~~~

`pip` is a script that downloads and installs modules from the Python Package Index, [PyPI]. It should come installed with your python distribution. If you are running linux, `pip` may be bundled separately. On a Debian-based system (including Ubuntu), you can install it as root using

~~~shell
$ apt-get install python3-pip
~~~
`pipx` is a script to install and run python applications in isolated environments from the Python Package Index, [PyPI]. It can be installed using instructions given [here](https://pipx.pypa.io/stable/).

[python]: https://www.python.org/
[on Windows]: https://www.python.org/downloads/windows/
Expand Down
28 changes: 12 additions & 16 deletions docs/conf.py
Expand Up @@ -16,24 +16,23 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import importlib.metadata
import os
import sys

from datetime import date

sys.path.insert(0, os.path.abspath("../.."))

on_rtd = os.environ.get("READTHEDOCS", None) == "True"

# -- Project information -----------------------------------------------------

project = "pandoc-latex-environment"
copyright = "2016-2023, Christophe Demko"
author = "Christophe Demko"
project, release = os.popen("poetry version").readline().strip().split(" ")
author = importlib.metadata.metadata(project)["Author"]
year = date.today().year
copyright = f"2018-{year}, {author}"

# The short X.Y version
version = "1.1"
# The full version, including alpha/beta/rc tags
release = "1.1.6.1"

version = ".".join(release.split(".")[:2])

# -- General configuration ---------------------------------------------------

Expand All @@ -45,9 +44,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'myst_parser'
]
extensions = ["myst_parser"]

# Add any paths that contain templates here, relative to this directory.
templates_path = []
Expand All @@ -57,8 +54,8 @@
#
# source_suffix = ['.rst', '.md']
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
".rst": "restructuredtext",
".md": "markdown",
}


Expand All @@ -75,7 +72,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['images']
exclude_patterns = ["images"]

# The name of the Pygments (syntax highlighting) style to use.
# pygments_style = None
Expand Down Expand Up @@ -113,4 +110,3 @@
# 'searchbox.html']``.
#
# html_sidebars = {}

2 changes: 1 addition & 1 deletion pandoc_latex_environment.py 100755 → 100644
Expand Up @@ -4,7 +4,7 @@
Pandoc filter for adding LaTeX environement on specific div.
"""

from panflute import Div, RawBlock, convert_text, run_filter # type: ignore
from panflute import Div, RawBlock, convert_text, run_filter


def latex(elem, environment, title, identifier):
Expand Down

0 comments on commit 00c9a5c

Please sign in to comment.