-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
159 lines (132 loc) · 4.48 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
[tool.poetry]
name = "github-changelog-md"
version = "0.9.5"
description = "Generate a Markdown Changelog from your Github repository."
authors = ["Grant Ramsay <[email protected]>"]
readme = "README.md"
license = "MIT"
packages = [{ include = "github_changelog_md" }]
homepage = "https://changelog.seapagan.net"
repository = "https://github.com/seapagan/github-changelog-md"
[tool.poetry.urls]
"Pull Requests" = "https://github.com/seapagan/github-changelog-md/pulls"
"Bug Tracker" = "https://github.com/seapagan/github-changelog-md/issues"
"Changelog" = "https://github.com/seapagan/github-changelog-md/blob/main/CHANGELOG.md"
[tool.poetry.scripts]
github-changelog-md = "github_changelog_md.main:app"
[tool.poetry.dependencies]
python = ">=3.9,<4.0"
pygithub = ">=1.59.1,<3.0.0"
rtoml = ">=0.9.0,<1.0.0"
simple-toml-settings = ">=0.4.0,<1.0.0"
typer = ">=0.9,<0.13"
rich = ">=13.6.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.group.dev.dependencies]
# linting, type-checking and security checks
pre-commit = ">=3.3.3"
pymarkdownlnt = ">=0.9.12"
mypy = ">=1.4.1"
ruff = ">=0.5.0"
# task runner
poethepoet = ">=0.27.0,<0.28.0"
# testing
faker = ">=19.2,<28.0"
mock = ">=5.1.0"
pyfakefs = ">=5.3.0"
pytest = ">=7.4,<9.0"
pytest-cov = ">=4,<6"
pytest-xdist = ">=3.2.1"
pytest-sugar = ">=0.9.7,<1.1.0"
pytest-randomly = ">=3.13.0"
pytest-reverse = ">=1.7.0"
pytest-asyncio = ">=0.21.1"
pytest-mock = ">=3.11.1"
# documentation
mkdocs = ">=1.4.3"
mkdocs-autorefs = ">=0.5,<1.1"
mkdocs-material = ">=9.1.19"
mkdocs-minify-plugin = ">=0.7,<0.9"
mkdocs-git-revision-date-localized-plugin = ">=1.2.0"
pymdown-extensions = ">=10.1"
pygments = ">=2.15.1"
[tool.poe.tasks]
# setup PoeThePoet tasks
pre.cmd = "pre-commit run --all-files"
pre.help = "Run pre-commit checks"
mypy.cmd = "mypy github_changelog_md/**/*.py tests/**/*.py --strict"
mypy.help = "Run mypy checks"
format.help = "Format code with Ruff"
format.cmd = "ruff format ."
ruff.help = "Run Ruff checks"
ruff.cmd = "ruff check ."
test.help = "Run tests using Pytest"
test.cmd = "pytest"
markdown.cmd = "pymarkdown scan -r github_changelog_md/**/*.md docs/**/*.md"
markdown.help = "Run markdown checks"
# run all linting checks in sequence. we want to run them all, even if one fails
lint.ignore_fail = "return_non_zero"
lint.sequence = ["format", "ruff", "mypy", "markdown"]
lint.help = "Run all linting checks"
"docs:publish".cmd = "mkdocs gh-deploy"
"docs:publish".help = "Publish documentation to GitHub Pages"
"docs:build".cmd = "mkdocs build"
"docs:build".help = "Build documentation locally to './site' folder"
"docs:serve".cmd = "mkdocs serve -w TODO.md -w CHANGELOG.md -w CONTRIBUTING.md"
"docs:serve".help = "Serve documentation locally"
"docs:serve:all".cmd = "mkdocs serve -w TODO.md -w CHANGELOG.md -w CONTRIBUTING.md -a 0.0.0.0:8000"
"docs:serve:all".help = "Serve documentation locally on all interfaces"
changelog.cmd = "github-changelog-md"
changelog.help = "Generate the CHANGELOG.md file"
# configure assorted tools and linters
[tool.pymarkdown]
plugins.md014.enabled = false
plugins.md036.enabled = false
plugins.md046.enabled = false
[tool.pytest.ini_options]
addopts = ["--cov", "--cov-report", "term-missing", "--cov-report", "html"]
filterwarnings = []
mock_use_standalone_module = true
pythonpath = ["github_changelog_md"]
[tool.coverage.run]
source = ["github_changelog_md"]
omit = ["*/tests/*"]
[tool.ruff]
line-length = 80
src = ["github_changelog_md"]
target-version = "py39" # minimum python version supported
[tool.ruff.lint]
select = ["ALL"] # we are being very strict!
ignore = [
"ANN101",
"PGH003",
"FBT002",
"FBT003",
"B006",
] # These rules are too strict even for us 😝
extend-ignore = ["COM812", "ISC001"] # these are ignored for ruff formatting
[tool.ruff.lint.isort]
known-first-party = ["github_changelog_md"]
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
[tool.ruff.lint.pep8-naming]
classmethod-decorators = ["pydantic.validator", "pydantic.root_validator"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.extend-per-file-ignores]
"tests/**/*.py" = [
"S101", # we can (and MUST!) use 'assert' in test files.
"ANN001", # annotations for fixtures are sometimes a pain for test files.
]
"github_changelog_md/main.py" = [
"UP007",
"PLR0913",
] # These cause issues in Typer Apps
[tool.ruff.format]
indent-style = "space"
quote-style = "double"
[[tool.mypy.overrides]]
disable_error_code = ["method-assign", "no-untyped-def", "attr-defined"]
module = "tests.*"