Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate to poetry #18

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ jobs:
strategy:
fail-fast: false
matrix:
python: [ 3.6, 3.7, 3.8, 3.9 ]
sphinx: [ 1.*, 2.*, 3.*, 4.* ]
python: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
sphinx: [ "^4", "^5", "^6", "^7" ]
steps:
- name: Update code
uses: actions/checkout@v2
- name: Install dependencies (Sphinx ${{ matrix.sphinx }})
env:
PYTHON_VERSION: ${{ matrix.python }}
SPHINX_VERSION: ${{ matrix.sphinx }}
run: |
./run init
./run deps
- name: Run tests
env:
PYTHON_VERSION: ${{ matrix.python }}
run: ./run tests
- uses: actions/checkout@v4
- name: Set Up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Update build deps
run: poetry run python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: poetry install
- name: Set sphinx version
run: poetry add sphinx@${{ matrix.sphinx }}
- name: Run Tests
run: poetry run pytest
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.env
.runner
poetry.lock
.venv

__pycache__/
*.py[cod]
Expand Down
58 changes: 35 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
[build-system]
requires = ["setuptools", "flit_core >=2,<4"]
build-backend = "setuptools.build_meta"

[tool.flit.metadata]
module = "sphinxcontrib-kroki"
author = "Martin Hasoň"
author-email = "[email protected]"
home-page = "https://github.com/sphinx-contrib/kroki"
description-file = "README.md"
classifiers = ["License :: OSI Approved :: MIT License"]
requires-python = ">=3.6"
requires = [
"sphinx",
"requests>=2.4.2",
[tool.poetry]
name = "sphinxcontrib-kroki"
version = "1.3.0"
description = "Kroki integration into sphinx"
license = "MIT"
authors = ["Martin Hasoň <[email protected]>"]
readme = "README.md"
repository = "https://github.com/sphinx-contrib/kroki"
classifiers = [
"Framework :: Sphinx :: Extension",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]

[tool.flit.metadata.requires-extra]
code = ["black", "flake8", "mypy"]
test = [
"coverage",
"pytest",
"pytest-cov",
packages = [
{ include = "sphinxcontrib", from = "src" }
]
extra = []

[tool.poetry.dependencies]
python = "^3.8.1"
sphinx = "^6"
requests = "^2.4.2"
pyyaml = "^6.0.1"

[tool.poetry.group.dev.dependencies]
black = "^23.10.1"
flake8 = "^6.1.0"
mypy = "^1.6.1"
coverage = "^7.3.2"
pytest = "^7.4.3"
pytest-cov = "^4.1.0"


[tool.pytest.ini_options]
markers = [
Expand All @@ -31,3 +38,8 @@ markers = [

[tool.black]
line-length = 79


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
53 changes: 0 additions & 53 deletions run

This file was deleted.

38 changes: 0 additions & 38 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.