Compare commits

..

106 Commits

Author SHA1 Message Date
Bastian Venthur
618327adf5 reformatted 2023-11-12 17:24:48 +01:00
Bastian Venthur
f9f27953c6 Merge branch 'master' into delete_extra_files 2023-11-12 17:23:48 +01:00
Bastian Venthur
55e2f41b88 correct release 2023-11-11 11:01:28 +01:00
Bastian Venthur
8c61614295 fixed suggests to blag-doc, bumped version 2023-11-11 10:59:07 +01:00
Bastian Venthur
c364087eab Merge pull request #158 from venthur/dependabot/pip/mkdocs-material-9.4.8
Bump mkdocs-material from 9.4.6 to 9.4.8
2023-11-11 10:58:02 +01:00
Bastian Venthur
a06947d762 Merge pull request #161 from venthur/dependabot/pip/ruff-0.1.5
Bump ruff from 0.1.3 to 0.1.5
2023-11-11 10:57:49 +01:00
dependabot[bot]
12a7fb9568 Bump ruff from 0.1.3 to 0.1.5
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.3 to 0.1.5.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.1.3...v0.1.5)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-11 09:55:13 +00:00
dependabot[bot]
caf6217221 Bump mkdocs-material from 9.4.6 to 9.4.8
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.4.6 to 9.4.8.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.4.6...9.4.8)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-11 09:55:02 +00:00
Bastian Venthur
744dadb1a5 Merge pull request #159 from venthur/dependabot/pip/types-markdown-3.5.0.1
Bump types-markdown from 3.5.0.0 to 3.5.0.1
2023-11-11 10:54:41 +01:00
Bastian Venthur
7defacd3f6 Merge pull request #153 from venthur/dependabot/pip/wheel-0.41.3
Bump wheel from 0.41.2 to 0.41.3
2023-11-11 10:54:23 +01:00
Bastian Venthur
c1d741a56c Merge pull request #157 from venthur/dependabot/pip/markdown-3.5.1
Bump markdown from 3.5 to 3.5.1
2023-11-11 10:53:59 +01:00
dependabot[bot]
056ddbdbcb Bump types-markdown from 3.5.0.0 to 3.5.0.1
Bumps [types-markdown](https://github.com/python/typeshed) from 3.5.0.0 to 3.5.0.1.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-markdown
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 14:42:44 +00:00
dependabot[bot]
9b0bd2814a Bump markdown from 3.5 to 3.5.1
Bumps [markdown](https://github.com/Python-Markdown/markdown) from 3.5 to 3.5.1.
- [Release notes](https://github.com/Python-Markdown/markdown/releases)
- [Changelog](https://github.com/Python-Markdown/markdown/blob/master/docs/changelog.md)
- [Commits](https://github.com/Python-Markdown/markdown/compare/3.5...3.5.1)

---
updated-dependencies:
- dependency-name: markdown
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 14:42:36 +00:00
Bastian Venthur
9378bb5103 removed watchfile, bumped version 2023-11-05 17:15:15 +01:00
dependabot[bot]
8f287c5b8d Bump wheel from 0.41.2 to 0.41.3
Bumps [wheel](https://github.com/pypa/wheel) from 0.41.2 to 0.41.3.
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.41.2...0.41.3)

---
updated-dependencies:
- dependency-name: wheel
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-05 16:03:50 +00:00
Bastian Venthur
77954f13ef Merge pull request #156 from venthur/dependabot/pip/pytest-7.4.3
Bump pytest from 7.4.2 to 7.4.3
2023-11-05 17:03:36 +01:00
Bastian Venthur
4b5ca7a414 Merge pull request #155 from venthur/dependabot/pip/ruff-0.1.3
Bump ruff from 0.1.1 to 0.1.3
2023-11-05 17:03:10 +01:00
dependabot[bot]
6ec70ba61b Bump pytest from 7.4.2 to 7.4.3
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.2 to 7.4.3.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.4.2...7.4.3)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 14:07:08 +00:00
dependabot[bot]
082f1e0473 Bump ruff from 0.1.1 to 0.1.3
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.1 to 0.1.3.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.1.1...v0.1.3)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 14:07:01 +00:00
Bastian Venthur
b64563757c Merge pull request #152 from venthur/3.12
added python 3.12 to test suite
2023-10-30 08:54:02 +01:00
Bastian Venthur
dfcbaec6f9 added python 3.12 to test suite 2023-10-30 08:51:23 +01:00
Bastian Venthur
5314a7d260 fixed requirements in pyproject.toml still pointing to sphinx 2023-10-30 08:48:52 +01:00
Bastian Venthur
f507693f05 Merge pull request #150 from venthur/dependabot/pip/mypy-1.6.1
Bump mypy from 1.6.0 to 1.6.1
2023-10-27 11:20:06 +02:00
dependabot[bot]
86356a5e1d Bump mypy from 1.6.0 to 1.6.1
Bumps [mypy](https://github.com/python/mypy) from 1.6.0 to 1.6.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-27 09:17:43 +00:00
Bastian Venthur
36be7fcc07 Merge pull request #146 from venthur/dependabot/pip/types-markdown-3.5.0.0
Bump types-markdown from 3.4.2.10 to 3.5.0.0
2023-10-27 11:17:02 +02:00
Bastian Venthur
869ca2a95e Merge pull request #143 from venthur/dependabot/pip/markdown-3.5
Bump markdown from 3.4.4 to 3.5
2023-10-27 11:16:49 +02:00
dependabot[bot]
9734386397 Bump markdown from 3.4.4 to 3.5
Bumps [markdown](https://github.com/Python-Markdown/markdown) from 3.4.4 to 3.5.
- [Changelog](https://github.com/Python-Markdown/markdown/blob/master/docs/changelog.md)
- [Commits](https://github.com/Python-Markdown/markdown/compare/3.4.4...3.5)

---
updated-dependencies:
- dependency-name: markdown
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-27 09:00:54 +00:00
dependabot[bot]
d66b2955a5 Bump types-markdown from 3.4.2.10 to 3.5.0.0
Bumps [types-markdown](https://github.com/python/typeshed) from 3.4.2.10 to 3.5.0.0.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-markdown
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-27 09:00:52 +00:00
Bastian Venthur
b889bb5b85 Merge pull request #151 from venthur/dependabot/pip/ruff-0.1.1
Bump ruff from 0.1.0 to 0.1.1
2023-10-27 11:00:11 +02:00
dependabot[bot]
2a6c7d0b0e Bump ruff from 0.1.0 to 0.1.1
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.0 to 0.1.1.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.1.0...v0.1.1)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 14:48:40 +00:00
Bastian Venthur
95546b7dab Merge pull request #149 from venthur/dependabot/pip/ruff-0.1.0
Bump ruff from 0.0.291 to 0.1.0
2023-10-19 09:24:33 +02:00
dependabot[bot]
d6e049bebb Bump ruff from 0.0.291 to 0.1.0
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.291 to 0.1.0.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.0.291...v0.1.0)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-18 10:00:09 +00:00
Bastian Venthur
e13a2cb50b Merge pull request #147 from venthur/dependabot/pip/mypy-1.6.0
Bump mypy from 1.5.1 to 1.6.0
2023-10-18 11:59:06 +02:00
Bastian Venthur
ed33fdb542 Merge pull request #148 from venthur/dependabot/pip/mkdocs-material-9.4.6
Bump mkdocs-material from 9.4.3 to 9.4.6
2023-10-18 11:58:53 +02:00
dependabot[bot]
7d7723219b Bump mkdocs-material from 9.4.3 to 9.4.6
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.4.3 to 9.4.6.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.4.3...9.4.6)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 14:59:18 +00:00
dependabot[bot]
a550d7b194 Bump mypy from 1.5.1 to 1.6.0
Bumps [mypy](https://github.com/python/mypy) from 1.5.1 to 1.6.0.
- [Commits](https://github.com/python/mypy/compare/v1.5.1...v1.6.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 14:59:10 +00:00
Bastian Venthur
096d86e339 Merge pull request #142 from venthur/dependabot/pip/mkdocs-material-9.4.3
Bump mkdocs-material from 9.3.1 to 9.4.3
2023-10-03 16:03:11 +03:00
dependabot[bot]
81a64019ee Bump mkdocs-material from 9.3.1 to 9.4.3
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.3.1 to 9.4.3.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.3.1...9.4.3)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 14:22:23 +00:00
Bastian Venthur
b3ad97add7 Merge pull request #140 from venthur/dependabot/pip/ruff-0.0.291
Bump ruff from 0.0.290 to 0.0.291
2023-09-27 09:36:39 +03:00
Bastian Venthur
b0b0f6fbbf Merge pull request #139 from venthur/dependabot/pip/mkdocs-1.5.3
Bump mkdocs from 1.5.2 to 1.5.3
2023-09-27 09:36:24 +03:00
dependabot[bot]
a416095cd0 Bump ruff from 0.0.290 to 0.0.291
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.290 to 0.0.291.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.0.290...v0.0.291)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 14:59:52 +00:00
dependabot[bot]
65e5fd8728 Bump mkdocs from 1.5.2 to 1.5.3
Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/mkdocs/mkdocs/releases)
- [Commits](https://github.com/mkdocs/mkdocs/compare/1.5.2...1.5.3)

---
updated-dependencies:
- dependency-name: mkdocs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 14:59:33 +00:00
Bastian Venthur
557077e646 Merge pull request #138 from venthur/ruff
switch from flake8 to ruff
2023-09-20 15:37:06 +02:00
Bastian Venthur
f2900fdb4b run ruff check explicitely 2023-09-20 15:16:58 +02:00
Bastian Venthur
a7c221f345 updated changelog 2023-09-20 15:10:21 +02:00
Bastian Venthur
c92130559c add missing docstrings 2023-09-20 15:09:28 +02:00
Bastian Venthur
4f3516fb19 fixed src 2023-09-20 13:03:55 +02:00
Bastian Venthur
ead8c518c3 replaced flake8 with ruff 2023-09-20 12:58:50 +02:00
Bastian Venthur
6431ffae8c Merge pull request #133 from venthur/dependabot/pip/mkdocstrings-python--0.23.0
Bump mkdocstrings[python] from 0.22.0 to 0.23.0
2023-09-18 08:31:05 +02:00
dependabot[bot]
33b5c282f9 Bump mkdocstrings[python] from 0.22.0 to 0.23.0
Bumps [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) from 0.22.0 to 0.23.0.
- [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
- [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.22.0...0.23.0)

---
updated-dependencies:
- dependency-name: mkdocstrings[python]
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 06:15:35 +00:00
Bastian Venthur
3b12986dc9 Merge pull request #128 from venthur/dependabot/pip/wheel-0.41.2
Bump wheel from 0.41.1 to 0.41.2
2023-09-18 08:15:06 +02:00
Bastian Venthur
91c6126e4f Merge pull request #137 from venthur/dependabot/pip/mkdocs-material-9.3.1
Bump mkdocs-material from 9.1.21 to 9.3.1
2023-09-18 08:14:45 +02:00
dependabot[bot]
ca5405f7aa Bump wheel from 0.41.1 to 0.41.2
Bumps [wheel](https://github.com/pypa/wheel) from 0.41.1 to 0.41.2.
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.41.1...0.41.2)

---
updated-dependencies:
- dependency-name: wheel
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-15 19:12:21 +00:00
dependabot[bot]
f0e6cd2144 Bump mkdocs-material from 9.1.21 to 9.3.1
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.21 to 9.3.1.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.21...9.3.1)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-15 19:12:10 +00:00
Bastian Venthur
81febfbbd1 Merge pull request #134 from venthur/dependabot/pip/pytest-7.4.2
Bump pytest from 7.4.0 to 7.4.2
2023-09-15 21:11:27 +02:00
Bastian Venthur
e8af1d0380 Merge pull request #135 from venthur/dependabot/pip/build-1.0.3
Bump build from 0.10.0 to 1.0.3
2023-09-15 21:08:31 +02:00
Bastian Venthur
c9f7242f02 Merge pull request #129 from venthur/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2023-09-15 21:05:45 +02:00
dependabot[bot]
ceb6de574f Bump build from 0.10.0 to 1.0.3
Bumps [build](https://github.com/pypa/build) from 0.10.0 to 1.0.3.
- [Release notes](https://github.com/pypa/build/releases)
- [Changelog](https://github.com/pypa/build/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pypa/build/compare/0.10.0...1.0.3)

---
updated-dependencies:
- dependency-name: build
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 14:16:49 +00:00
dependabot[bot]
4382dff703 Bump pytest from 7.4.0 to 7.4.2
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.0 to 7.4.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.4.0...7.4.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 14:16:45 +00:00
dependabot[bot]
cfe7f36868 Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 14:08:55 +00:00
Bastian Venthur
c45fb44c9f added watchfile 2023-08-27 15:28:50 +02:00
Bastian Venthur
f09b30d069 bump version 2023-08-27 15:28:39 +02:00
Bastian Venthur
d836025594 Merge pull request #126 from venthur/dependabot/pip/mypy-1.5.1
Bump mypy from 1.5.0 to 1.5.1
2023-08-23 08:29:41 +02:00
dependabot[bot]
ea345c6464 Bump mypy from 1.5.0 to 1.5.1
Bumps [mypy](https://github.com/python/mypy) from 1.5.0 to 1.5.1.
- [Commits](https://github.com/python/mypy/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-21 14:35:52 +00:00
Bastian Venthur
31b2a6d592 Merge pull request #119 from venthur/dependabot/pip/mkdocs-material-9.1.21
Bump mkdocs-material from 9.1.18 to 9.1.21
2023-08-15 10:14:55 +02:00
dependabot[bot]
ad41be706d Bump mkdocs-material from 9.1.18 to 9.1.21
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.18 to 9.1.21.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.18...9.1.21)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-15 08:03:29 +00:00
Bastian Venthur
04b022276c Merge pull request #125 from venthur/dependabot/pip/pygments-2.16.1
Bump pygments from 2.15.1 to 2.16.1
2023-08-15 10:03:17 +02:00
Bastian Venthur
9c1f93d075 Merge pull request #124 from venthur/dependabot/pip/mkdocs-1.5.2
Bump mkdocs from 1.4.3 to 1.5.2
2023-08-15 10:03:06 +02:00
Bastian Venthur
0276f6b328 Merge pull request #123 from venthur/dependabot/pip/mypy-1.5.0
Bump mypy from 1.4.1 to 1.5.0
2023-08-15 10:02:51 +02:00
dependabot[bot]
a3637621d7 Bump pygments from 2.15.1 to 2.16.1
Bumps [pygments](https://github.com/pygments/pygments) from 2.15.1 to 2.16.1.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](https://github.com/pygments/pygments/compare/2.15.1...2.16.1)

---
updated-dependencies:
- dependency-name: pygments
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 14:49:37 +00:00
dependabot[bot]
392181e728 Bump mkdocs from 1.4.3 to 1.5.2
Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.4.3 to 1.5.2.
- [Release notes](https://github.com/mkdocs/mkdocs/releases)
- [Commits](https://github.com/mkdocs/mkdocs/compare/1.4.3...1.5.2)

---
updated-dependencies:
- dependency-name: mkdocs
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 14:49:30 +00:00
dependabot[bot]
b44c303d7a Bump mypy from 1.4.1 to 1.5.0
Bumps [mypy](https://github.com/python/mypy) from 1.4.1 to 1.5.0.
- [Commits](https://github.com/python/mypy/compare/v1.4.1...v1.5.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 14:49:26 +00:00
Bastian Venthur
90f8296a62 Merge pull request #122 from venthur/dependabot/pip/wheel-0.41.1
Bump wheel from 0.40.0 to 0.41.1
2023-08-09 10:31:46 +02:00
dependabot[bot]
298a828ecd Bump wheel from 0.40.0 to 0.41.1
Bumps [wheel](https://github.com/pypa/wheel) from 0.40.0 to 0.41.1.
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.40.0...0.41.1)

---
updated-dependencies:
- dependency-name: wheel
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 19:14:22 +00:00
Bastian Venthur
9acbc77fea Merge pull request #116 from venthur/dependabot/pip/types-markdown-3.4.2.10
Bump types-markdown from 3.4.2.9 to 3.4.2.10
2023-08-07 21:13:50 +02:00
Bastian Venthur
90437f05ab Merge pull request #121 from venthur/dependabot/pip/flake8-6.1.0
Bump flake8 from 6.0.0 to 6.1.0
2023-08-07 21:13:14 +02:00
Bastian Venthur
33ae0e4482 Merge pull request #120 from venthur/dependabot/pip/markdown-3.4.4
Bump markdown from 3.4.3 to 3.4.4
2023-08-07 21:12:24 +02:00
dependabot[bot]
37c5a4eca6 Bump flake8 from 6.0.0 to 6.1.0
Bumps [flake8](https://github.com/pycqa/flake8) from 6.0.0 to 6.1.0.
- [Commits](https://github.com/pycqa/flake8/compare/6.0.0...6.1.0)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 14:15:07 +00:00
dependabot[bot]
7b14d7dcbd Bump markdown from 3.4.3 to 3.4.4
Bumps [markdown](https://github.com/Python-Markdown/markdown) from 3.4.3 to 3.4.4.
- [Changelog](https://github.com/Python-Markdown/markdown/blob/master/docs/change_log/release-2.6.md)
- [Commits](https://github.com/Python-Markdown/markdown/compare/3.4.3...3.4.4)

---
updated-dependencies:
- dependency-name: markdown
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 14:14:54 +00:00
dependabot[bot]
35d5ab93cd Bump types-markdown from 3.4.2.9 to 3.4.2.10
Bumps [types-markdown](https://github.com/python/typeshed) from 3.4.2.9 to 3.4.2.10.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-markdown
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 14:18:37 +00:00
Bastian Venthur
8ba56b6b27 Merge pull request #115 from venthur/dependabot/pip/pytest-7.4.0
Bump pytest from 7.3.2 to 7.4.0
2023-07-20 08:17:01 +02:00
dependabot[bot]
df84fbb96a Bump pytest from 7.3.2 to 7.4.0
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.3.2 to 7.4.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.3.2...7.4.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 14:35:36 +00:00
Bastian Venthur
609b49b6f2 updated changelog 2023-07-13 14:01:02 +02:00
Bastian Venthur
34d33d380c Merge pull request #109 from venthur/dependabot/pip/mkdocstrings-python--0.22.0
Bump mkdocstrings[python] from 0.20.0 to 0.22.0
2023-07-13 13:12:40 +02:00
Bastian Venthur
c1b16e9a82 Merge pull request #110 from venthur/dependabot/pip/mypy-1.4.1
Bump mypy from 1.2.0 to 1.4.1
2023-07-13 13:12:27 +02:00
dependabot[bot]
db1d81713c Bump mkdocstrings[python] from 0.20.0 to 0.22.0
Bumps [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) from 0.20.0 to 0.22.0.
- [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
- [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.20.0...0.22.0)

---
updated-dependencies:
- dependency-name: mkdocstrings[python]
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 10:20:57 +00:00
Bastian Venthur
ee3d289ea0 Merge pull request #113 from venthur/dependabot/pip/mkdocs-material-9.1.18
Bump mkdocs-material from 9.1.15 to 9.1.18
2023-07-13 12:20:34 +02:00
dependabot[bot]
75b926de67 Bump mypy from 1.2.0 to 1.4.1
Bumps [mypy](https://github.com/python/mypy) from 1.2.0 to 1.4.1.
- [Commits](https://github.com/python/mypy/compare/v1.2.0...v1.4.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 10:20:22 +00:00
Bastian Venthur
0b7e898f3a Merge pull request #105 from venthur/dependabot/pip/feedgenerator-2.1.0
Bump feedgenerator from 2.0.0 to 2.1.0
2023-07-13 12:20:13 +02:00
Bastian Venthur
acce7d1c32 Merge pull request #107 from venthur/dependabot/pip/pytest-cov-4.1.0
Bump pytest-cov from 4.0.0 to 4.1.0
2023-07-13 12:19:21 +02:00
dependabot[bot]
e4786eca74 Bump mkdocs-material from 9.1.15 to 9.1.18
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.15 to 9.1.18.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.15...9.1.18)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 10:13:49 +00:00
Bastian Venthur
62f36cdd05 Merge pull request #114 from venthur/namespace_package
treat templates, static, and content as namespace packages
2023-07-13 12:10:51 +02:00
Bastian Venthur
111957883e updated changelog 2023-07-13 12:07:50 +02:00
Bastian Venthur
a1cfe01373 added MANIFEST.in 2023-07-13 10:21:54 +02:00
Bastian Venthur
3cfd756ac1 added data dirs to MANIFEST.in 2023-07-13 10:21:35 +02:00
Bastian Venthur
32fff6dabb treat templates, static, and content as namespace packages 2023-07-13 09:52:30 +02:00
Bastian Venthur
86826c0c03 list default template as package explicitily 2023-06-24 13:27:11 +02:00
Bastian Venthur
f646c89152 img's have max-width: 100% to avoid overflowing of big images 2023-06-24 13:25:17 +02:00
dependabot[bot]
1db80df0ce Bump pytest-cov from 4.0.0 to 4.1.0
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 4.0.0 to 4.1.0.
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: pytest-cov
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 14:57:56 +00:00
dependabot[bot]
2c15b2c2dd Bump feedgenerator from 2.0.0 to 2.1.0
Bumps [feedgenerator](https://github.com/getpelican/feedgenerator) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/getpelican/feedgenerator/releases)
- [Changelog](https://github.com/getpelican/feedgenerator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getpelican/feedgenerator/compare/2.0.0...2.1.0)

---
updated-dependencies:
- dependency-name: feedgenerator
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 14:57:50 +00:00
Bastian Venthur
44d5c4d694 corrected screenshot path 2023-06-17 15:29:46 +02:00
Bastian Venthur
1ebae15cda added screenshot 2023-06-17 15:24:00 +02:00
Bastian Venthur
9168720ede Merge branch 'master' into delete_extra_files 2022-08-07 21:12:35 +02:00
Bastian Venthur
94ad898a86 added logger messanges on deletion 2022-08-07 21:10:51 +02:00
Bastian Venthur
ff3f8101ad added test 2022-08-06 22:29:48 +02:00
Bastian Venthur
8c0e69b2f4 Delete files that should not be in dest-dir 2022-08-06 21:55:09 +02:00
28 changed files with 223 additions and 42 deletions

View File

@@ -1,2 +0,0 @@
[flake8]
exclude = venv,build,docs

View File

@@ -21,13 +21,14 @@ jobs:
- "3.9" - "3.9"
- "3.10" - "3.10"
- "3.11" - "3.11"
- "3.12"
exclude: exclude:
# 3.8 on windows fails due to some pip issue # 3.8 on windows fails due to some pip issue
- os: windows-latest - os: windows-latest
python-version: "3.8" python-version: "3.8"
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
@@ -41,7 +42,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: "3.x" python-version: "3.x"
@@ -55,7 +56,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: "3.x" python-version: "3.x"
@@ -70,7 +71,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: "3.x" python-version: "3.x"

View File

@@ -1,5 +1,29 @@
# Changelog # Changelog
## [2.2.1] -- 2023-11-11
* fixed `suggests` to blag-doc
## [2.2.0] -- 2023-11-05
* switched from flake8 to ruff
* added missing docstrings
* fixed dev requirements in pyproject, still pointing to sphinx
* added Python3.12 to test suite
* removed debian/watch
## [2.1.0] -- 2023-08-27
* default theme: `img` have now `max-width: 100%` by default to avoid very
large images overflowing
* packaging: explicitly list `templates`, `static` and `content` as packages
instead of relying on package-data for setuptools. additionally, created a
MANIFEST.in to add the contents of these directories here as well. the
automatic finding of namespace packages and packaga-data, currently does not
work as advertised in setuptools' docs
* updated dependencies
* created debian/watch
## [2.0.0] - 2023-06-16 ## [2.0.0] - 2023-06-16
### Breaking ### Breaking

3
MANIFEST.in Normal file
View File

@@ -0,0 +1,3 @@
recursive-include blag/content *
recursive-include blag/static *
recursive-include blag/templates *

View File

@@ -33,7 +33,7 @@ mypy: $(VENV)
.PHONY: lint .PHONY: lint
lint: $(VENV) lint: $(VENV)
$(BIN)/flake8 $(BIN)/ruff check .
.PHONY: build .PHONY: build
build: $(VENV) build: $(VENV)

View File

@@ -16,7 +16,8 @@ blag is named after [the blag of the webcomic xkcd][blagxkcd].
## Features ## Features
* Write content in [Markdown][] * Write content in [Markdown][]
* Good looking default theme * Good looking default theme:
![Blag Screenshot](blag/static/blag.png)
* Theming support using [Jinja2][] templates * Theming support using [Jinja2][] templates
* Generation of Atom feeds for blog content * Generation of Atom feeds for blog content
* Fenced code blocks and syntax highlighting using [Pygments][] * Fenced code blocks and syntax highlighting using [Pygments][]

View File

@@ -1,8 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""blag's core methods. """blag's core methods."""
"""
# remove when we don't support py38 anymore # remove when we don't support py38 anymore
from __future__ import annotations from __future__ import annotations
@@ -32,7 +30,7 @@ logging.basicConfig(
def main(arguments: list[str] | None = None) -> None: def main(arguments: list[str] | None = None) -> None:
"""Main entrypoint for the CLI. """Run the CLI.
This method parses the CLI arguments and executes the respective This method parses the CLI arguments and executes the respective
commands. commands.
@@ -220,6 +218,7 @@ def build(args: argparse.Namespace) -> None:
""" """
os.makedirs(f"{args.output_dir}", exist_ok=True) os.makedirs(f"{args.output_dir}", exist_ok=True)
convertibles = [] convertibles = []
known_targets = []
for root, dirnames, filenames in os.walk(args.input_dir): for root, dirnames, filenames in os.walk(args.input_dir):
for filename in filenames: for filename in filenames:
rel_src = os.path.relpath( rel_src = os.path.relpath(
@@ -231,15 +230,22 @@ def build(args: argparse.Namespace) -> None:
rel_dst = rel_src rel_dst = rel_src
rel_dst = rel_dst[:-3] + ".html" rel_dst = rel_dst[:-3] + ".html"
convertibles.append((rel_src, rel_dst)) convertibles.append((rel_src, rel_dst))
known_targets.append(
os.path.abspath(f"{args.output_dir}/{rel_dst}")
)
else: else:
shutil.copy( shutil.copy(
f"{args.input_dir}/{rel_src}", f"{args.input_dir}/{rel_src}",
f"{args.output_dir}/{rel_src}", f"{args.output_dir}/{rel_src}",
) )
known_targets.append(
os.path.abspath(f"{args.output_dir}/{rel_src}")
)
for dirname in dirnames: for dirname in dirnames:
# all directories are copied into the output directory # all directories are copied into the output directory
path = os.path.relpath(f"{root}/{dirname}", start=args.input_dir) path = os.path.relpath(f"{root}/{dirname}", start=args.input_dir)
os.makedirs(f"{args.output_dir}/{path}", exist_ok=True) os.makedirs(f"{args.output_dir}/{path}", exist_ok=True)
known_targets.append(os.path.abspath(f"{args.output_dir}/{path}"))
# copy static files over # copy static files over
logger.info("Copying static files.") logger.info("Copying static files.")
@@ -275,6 +281,24 @@ def build(args: argparse.Namespace) -> None:
article_template, article_template,
) )
# clean up files that should not be there
for root, dirnames, filenames in os.walk(args.output_dir):
for filename in filenames:
dst = os.path.abspath(f"{root}/{filename}")
if dst not in known_targets:
logger.info(f"deleting {dst}")
os.remove(dst)
else:
known_targets.remove(dst)
for dirname in dirnames:
dst = os.path.abspath(f"{root}/{dirname}")
if dst not in known_targets:
logger.info(f"deleting {dst}")
shutil.rmtree(dst)
else:
known_targets.remove(dst)
logger.debug(known_targets)
generate_feed( generate_feed(
articles, articles,
args.output_dir, args.output_dir,
@@ -328,7 +352,7 @@ def process_markdown(
for src, dst in convertibles: for src, dst in convertibles:
logger.debug(f"Processing {src}") logger.debug(f"Processing {src}")
with open(f"{input_dir}/{src}", "r") as fh: with open(f"{input_dir}/{src}") as fh:
body = fh.read() body = fh.read()
content, meta = convert_markdown(md, body) content, meta = convert_markdown(md, body)

View File

@@ -7,3 +7,5 @@ Tags: blag
## Second Post ## Second Post
This page serves no purpose :) This page serves no purpose :)
![Blag Screenshot](blag.png)

View File

@@ -94,9 +94,10 @@ def convert_markdown(
class MarkdownLinkTreeprocessor(Treeprocessor): class MarkdownLinkTreeprocessor(Treeprocessor):
"""Converts relative links to .md files to .html""" """Converts relative links to .md files to .html."""
def run(self, root: Element) -> Element: def run(self, root: Element) -> Element:
"""Process the ElementTree."""
for element in root.iter(): for element in root.iter():
if element.tag == "a": if element.tag == "a":
url = element.get("href") url = element.get("href")
@@ -109,6 +110,7 @@ class MarkdownLinkTreeprocessor(Treeprocessor):
return root return root
def convert(self, url: str) -> str: def convert(self, url: str) -> str:
"""Convert relative .md-links to .html-links."""
scheme, netloc, path, query, fragment = urlsplit(url) scheme, netloc, path, query, fragment = urlsplit(url)
logger.debug( logger.debug(
f"{url}: {scheme=} {netloc=} {path=} {query=} {fragment=}" f"{url}: {scheme=} {netloc=} {path=} {query=} {fragment=}"
@@ -126,6 +128,7 @@ class MarkdownLinkExtension(Extension):
"""markdown.extension that converts relative .md- to .html-links.""" """markdown.extension that converts relative .md- to .html-links."""
def extendMarkdown(self, md: Markdown) -> None: def extendMarkdown(self, md: Markdown) -> None:
"""Register the MarkdownLinkTreeprocessor."""
md.treeprocessors.register( md.treeprocessors.register(
MarkdownLinkTreeprocessor(md), MarkdownLinkTreeprocessor(md),
"mdlink", "mdlink",

View File

@@ -1,6 +1,4 @@
"""Helper methods for blag's quickstart command. """Helper methods for blag's quickstart command."""
"""
# remove when we don't support py38 anymore # remove when we don't support py38 anymore
from __future__ import annotations from __future__ import annotations

BIN
blag/static/blag.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

View File

@@ -48,6 +48,10 @@ aside {
color: var(--foreground-dim); color: var(--foreground-dim);
} }
img {
max-width: 100%;
}
h1, h1,
h2, h2,
h3, h3,

View File

@@ -1 +1,3 @@
__VERSION__ = "2.0.0" """Version information for the blag package."""
__VERSION__ = "2.2.1"

30
debian/changelog vendored
View File

@@ -1,3 +1,33 @@
blag (2.2.1) unstable; urgency=medium
* fixed suggests field to blag-doc (Closes: #1055769)
-- Bastian Venthur <venthur@debian.org> Sat, 11 Nov 2023 10:57:06 +0100
blag (2.2.0) unstable; urgency=medium
* switched from flake8 to ruff
* added missing docstrings
* fixed dev requirements in pyproject, still pointing to sphinx
* added Python3.12 to test suite
* removed watch file again
-- Bastian Venthur <venthur@debian.org> Sun, 05 Nov 2023 17:08:09 +0100
blag (2.1.0) unstable; urgency=medium
* default theme: `img` have now `max-width: 100%` by default to avoid very
large images overflowing
* packaging: explicitly list `templates`, `static` and `content` as packages
instead of relying on package-data for setuptools. additionally, created a
MANIFEST.in to add the contents of these directories here as well. the
automatic finding of namespace packages and packaga-data, currently does
not work as advertised in setuptools' docs
* updated dependencies
* created debian/watch
-- Bastian Venthur <venthur@debian.org> Sun, 27 Aug 2023 15:27:39 +0200
blag (2.0.0) unstable; urgency=medium blag (2.0.0) unstable; urgency=medium
* new upstream version * new upstream version

2
debian/control vendored
View File

@@ -31,7 +31,7 @@ Depends:
${python3:Depends}, ${python3:Depends},
${misc:Depends}, ${misc:Depends},
Suggests: Suggests:
python-blag-doc, blag-doc,
Description: Blog-aware, static site generator Description: Blog-aware, static site generator
Blag is a blog-aware, static site generator, written in Python. It supports Blag is a blog-aware, static site generator, written in Python. It supports
the following features: the following features:

BIN
docs/blag.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

View File

@@ -17,6 +17,7 @@ blag is named after [the blag of the webcomic xkcd][blagxkcd].
* Write content in [Markdown][] * Write content in [Markdown][]
* Good looking default theme * Good looking default theme
![Blag Screenshot](blag.png)
* Theming support using [Jinja2][] templates * Theming support using [Jinja2][] templates
* Generation of Atom feeds for blog content * Generation of Atom feeds for blog content
* Fenced code blocks and syntax highlighting using [Pygments][] * Fenced code blocks and syntax highlighting using [Pygments][]

View File

@@ -31,12 +31,14 @@ blag = "blag.blag:main"
[project.optional-dependencies] [project.optional-dependencies]
dev = [ dev = [
"build", "build",
"sphinx", "mkdocs",
"mkdocs-material",
"mkdocstrings[python]",
"twine", "twine",
"wheel", "wheel",
"pytest", "pytest",
"pytest-cov", "pytest-cov",
"flake8", "ruff",
"mypy", "mypy",
"types-markdown", "types-markdown",
] ]
@@ -47,16 +49,12 @@ version = {attr = "blag.__VERSION__" }
[tool.setuptools] [tool.setuptools]
packages = [ packages = [
"blag", "blag",
"blag.templates",
"blag.static",
"blag.content",
"tests", "tests",
] ]
[tool.setuptools.package-data]
blag = [
"templates/*",
"static/*",
"content/*",
]
[tool.pytest.ini_options] [tool.pytest.ini_options]
addopts = """ addopts = """
--cov=blag --cov=blag
@@ -65,6 +63,21 @@ addopts = """
--cov-report=term-missing:skip-covered --cov-report=term-missing:skip-covered
""" """
[tool.ruff]
select = [
"F", # pyflakes
"E", "W", # pycodestyle
"C90", # mccabe
"I", # isort
"D", # pydocstyle
"UP" # pyupgrade
]
line-length = 79
target-version = "py38"
[tool.ruff.pydocstyle]
convention = "numpy"
[tool.mypy] [tool.mypy]
files = "blag,tests" files = "blag,tests"
strict = true strict = true

View File

@@ -1,11 +1,11 @@
build==0.10.0 build==1.0.3
mkdocs==1.4.3 mkdocs==1.5.3
mkdocs-material==9.1.15 mkdocs-material==9.4.8
mkdocstrings[python]==0.20.0 mkdocstrings[python]==0.23.0
twine==4.0.2 twine==4.0.2
wheel==0.40.0 wheel==0.41.3
pytest==7.3.2 pytest==7.4.3
pytest-cov==4.0.0 pytest-cov==4.1.0
flake8==6.0.0 ruff==0.1.5
mypy==1.2.0 mypy==1.6.1
types-markdown==3.4.2.9 types-markdown==3.5.0.1

View File

@@ -1,4 +1,4 @@
markdown==3.4.3 markdown==3.5.1
feedgenerator==2.0.0 feedgenerator==2.1.0
jinja2==3.1.2 jinja2==3.1.2
pygments==2.15.1 pygments==2.16.1

View File

@@ -0,0 +1 @@
"""Tests for blag."""

View File

@@ -1,3 +1,6 @@
"""Pytest fixtures."""
# remove when we don't support py38 anymore # remove when we don't support py38 anymore
from __future__ import annotations from __future__ import annotations
@@ -14,6 +17,7 @@ from blag import blag, quickstart
@pytest.fixture @pytest.fixture
def environment(cleandir: str) -> Iterator[Environment]: def environment(cleandir: str) -> Iterator[Environment]:
"""Create a Jinja2 environment."""
site = { site = {
"base_url": "site base_url", "base_url": "site base_url",
"title": "site title", "title": "site title",
@@ -26,31 +30,37 @@ def environment(cleandir: str) -> Iterator[Environment]:
@pytest.fixture @pytest.fixture
def page_template(environment: Environment) -> Iterator[Template]: def page_template(environment: Environment) -> Iterator[Template]:
"""Create a Jinja2 page-template."""
yield environment.get_template("page.html") yield environment.get_template("page.html")
@pytest.fixture @pytest.fixture
def article_template(environment: Environment) -> Iterator[Template]: def article_template(environment: Environment) -> Iterator[Template]:
"""Create a Jinja2 article-template."""
yield environment.get_template("article.html") yield environment.get_template("article.html")
@pytest.fixture @pytest.fixture
def index_template(environment: Environment) -> Iterator[Template]: def index_template(environment: Environment) -> Iterator[Template]:
"""Create a Jinja2 index-template."""
yield environment.get_template("index.html") yield environment.get_template("index.html")
@pytest.fixture @pytest.fixture
def archive_template(environment: Environment) -> Iterator[Template]: def archive_template(environment: Environment) -> Iterator[Template]:
"""Create a Jinja2 archive-template."""
yield environment.get_template("archive.html") yield environment.get_template("archive.html")
@pytest.fixture @pytest.fixture
def tags_template(environment: Environment) -> Iterator[Template]: def tags_template(environment: Environment) -> Iterator[Template]:
"""Create a Jinja2 tags-template."""
yield environment.get_template("tags.html") yield environment.get_template("tags.html")
@pytest.fixture @pytest.fixture
def tag_template(environment: Environment) -> Iterator[Template]: def tag_template(environment: Environment) -> Iterator[Template]:
"""Create a Jinja2 tag-template."""
yield environment.get_template("tag.html") yield environment.get_template("tag.html")
@@ -80,6 +90,7 @@ author = a. u. thor
@pytest.fixture @pytest.fixture
def args(cleandir: Callable[[], Iterator[str]]) -> Iterator[Namespace]: def args(cleandir: Callable[[], Iterator[str]]) -> Iterator[Namespace]:
"""Create a Namespace with default arguments."""
args = Namespace( args = Namespace(
input_dir="content", input_dir="content",
output_dir="build", output_dir="build",

View File

@@ -1,3 +1,6 @@
"""Test blag."""
# remove when we don't support py38 anymore # remove when we don't support py38 anymore
from __future__ import annotations from __future__ import annotations
@@ -15,12 +18,14 @@ from blag import __VERSION__, blag
def test_generate_feed(cleandir: str) -> None: def test_generate_feed(cleandir: str) -> None:
"""Test generate_feed."""
articles: list[tuple[str, dict[str, Any]]] = [] articles: list[tuple[str, dict[str, Any]]] = []
blag.generate_feed(articles, "build", " ", " ", " ", " ") blag.generate_feed(articles, "build", " ", " ", " ", " ")
assert os.path.exists("build/atom.xml") assert os.path.exists("build/atom.xml")
def test_feed(cleandir: str) -> None: def test_feed(cleandir: str) -> None:
"""Test feed."""
articles: list[tuple[str, dict[str, Any]]] = [ articles: list[tuple[str, dict[str, Any]]] = [
( (
"dest1.html", "dest1.html",
@@ -73,6 +78,7 @@ def test_feed(cleandir: str) -> None:
def test_generate_feed_with_description(cleandir: str) -> None: def test_generate_feed_with_description(cleandir: str) -> None:
"""Test generate_feed with description."""
# if a description is provided, it will be used as the summary in # if a description is provided, it will be used as the summary in
# the feed, otherwise we simply use the title of the article # the feed, otherwise we simply use the title of the article
articles: list[tuple[str, dict[str, Any]]] = [ articles: list[tuple[str, dict[str, Any]]] = [
@@ -98,6 +104,7 @@ def test_generate_feed_with_description(cleandir: str) -> None:
def test_parse_args_build() -> None: def test_parse_args_build() -> None:
"""Test parse_args with build."""
# test default args # test default args
args = blag.parse_args(["build"]) args = blag.parse_args(["build"])
assert args.input_dir == "content" assert args.input_dir == "content"
@@ -131,6 +138,7 @@ def test_parse_args_build() -> None:
def test_get_config() -> None: def test_get_config() -> None:
"""Test get_config."""
config = """ config = """
[main] [main]
base_url = https://example.com/ base_url = https://example.com/
@@ -180,6 +188,7 @@ author = a. u. thor
def test_environment_factory(cleandir: str) -> None: def test_environment_factory(cleandir: str) -> None:
"""Test environment_factory."""
globals_: dict[str, object] = {"foo": "bar", "test": "me"} globals_: dict[str, object] = {"foo": "bar", "test": "me"}
env = blag.environment_factory("templates", globals_=globals_) env = blag.environment_factory("templates", globals_=globals_)
assert env.globals["foo"] == "bar" assert env.globals["foo"] == "bar"
@@ -191,6 +200,7 @@ def test_process_markdown(
page_template: Template, page_template: Template,
article_template: Template, article_template: Template,
) -> None: ) -> None:
"""Test process_markdown."""
page1 = """\ page1 = """\
title: some page title: some page
@@ -240,6 +250,7 @@ foo bar
def test_build(args: Namespace) -> None: def test_build(args: Namespace) -> None:
"""Test build."""
page1 = """\ page1 = """\
title: some page title: some page
@@ -301,6 +312,22 @@ foo bar
assert os.path.exists(f"{args.output_dir}/tags/bar.html") assert os.path.exists(f"{args.output_dir}/tags/bar.html")
def test_remove_extra_files(args):
"""Test that extra files are removed."""
# create a file and directory in output dir that have no corresponding
# source
file_path = f'{args.output_dir}/a'
dir_path = f'{args.output_dir}/b'
fh = open(file_path, 'w')
fh.close()
os.mkdir(dir_path)
blag.build(args)
assert not os.path.exists(file_path)
assert not os.path.exists(dir_path)
@pytest.mark.parametrize( @pytest.mark.parametrize(
"template", "template",
[ [
@@ -313,16 +340,19 @@ foo bar
], ],
) )
def test_missing_template_raises(template: str, args: Namespace) -> None: def test_missing_template_raises(template: str, args: Namespace) -> None:
"""Test that missing templates raise SystemExit."""
os.remove(f"templates/{template}") os.remove(f"templates/{template}")
with pytest.raises(SystemExit): with pytest.raises(SystemExit):
blag.build(args) blag.build(args)
def test_main(cleandir: str) -> None: def test_main(cleandir: str) -> None:
"""Test main."""
blag.main(["build"]) blag.main(["build"])
def test_cli_version(capsys: CaptureFixture[str]) -> None: def test_cli_version(capsys: CaptureFixture[str]) -> None:
"""Test --version."""
with pytest.raises(SystemExit) as ex: with pytest.raises(SystemExit) as ex:
blag.main(["--version"]) blag.main(["--version"])
# normal system exit # normal system exit
@@ -333,6 +363,7 @@ def test_cli_version(capsys: CaptureFixture[str]) -> None:
def test_cli_verbose(cleandir: str, caplog: LogCaptureFixture) -> None: def test_cli_verbose(cleandir: str, caplog: LogCaptureFixture) -> None:
"""Test --verbose."""
blag.main(["build"]) blag.main(["build"])
assert "DEBUG" not in caplog.text assert "DEBUG" not in caplog.text

View File

@@ -1,3 +1,6 @@
"""Tests for the devserver module."""
# remove when we don't support py38 anymore # remove when we don't support py38 anymore
from __future__ import annotations from __future__ import annotations
@@ -11,6 +14,7 @@ from blag import devserver
def test_get_last_modified(cleandir: str) -> None: def test_get_last_modified(cleandir: str) -> None:
"""Test get_last_modified."""
# take initial time # take initial time
t1 = devserver.get_last_modified(["content"]) t1 = devserver.get_last_modified(["content"])
@@ -29,6 +33,7 @@ def test_get_last_modified(cleandir: str) -> None:
def test_autoreload_builds_immediately(args: Namespace) -> None: def test_autoreload_builds_immediately(args: Namespace) -> None:
"""Test autoreload builds immediately."""
# create a dummy file that can be build # create a dummy file that can be build
with open("content/test.md", "w") as fh: with open("content/test.md", "w") as fh:
fh.write("boo") fh.write("boo")
@@ -54,6 +59,7 @@ def test_autoreload_builds_immediately(args: Namespace) -> None:
"ignore::pytest.PytestUnhandledThreadExceptionWarning" "ignore::pytest.PytestUnhandledThreadExceptionWarning"
) )
def test_autoreload(args: Namespace) -> None: def test_autoreload(args: Namespace) -> None:
"""Test autoreload."""
t = threading.Thread( t = threading.Thread(
target=devserver.autoreload, target=devserver.autoreload,
args=(args,), args=(args,),

View File

@@ -1,3 +1,6 @@
"""Test markdown module."""
# remove when we don't support py38 anymore # remove when we don't support py38 anymore
from __future__ import annotations from __future__ import annotations
@@ -34,6 +37,7 @@ from blag.markdown import convert_markdown, markdown_factory
], ],
) )
def test_convert_markdown_links(input_: str, expected: str) -> None: def test_convert_markdown_links(input_: str, expected: str) -> None:
"""Test convert_markdown."""
md = markdown_factory() md = markdown_factory()
html, _ = convert_markdown(md, input_) html, _ = convert_markdown(md, input_)
assert expected in html assert expected in html
@@ -51,6 +55,7 @@ def test_convert_markdown_links(input_: str, expected: str) -> None:
], ],
) )
def test_dont_convert_normal_links(input_: str, expected: str) -> None: def test_dont_convert_normal_links(input_: str, expected: str) -> None:
"""Test convert_markdown doesn't convert normal links."""
md = markdown_factory() md = markdown_factory()
html, _ = convert_markdown(md, input_) html, _ = convert_markdown(md, input_)
assert expected in html assert expected in html
@@ -70,17 +75,20 @@ def test_dont_convert_normal_links(input_: str, expected: str) -> None:
], ],
) )
def test_convert_metadata(input_: str, expected: dict[str, Any]) -> None: def test_convert_metadata(input_: str, expected: dict[str, Any]) -> None:
"""Test convert_markdown converts metadata correctly."""
md = markdown_factory() md = markdown_factory()
_, meta = convert_markdown(md, input_) _, meta = convert_markdown(md, input_)
assert expected == meta assert expected == meta
def test_markdown_factory() -> None: def test_markdown_factory() -> None:
"""Test markdown_factory."""
md = markdown_factory() md = markdown_factory()
assert isinstance(md, markdown.Markdown) assert isinstance(md, markdown.Markdown)
def test_smarty() -> None: def test_smarty() -> None:
"""Test smarty."""
md = markdown_factory() md = markdown_factory()
md1 = """ md1 = """
@@ -95,6 +103,7 @@ this --- is -- a test ...
def test_smarty_code() -> None: def test_smarty_code() -> None:
"""Test smarty doesn't touch code."""
md = markdown_factory() md = markdown_factory()
md1 = """ md1 = """

View File

@@ -1,3 +1,6 @@
"""Tests for the quickstart module."""
# remove when we don't support py38 anymore # remove when we don't support py38 anymore
from __future__ import annotations from __future__ import annotations
@@ -9,21 +12,24 @@ from blag.quickstart import get_input, quickstart
def test_get_input_default_answer(monkeypatch: MonkeyPatch) -> None: def test_get_input_default_answer(monkeypatch: MonkeyPatch) -> None:
"""Test get_input with default answer."""
monkeypatch.setattr("builtins.input", lambda x: "") monkeypatch.setattr("builtins.input", lambda x: "")
answer = get_input("foo", "bar") answer = get_input("foo", "bar")
assert answer == "bar" assert answer == "bar"
def test_get_input(monkeypatch: MonkeyPatch) -> None: def test_get_input(monkeypatch: MonkeyPatch) -> None:
"""Test get_input."""
monkeypatch.setattr("builtins.input", lambda x: "baz") monkeypatch.setattr("builtins.input", lambda x: "baz")
answer = get_input("foo", "bar") answer = get_input("foo", "bar")
assert answer == "baz" assert answer == "baz"
def test_quickstart(cleandir: str, monkeypatch: MonkeyPatch) -> None: def test_quickstart(cleandir: str, monkeypatch: MonkeyPatch) -> None:
"""Test quickstart."""
monkeypatch.setattr("builtins.input", lambda x: "foo") monkeypatch.setattr("builtins.input", lambda x: "foo")
quickstart(None) quickstart(None)
with open("config.ini", "r") as fh: with open("config.ini") as fh:
data = fh.read() data = fh.read()
assert "base_url = foo" in data assert "base_url = foo" in data
assert "title = foo" in data assert "title = foo" in data

View File

@@ -1,3 +1,6 @@
"""Test the templates."""
# remove when we don't support py38 anymore # remove when we don't support py38 anymore
from __future__ import annotations from __future__ import annotations
@@ -7,6 +10,7 @@ from jinja2 import Template
def test_page(page_template: Template) -> None: def test_page(page_template: Template) -> None:
"""Test the page template."""
ctx = { ctx = {
"content": "this is the content", "content": "this is the content",
"title": "this is the title", "title": "this is the title",
@@ -17,6 +21,7 @@ def test_page(page_template: Template) -> None:
def test_article(article_template: Template) -> None: def test_article(article_template: Template) -> None:
"""Test the article template."""
ctx = { ctx = {
"content": "this is the content", "content": "this is the content",
"title": "this is the title", "title": "this is the title",
@@ -29,6 +34,7 @@ def test_article(article_template: Template) -> None:
def test_index(index_template: Template) -> None: def test_index(index_template: Template) -> None:
"""Test the index template."""
entry = { entry = {
"title": "this is a title", "title": "this is a title",
"dst": "https://example.com/link", "dst": "https://example.com/link",
@@ -49,6 +55,7 @@ def test_index(index_template: Template) -> None:
def test_archive(archive_template: Template) -> None: def test_archive(archive_template: Template) -> None:
"""Test the archive template."""
entry = { entry = {
"title": "this is a title", "title": "this is a title",
"dst": "https://example.com/link", "dst": "https://example.com/link",
@@ -67,6 +74,7 @@ def test_archive(archive_template: Template) -> None:
def test_tags(tags_template: Template) -> None: def test_tags(tags_template: Template) -> None:
"""Test the tags template."""
tags = [("foo", 42)] tags = [("foo", 42)]
ctx = { ctx = {
"tags": tags, "tags": tags,
@@ -80,6 +88,7 @@ def test_tags(tags_template: Template) -> None:
def test_tag(tag_template: Template) -> None: def test_tag(tag_template: Template) -> None:
"""Test the tag template."""
entry = { entry = {
"title": "this is a title", "title": "this is a title",
"dst": "https://example.com/link", "dst": "https://example.com/link",

View File

@@ -1,3 +1,6 @@
"""Test the version module."""
# remove when we don't support py38 anymore # remove when we don't support py38 anymore
from __future__ import annotations from __future__ import annotations
@@ -5,4 +8,5 @@ import blag
def test_version() -> None: def test_version() -> None:
"""Test the version of the package."""
assert isinstance(blag.__VERSION__, str) assert isinstance(blag.__VERSION__, str)