Skip to content
Merged
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
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,10 @@ jobs:
cache: true

- name: Publish Package
run: pdm publish -u __token__ -p "$PYPI_PASSWORD"
run: pdm publish
env:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
PDM_PYPI_USERNAME: __token__
PDM_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

finish:
needs: [build]
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Generated by pdm
src/**/_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
40 changes: 23 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ license = {text = "MIT"}
name = "sphinx-nested-apidoc"
readme = "README.rst"
requires-python = ">=3.9"
version = "1.2.6"
dynamic = ["version"]

[project.urls]
"Bug Tracker" = "https://github.com/arunanshub/sphinx-nested-apidoc/issues"
Expand All @@ -31,13 +31,26 @@ repository = "https://github.com/arunanshub/sphinx-nested-apidoc"
[project.scripts]
sphinx-nested-apidoc = "sphinx_nested_apidoc.__main__:main"

[build-system]
build-backend = "pdm.backend"
requires = ["pdm-backend"]

[tool.pdm]
distribution = true

[tool.pdm.version]
source = "scm"
write_to = "sphinx_nested_apidoc/_version.py"
write_template = """
# This file is generated by pdm

__version__ = "{}"
"""

[tool.pdm.dev-dependencies]
dev = [
"pre-commit>=3.0.0",
"mypy>=1.3.0",
"pre-commit>=3.0.0",
"mypy>=1.3.0",
]
docs = [
"furo>=2022.9.29",
Expand All @@ -52,9 +65,7 @@ test = [
"pytest-mock>=3.10.0",
]

[build-system]
build-backend = "pdm.backend"
requires = ["pdm-backend"]
# ================== Development tools ==================

[tool.commitizen]
annotated_tag = true
Expand All @@ -69,10 +80,6 @@ version_files = [
"src/sphinx_nested_apidoc/__init__.py",
]

[tool.black]
line-length = 79
target-verson = "py38"

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
Expand All @@ -84,12 +91,12 @@ exclude_lines = [
addopts = "--strict-config --strict-markers"

[tool.ruff]
exclude = [
"docs",
"tests",
]
ignore = ["ANN101", "ANN102", "ANN401", "B024", "PLR0913"]
line-length = 79
target-version = "py38"

[tool.ruff.lint]
exclude = ["docs/*", "tests/*", "src/sphinx_nested_apidoc/_version.py"]
ignore = ["ANN101", "ANN102", "ANN401", "B024", "PLR0913"]
select = [
"ANN",
"B",
Expand All @@ -110,9 +117,8 @@ select = [
"G",
"PL",
]
target-version = "py38"

[tool.ruff.isort]
[tool.ruff.lint.isort]
combine-as-imports = true
force-wrap-aliases = true
required-imports = ["from __future__ import annotations"]
6 changes: 3 additions & 3 deletions src/sphinx_nested_apidoc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import logging

from ._version import __version__

logging.getLogger(__name__).addHandler(logging.NullHandler())

LOGGER_FORMAT = "[{levelname}: {filename}:{lineno}]: {message}"

__version__ = "1.2.6"


def start_logging(
level: int | str = logging.DEBUG,
Expand All @@ -30,4 +30,4 @@ def start_logging(

from ._ext import setup # noqa: E402,TCH001

__all__ = ["setup"]
__all__ = ["setup", "__version__"]