mirror of
https://github.com/pelican-plugins/share-post.git
synced 2025-10-15 17:08:54 +02:00
Use PDM & Ruff instead of Poetry+Black+Flake8+isort
This commit is contained in:
parent
ff43fa4542
commit
d7c2f2bf1f
6 changed files with 168 additions and 156 deletions
119
pyproject.toml
119
pyproject.toml
|
|
@ -1,53 +1,63 @@
|
|||
[tool.poetry]
|
||||
[project]
|
||||
name = "pelican-share-post"
|
||||
version = "1.1.0"
|
||||
description = "A Pelican plugin to create share URLs of article"
|
||||
authors = ["Talha Mansoor <talha131@gmail.com>", "Justin Mayer <entrop@gmail.com>"]
|
||||
license = "MIT"
|
||||
authors = [{name = "Talha Mansoor", email = "talha131@gmail.com"}, {name = "Justin Mayer", email = "entroP@gmail.com"}]
|
||||
license = {text = "MIT"}
|
||||
readme = "README.md"
|
||||
keywords = ["pelican", "plugin", "social"]
|
||||
repository = "https://github.com/pelican-plugins/share-post"
|
||||
documentation = "https://docs.getpelican.com"
|
||||
packages = [
|
||||
{ include = "pelican" },
|
||||
]
|
||||
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Environment :: Console",
|
||||
"Framework :: Pelican",
|
||||
"Framework :: Pelican :: Plugins",
|
||||
"Intended Audience :: End Users/Desktop",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Internet :: WWW/HTTP",
|
||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||
]
|
||||
requires-python = ">=3.8.1,<4.0"
|
||||
dependencies = [
|
||||
"pelican>=4.5",
|
||||
"beautifulsoup4>=4.9.3",
|
||||
]
|
||||
|
||||
[tool.poetry.urls]
|
||||
"Funding" = "https://donate.getpelican.com/"
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/pelican-plugins/share-post"
|
||||
"Issue Tracker" = "https://github.com/pelican-plugins/share-post/issues"
|
||||
Funding = "https://donate.getpelican.com/"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.7,<4.0"
|
||||
pelican = ">=4.5"
|
||||
markdown = {version = ">=3.2.2", optional = true}
|
||||
beautifulsoup4 = "^4.9.3"
|
||||
# Avoid PyPI/Poetry problem: https://github.com/python-poetry/poetry/issues/9293
|
||||
docutils = "!=0.21.post1"
|
||||
[project.optional-dependencies]
|
||||
markdown = ["markdown>=3.4"]
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
black = ">=22.3.0"
|
||||
flake8 = "^3.9"
|
||||
flake8-black = "^0.3"
|
||||
invoke = "^2.1"
|
||||
isort = "^5.4"
|
||||
markdown = "^3.4"
|
||||
pytest = "^6.0"
|
||||
pytest-cov = "^2.8"
|
||||
pytest-sugar = "^0.9.7"
|
||||
[tool.pdm]
|
||||
|
||||
[tool.poetry.extras]
|
||||
markdown = ["markdown"]
|
||||
[tool.pdm.dev-dependencies]
|
||||
lint = [
|
||||
"invoke>=2.2",
|
||||
"ruff>=0.5.0,<0.6.0"
|
||||
]
|
||||
test = [
|
||||
"markdown>=3.4",
|
||||
"pytest>=7.0",
|
||||
"pytest-cov>=4.0",
|
||||
"pytest-sugar>=1.0",
|
||||
]
|
||||
|
||||
[tool.pdm.build]
|
||||
source-includes = [
|
||||
"CHANGELOG.md",
|
||||
"CONTRIBUTING.md",
|
||||
]
|
||||
includes = ["pelican/"]
|
||||
excludes = ["**/.DS_Store", "**/test_data/**", "tasks.py"]
|
||||
|
||||
[tool.autopub]
|
||||
project-name = "Share Post"
|
||||
|
|
@ -55,18 +65,45 @@ git-username = "botpub"
|
|||
git-email = "52496925+botpub@users.noreply.github.com"
|
||||
append-github-contributor = true
|
||||
|
||||
[tool.isort]
|
||||
# Maintain compatibility with Black
|
||||
profile = "black"
|
||||
multi_line_output = 3
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"B", # flake8-bugbear
|
||||
"BLE", # flake8-blind-except
|
||||
"C4", # flake8-comprehensions
|
||||
"D", # pydocstyle
|
||||
"E", # pycodestyle
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
"ICN", # flake8-import-conventions
|
||||
"ISC", # flake8-implicit-str-concat
|
||||
"PGH", # pygrep-hooks
|
||||
"PL", # pylint
|
||||
"RET", # flake8-return
|
||||
"RUF", # ruff-specific rules
|
||||
"SIM", # flake8-simplify
|
||||
"T10", # flake8-debugger
|
||||
"T20", # flake8-print
|
||||
"TID", # flake8-tidy-imports
|
||||
"TRY", # tryceratops
|
||||
"UP", # pyupgrade
|
||||
"W", # pycodestyle
|
||||
"YTT", # flake8-2020
|
||||
]
|
||||
|
||||
# Sort imports within their section independent of the import type
|
||||
force_sort_within_sections = true
|
||||
ignore = [
|
||||
"D100", # missing docstring in public module
|
||||
"D103", # missing docstring in public method
|
||||
"D104", # missing docstring in public package
|
||||
"D203", # blank line before class docstring
|
||||
"D213", # multi-line docstring summary should start at the second line
|
||||
"ISC001", # disabled so `ruff format` works without warning
|
||||
]
|
||||
|
||||
# Designate "pelican" as separate import section
|
||||
known_pelican = "pelican"
|
||||
sections = "FUTURE,STDLIB,THIRDPARTY,PELICAN,FIRSTPARTY,LOCALFOLDER"
|
||||
[tool.ruff.lint.isort]
|
||||
combine-as-imports = true
|
||||
force-sort-within-sections = true
|
||||
known-first-party = ["pelican"]
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
requires = ["pdm-backend"]
|
||||
build-backend = "pdm.backend"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue