pelican-linkclass 2.1.2__tar.gz → 2.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pelican-linkclass might be problematic. Click here for more details.

@@ -1,6 +1,20 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ 2.1.4 - 2024-04-14
5
+ ------------------
6
+
7
+ Ensure plugin is included in sdist build
8
+
9
+ 2.1.3 - 2024-04-07
10
+ ------------------
11
+
12
+ Maintainance release (no user visible changes)
13
+
14
+ * Add Python 3.12 to CI test matrix
15
+ * Switch build system from Hatchling to PDM
16
+ * Fix linters errors
17
+
4
18
  2.1.2 - 2023-10-31
5
19
  ------------------
6
20
 
@@ -1,14 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pelican-linkclass
3
- Version: 2.1.2
3
+ Version: 2.1.4
4
4
  Summary: Pelican plugin to set anchor tag's class attribute to differentiate between internal and external links
5
- Project-URL: Homepage, https://github.com/pelican-plugins/linkclass
6
- Project-URL: Issue Tracker, https://github.com/pelican-plugins/linkclass/issues
7
- Project-URL: Funding, https://donate.getpelican.com/
8
- Author-email: Rafael Laboissière <rafael@laboissiere.net>
5
+ Keywords: pelican,plugin,link class
6
+ Author-Email: =?utf-8?q?Rafael_Laboissi=C3=A8re?= <rafael@laboissiere.net>
9
7
  License: AGPL-3.0
10
- License-File: LICENSE
11
- Keywords: link class,pelican,plugin
12
8
  Classifier: Development Status :: 5 - Production/Stable
13
9
  Classifier: Environment :: Console
14
10
  Classifier: Framework :: Pelican
@@ -21,13 +17,17 @@ Classifier: Programming Language :: Python :: 3.8
21
17
  Classifier: Programming Language :: Python :: 3.9
22
18
  Classifier: Programming Language :: Python :: 3.10
23
19
  Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
24
21
  Classifier: Topic :: Internet :: WWW/HTTP
25
22
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Project-URL: Homepage, https://github.com/pelican-plugins/linkclass
24
+ Project-URL: Issue tracker, https://github.com/pelican-plugins/linkclass/issues
25
+ Project-URL: Funding, https://donate.getpelican.com/
26
26
  Requires-Python: <4.0,>=3.8.1
27
27
  Requires-Dist: pelican>=4.5
28
28
  Requires-Dist: py3dns>=3.2
29
+ Requires-Dist: markdown>=3.4; extra == "markdown"
29
30
  Provides-Extra: markdown
30
- Requires-Dist: markdown>=3.4; extra == 'markdown'
31
31
  Description-Content-Type: text/markdown
32
32
 
33
33
  Link Class: A Plugin for Pelican
@@ -87,8 +87,7 @@ class TestLinkClass(unittest.TestCase):
87
87
  os.path.join(self.content_path, f"{TEST_FILE_STEM}.md"),
88
88
  "w",
89
89
  ) as fid:
90
- fid.write(
91
- """Title: Test
90
+ template = """Title: Test
92
91
  Date: 1970-01-01
93
92
 
94
93
  This is an [{}]({}), inline-style link.
@@ -103,7 +102,9 @@ This is an [{}][{}], reference-style link (with https URL).
103
102
  [{}]: {}
104
103
  [{}]: {}
105
104
 
106
- """.format(
105
+ """
106
+ fid.write(
107
+ template.format(
107
108
  INTERNAL_INLINE_TEXT,
108
109
  INTERNAL_INLINE_LINK,
109
110
  EXTERNAL_INLINE_TEXT_HTTP,
@@ -1,11 +1,16 @@
1
1
  [project]
2
2
  name = "pelican-linkclass"
3
- version = "2.1.2"
3
+ version = "2.1.4"
4
4
  description = "Pelican plugin to set anchor tag's class attribute to differentiate between internal and external links"
5
- authors = [{name = "Rafael Laboissière", email = "rafael@laboissiere.net"}]
6
- license = {text = "AGPL-3.0"}
5
+ authors = [
6
+ { name = "Rafael Laboissière", email = "rafael@laboissiere.net" },
7
+ ]
7
8
  readme = "README.md"
8
- keywords = ["pelican", "plugin", "link class"]
9
+ keywords = [
10
+ "pelican",
11
+ "plugin",
12
+ "link class",
13
+ ]
9
14
  classifiers = [
10
15
  "Development Status :: 5 - Production/Stable",
11
16
  "Environment :: Console",
@@ -19,6 +24,7 @@ classifiers = [
19
24
  "Programming Language :: Python :: 3.9",
20
25
  "Programming Language :: Python :: 3.10",
21
26
  "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
22
28
  "Topic :: Internet :: WWW/HTTP",
23
29
  "Topic :: Software Development :: Libraries :: Python Modules",
24
30
  ]
@@ -28,13 +34,18 @@ dependencies = [
28
34
  "py3dns>=3.2",
29
35
  ]
30
36
 
37
+ [project.license]
38
+ text = "AGPL-3.0"
39
+
31
40
  [project.urls]
32
41
  Homepage = "https://github.com/pelican-plugins/linkclass"
33
42
  "Issue Tracker" = "https://github.com/pelican-plugins/linkclass/issues"
34
43
  Funding = "https://donate.getpelican.com/"
35
44
 
36
45
  [project.optional-dependencies]
37
- markdown = ["markdown>=3.4"]
46
+ markdown = [
47
+ "markdown>=3.4",
48
+ ]
38
49
 
39
50
  [tool.pdm.dev-dependencies]
40
51
  lint = [
@@ -49,6 +60,20 @@ test = [
49
60
  "pytest-sugar>=0.9.7",
50
61
  ]
51
62
 
63
+ [tool.pdm.build]
64
+ source-includes = [
65
+ "CHANGELOG.md",
66
+ "CONTRIBUTING.md",
67
+ "external-link.png",
68
+ "linkclass-example.png",
69
+ ]
70
+ includes = [
71
+ "pelican/",
72
+ ]
73
+ excludes = [
74
+ "tasks.py",
75
+ ]
76
+
52
77
  [tool.autopub]
53
78
  project-name = "Link Class"
54
79
  git-username = "botpub"
@@ -57,42 +82,45 @@ append-github-contributor = true
57
82
 
58
83
  [tool.ruff]
59
84
  select = [
60
- "B", # flake8-bugbear
61
- "BLE", # flake8-blind-except
62
- "C4", # flake8-comprehensions
63
- "D", # pydocstyle
64
- "E", # pycodestyle
65
- "F", # pyflakes
66
- "I", # isort
67
- "ICN", # flake8-import-conventions
68
- "ISC", # flake8-implicit-str-concat
69
- "PGH", # pygrep-hooks
70
- "PL", # pylint
71
- "RET", # flake8-return
72
- "RUF", # ruff-specific rules
73
- "SIM", # flake8-simplify
74
- "T10", # flake8-debugger
75
- "T20", # flake8-print
76
- "TID", # flake8-tidy-imports
77
- "TRY", # tryceratops
78
- "UP", # pyupgrade
79
- "W", # pycodestyle
80
- "YTT", # flake8-2020
85
+ "B",
86
+ "BLE",
87
+ "C4",
88
+ "D",
89
+ "E",
90
+ "F",
91
+ "I",
92
+ "ICN",
93
+ "ISC",
94
+ "PGH",
95
+ "PL",
96
+ "RET",
97
+ "RUF",
98
+ "SIM",
99
+ "T10",
100
+ "T20",
101
+ "TID",
102
+ "TRY",
103
+ "UP",
104
+ "W",
105
+ "YTT",
81
106
  ]
82
-
83
107
  ignore = [
84
- "D100", # missing docstring in public module
85
- "D102", # missing docstring in public method
86
- "D104", # missing docstring in public package
108
+ "D100",
109
+ "D102",
110
+ "D104",
111
+ "D203",
112
+ "D213",
87
113
  ]
88
114
 
89
- target-version = "py38"
90
-
91
115
  [tool.ruff.isort]
92
116
  combine-as-imports = true
93
117
  force-sort-within-sections = true
94
- known-first-party = ["pelican"]
118
+ known-first-party = [
119
+ "pelican",
120
+ ]
95
121
 
96
122
  [build-system]
97
- requires = ["hatchling"]
98
- build-backend = "hatchling.build"
123
+ requires = [
124
+ "pdm-backend",
125
+ ]
126
+ build-backend = "pdm.backend"
@@ -1,15 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- charset = utf-8
5
- end_of_line = lf
6
- indent_size = 4
7
- indent_style = space
8
- insert_final_newline = true
9
- trim_trailing_whitespace = true
10
-
11
- [*.py]
12
- max_line_length = 88
13
-
14
- [*.yml]
15
- indent_size = 2
@@ -1,5 +0,0 @@
1
- ---
2
-
3
- github: justinmayer
4
- custom: https://donate.getpelican.com
5
- liberapay: pelican
@@ -1,97 +0,0 @@
1
- name: build
2
-
3
- on: [push, pull_request]
4
-
5
- env:
6
- PYTEST_ADDOPTS: "--color=yes"
7
-
8
- jobs:
9
- test:
10
- name: Test - ${{ matrix.python-version }}
11
- runs-on: ubuntu-latest
12
- strategy:
13
- matrix:
14
- python-version: ["3.8", "3.9", "3.10", "3.11"]
15
-
16
- steps:
17
- - uses: actions/checkout@v3
18
-
19
- - name: Set up Python ${{ matrix.python-version }} & PDM
20
- uses: pdm-project/setup-pdm@v3
21
- with:
22
- python-version: ${{ matrix.python-version }}
23
- cache: true
24
- cache-dependency-path: ./pyproject.toml
25
-
26
- - name: Install dependencies
27
- run: pdm install
28
-
29
- - name: Run tests
30
- run: pdm run invoke tests
31
-
32
- lint:
33
- name: Lint
34
- runs-on: ubuntu-latest
35
-
36
- steps:
37
- - uses: actions/checkout@v3
38
-
39
- - name: Validate links in Markdown files
40
- uses: JustinBeckwith/linkinator-action@v1
41
- with:
42
- retry: true
43
- linksToSkip: "https://pypi.org/project/pelican-linkclass/"
44
-
45
- - name: Set up Python & PDM
46
- uses: pdm-project/setup-pdm@v3
47
- with:
48
- python-version: "3.10"
49
- cache: true
50
- cache-dependency-path: ./pyproject.toml
51
-
52
- - name: Install dependencies
53
- run: pdm install
54
-
55
- - name: Run linters
56
- run: pdm run invoke lint --diff
57
-
58
- deploy:
59
- name: Deploy
60
- environment: Deployment
61
- needs: [test, lint]
62
- runs-on: ubuntu-latest
63
- if: github.ref=='refs/heads/main' && github.event_name!='pull_request'
64
-
65
- permissions:
66
- contents: write
67
- id-token: write
68
-
69
- steps:
70
- - uses: actions/checkout@v3
71
- with:
72
- token: ${{ secrets.GH_TOKEN }}
73
-
74
- - name: Set up Python
75
- uses: actions/setup-python@v4
76
- with:
77
- python-version: "3.10"
78
-
79
- - name: Check release
80
- id: check_release
81
- run: |
82
- python -m pip install autopub[github]
83
- autopub check
84
-
85
- - name: Publish
86
- if: ${{ steps.check_release.outputs.autopub_release=='true' }}
87
- env:
88
- GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
89
- run: |
90
- autopub prepare
91
- autopub commit
92
- autopub build
93
- autopub githubrelease
94
-
95
- - name: Upload package to PyPI
96
- if: ${{ steps.check_release.outputs.autopub_release=='true' }}
97
- uses: pypa/gh-action-pypi-publish@release/v1
@@ -1,6 +0,0 @@
1
- *.pyc
2
- __pycache__/
3
- /dist/
4
- /*.egg-info
5
- /build/
6
- pdm.lock
@@ -1,31 +0,0 @@
1
- ---
2
- ci:
3
- autoupdate_schedule: quarterly
4
-
5
- # See https://pre-commit.com/hooks.html for info on hooks
6
- repos:
7
- - repo: https://github.com/pre-commit/pre-commit-hooks
8
- rev: v4.5.0
9
- hooks:
10
- - id: check-added-large-files
11
- - id: check-ast
12
- - id: check-case-conflict
13
- - id: check-docstring-first
14
- - id: check-merge-conflict
15
- - id: check-toml
16
- - id: check-yaml
17
- - id: debug-statements
18
- - id: detect-private-key
19
- - id: end-of-file-fixer
20
- - id: forbid-new-submodules
21
- - id: trailing-whitespace
22
-
23
- - repo: https://github.com/psf/black
24
- rev: 23.10.1
25
- hooks:
26
- - id: black
27
-
28
- - repo: https://github.com/astral-sh/ruff-pre-commit
29
- rev: v0.1.3
30
- hooks:
31
- - id: ruff
@@ -1,3 +0,0 @@
1
- Release type: patch
2
-
3
- Fix project name
@@ -1,99 +0,0 @@
1
- from inspect import cleandoc
2
- import logging
3
- import os
4
- from pathlib import Path
5
- from shutil import which
6
-
7
- from invoke import task
8
-
9
- logger = logging.getLogger(__name__)
10
-
11
- PKG_NAME = "linkclass"
12
- PKG_PATH = Path(f"pelican/plugins/{PKG_NAME}")
13
-
14
- ACTIVE_VENV = os.environ.get("VIRTUAL_ENV", None)
15
- VENV_HOME = Path(os.environ.get("WORKON_HOME", "~/.local/share/virtualenvs"))
16
- VENV_PATH = Path(ACTIVE_VENV) if ACTIVE_VENV else (VENV_HOME.expanduser() / PKG_NAME)
17
- VENV = str(VENV_PATH.expanduser())
18
- BIN_DIR = "bin" if os.name != "nt" else "Scripts"
19
- VENV_BIN = Path(VENV) / Path(BIN_DIR)
20
-
21
- TOOLS = ("pdm", "pre-commit")
22
- PDM = which("pdm") if which("pdm") else (VENV_BIN / "pdm")
23
- CMD_PREFIX = f"{VENV_BIN}/" if ACTIVE_VENV else f"{PDM} run "
24
- PRECOMMIT = which("pre-commit") if which("pre-commit") else f"{CMD_PREFIX}pre-commit"
25
- PTY = os.name != "nt"
26
-
27
-
28
- @task
29
- def tests(c, deprecations=False):
30
- """Run the test suite, optionally with `--deprecations`."""
31
- deprecations_flag = "" if deprecations else "-W ignore::DeprecationWarning"
32
- c.run(f"{CMD_PREFIX}pytest {deprecations_flag}", pty=PTY)
33
-
34
-
35
- @task
36
- def black(c, check=False, diff=False):
37
- """Run Black auto-formatter, optionally with `--check` or `--diff`."""
38
- check_flag, diff_flag = "", ""
39
- if check:
40
- check_flag = "--check"
41
- if diff:
42
- diff_flag = "--diff"
43
- c.run(f"{CMD_PREFIX}black {check_flag} {diff_flag} {PKG_PATH} tasks.py", pty=PTY)
44
-
45
-
46
- @task
47
- def ruff(c, fix=False, diff=False):
48
- """Run Ruff to ensure code meets project standards."""
49
- diff_flag, fix_flag = "", ""
50
- if fix:
51
- fix_flag = "--fix"
52
- if diff:
53
- diff_flag = "--diff"
54
- c.run(f"{CMD_PREFIX}ruff check {diff_flag} {fix_flag} .", pty=PTY)
55
-
56
-
57
- @task
58
- def lint(c, fix=False, diff=False):
59
- """Check code style via linting tools."""
60
- ruff(c, fix=fix, diff=diff)
61
- black(c, check=(not fix), diff=diff)
62
-
63
-
64
- @task
65
- def tools(c):
66
- """Install development tools in the virtual environment if not already on PATH."""
67
- for tool in TOOLS:
68
- if not which(tool):
69
- logger.info(f"** Installing {tool} **")
70
- c.run(f"{CMD_PREFIX}pip install {tool}")
71
-
72
-
73
- @task
74
- def precommit(c):
75
- """Install pre-commit hooks to .git/hooks/pre-commit."""
76
- logger.info("** Installing pre-commit hooks **")
77
- c.run(f"{PRECOMMIT} install")
78
-
79
-
80
- @task
81
- def setup(c):
82
- """Set up the development environment."""
83
- if which("pdm") or ACTIVE_VENV:
84
- tools(c)
85
- c.run(f"{CMD_PREFIX}python -m pip install --upgrade pip", pty=PTY)
86
- c.run(f"{PDM} update --dev", pty=PTY)
87
- precommit(c)
88
- logger.info("\nDevelopment environment should now be set up and ready!\n")
89
- else:
90
- error_message = """
91
- PDM is not installed, and there is no active virtual environment available.
92
- You can either manually create and activate a virtual environment, or you can
93
- install PDM via:
94
-
95
- curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 -
96
-
97
- Once you have taken one of the above two steps, run `invoke setup` again.
98
- """ # noqa: E501
99
- raise SystemExit(cleandoc(error_message))