Skip to content

Commit

Permalink
chore(ci): fancy README and better bump config (#425)
Browse files Browse the repository at this point in the history
* chore(ci): fancy README and better bump config

* fix(ci): CITATION.cff

* chore(docs): add changelog entry
  • Loading branch information
jeertmans authored May 3, 2024
1 parent 6d85222 commit 9f2e475
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 203 deletions.
16 changes: 0 additions & 16 deletions .bumpversion.cfg

This file was deleted.

7 changes: 1 addition & 6 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@ sphinx:
fail_on_warning: true
python:
install:
- method: pip
path: .
extra_requirements:
- docs
- magic
- sphinx-directive
- requirements: requirements-dev.lock
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
(unreleased)=
## [Unreleased](https://github.com/jeertmans/manim-slides/compare/v5.1.6...HEAD)

(unreleased-chore)=
### Chore

- Improved the CI for bumping the version and README rendering on PyPI.
[#425](https://github.com/jeertmans/manim-slides/pull/425)

(v5.1.6)=
## [v5.1.6](https://github.com/jeertmans/manim-slides/compare/v5.1.5...v5.1.6)

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<img alt="Manim Slides Logo" src="https://raw.githubusercontent.com/jeertmans/manim-slides/main/static/logo.png">
</picture>

<!-- start pypi -->

[![Latest Release][pypi-version-badge]][pypi-version-url]
[![Python version][pypi-python-version-badge]][pypi-version-url]
[![PyPI - Downloads][pypi-download-badge]][pypi-version-url]
Expand Down
104 changes: 86 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
requires = ["hatchling", "hatch-fancy-pypi-readme"]

[project]
authors = [{name = "Jérome Eertmans", email = "[email protected]"}]
Expand Down Expand Up @@ -34,26 +34,13 @@ dependencies = [
"tqdm>=4.64.1",
]
description = "Tool for live presentations using manim"
dynamic = ["version"]
dynamic = ["readme", "version"]
keywords = ["manim", "slides", "plugin", "manimgl"]
license = {text = "MIT"}
license = "MIT"
name = "manim-slides"
readme = "README.md"
requires-python = ">=3.9"

[project.optional-dependencies]
docs = [
"manim-slides[magic,sphinx-directive]",
"furo>=2023.5.20",
"ipykernel>=6.25.1",
"myst-parser>=2.0.0",
"nbsphinx>=0.9.2",
"pandoc>=2.3",
"sphinx>=7.0.1",
"sphinx-click>=4.4.0",
"sphinx-copybutton>=0.5.1",
"sphinxext-opengraph>=0.7.5",
]
full = [
"manim-slides[magic,manim,sphinx-directive]",
]
Expand All @@ -79,6 +66,56 @@ Founding = "https://github.com/sponsors/jeertmans"
Homepage = "https://github.com/jeertmans/manim-slides"
Repository = "https://github.com/jeertmans/manim-slides"

[tool.bumpversion]
allow_dirty = false
commit = true
commit_args = ""
current_version = "5.1.6"
ignore_missing_version = false
message = "chore(deps): bump version from {current_version} to {new_version}"
parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-rc(?P<release>\d+))?'
regex = false
replace = "{new_version}"
search = "{current_version}"
serialize = ["{major}.{minor}.{patch}-rc{release}", "{major}.{minor}.{patch}"]
sign_tags = false
tag = false
tag_message = "Bump version: {current_version} → {new_version}"
tag_name = "v{new_version}"

[[tool.bumpversion.files]]
filename = "manim_slides/__version__.py"
replace = '__version__ = "{new_version}"'
search = '__version__ = "{current_version}"'

[[tool.bumpversion.files]]
filename = "CITATION.cff"
replace = "version: v{new_version}"
search = "version: v{current_version}"

[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
replace = "v{new_version}"
search = "Unreleased"

[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
replace = "v{new_version}"
search = "unreleased"

[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
replace = "v{current_version}...v{new_version}"
search = "v{current_version}...HEAD"

[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
replace = '''<!-- start changelog -->
(unreleased)=
## [Unreleased](https://github.com/jeertmans/manim-slides/compare/{new_version}...HEAD)'''
search = "<!-- start changelog -->"

[tool.codespell]
builtin = "clear,rare,informal,usage,names,en-GB_to_en-US"
check-hidden = true
Expand All @@ -94,6 +131,25 @@ exclude_lines = [
]
precision = 2

[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = """<p align="center">
<a href="https://www.github.com/jeertmans/manin-slides">
<img src="https://raw.githubusercontent.com/jeertmans/manim-slides/main/static/logo.png"/>
</a>
</p>
"""

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.md"
start-after = "<!-- start pypi -->"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
pattern = '> \[!([A-Z]+)\]'
replacement = '> **\1:**'

[tool.hatch.version]
path = "manim_slides/__version__.py"

Expand Down Expand Up @@ -138,9 +194,21 @@ isort = {known-first-party = ["manim_slides", "tests"]}

[tool.rye]
dev-dependencies = [
"bump2version>=1.0.1",
"manim-slides[manim,manimgl,pyqt6]",
"manim-slides[magic,manim,manimgl,pyqt6,sphinx-directive]",
# dev
"bump-my-version>=0.20.3",
"pre-commit>=3.5.0",
# docs
"furo>=2023.5.20",
"ipykernel>=6.25.1",
"myst-parser>=2.0.0",
"nbsphinx>=0.9.2",
"pandoc>=2.3",
"sphinx>=7.0.1",
"sphinx-click>=4.4.0",
"sphinx-copybutton>=0.5.1",
"sphinxext-opengraph>=0.7.5",
# tests
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"pytest-env>=0.8.2",
Expand Down
33 changes: 23 additions & 10 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,22 @@ beautifulsoup4==4.12.3
# via nbconvert
bleach==6.1.0
# via nbconvert
bump2version==1.0.1
bracex==2.4
# via wcmatch
bump-my-version==0.21.0
certifi==2024.2.2
# via requests
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via bump-my-version
# via click-default-group
# via cloup
# via manim
# via manim-slides
# via rich-click
# via sphinx-click
click-default-group==1.2.4
# via manim
Expand Down Expand Up @@ -81,7 +85,6 @@ filelock==3.13.4
fonttools==4.51.0
# via matplotlib
furo==2024.1.29
# via manim-slides
glcontext==2.5.0
# via moderngl
identify==2.5.35
Expand All @@ -93,7 +96,6 @@ imagesize==1.4.1
iniconfig==2.0.0
# via pytest
ipykernel==6.29.4
# via manim-slides
ipython==8.18.1
# via ipykernel
# via manim-slides
Expand Down Expand Up @@ -169,7 +171,6 @@ mpmath==1.3.0
multipledispatch==1.0.0
# via pyrr
myst-parser==2.0.0
# via manim-slides
nbclient==0.10.0
# via nbconvert
nbconvert==7.16.3
Expand All @@ -179,7 +180,6 @@ nbformat==5.10.4
# via nbconvert
# via nbsphinx
nbsphinx==0.9.3
# via manim-slides
nest-asyncio==1.6.0
# via ipykernel
networkx==2.8.8
Expand All @@ -205,7 +205,6 @@ packaging==24.0
# via qtpy
# via sphinx
pandoc==2.3
# via manim-slides
pandocfilters==1.5.1
# via nbconvert
parso==0.8.4
Expand All @@ -232,6 +231,7 @@ ply==3.11
pre-commit==3.7.0
prompt-toolkit==3.0.43
# via ipython
# via questionary
psutil==5.9.8
# via ipykernel
ptyprocess==0.7.0
Expand All @@ -241,12 +241,16 @@ pure-eval==0.2.2
pycairo==1.26.0
# via manim
pydantic==2.7.0
# via bump-my-version
# via manim-slides
# via pydantic-extra-types
# via pydantic-settings
pydantic-core==2.18.1
# via pydantic
pydantic-extra-types==2.6.0
# via manim-slides
pydantic-settings==2.2.1
# via bump-my-version
pydub==0.25.1
# via manim
# via manimgl
Expand Down Expand Up @@ -291,6 +295,8 @@ pytest-xdist==3.5.0
python-dateutil==2.9.0.post0
# via jupyter-client
# via matplotlib
python-dotenv==1.0.1
# via pydantic-settings
python-pptx==0.6.23
# via manim-slides
pyyaml==6.0.1
Expand All @@ -302,6 +308,8 @@ pyzmq==26.0.0
# via jupyter-client
qtpy==2.4.1
# via manim-slides
questionary==1.10.0
# via bump-my-version
referencing==0.34.0
# via jsonschema
# via jsonschema-specifications
Expand All @@ -310,9 +318,13 @@ requests==2.31.0
# via manim-slides
# via sphinx
rich==13.7.1
# via bump-my-version
# via manim
# via manim-slides
# via manimgl
# via rich-click
rich-click==1.8.0
# via bump-my-version
rpds-py==0.18.0
# via jsonschema
# via referencing
Expand Down Expand Up @@ -343,7 +355,6 @@ soupsieve==2.5
# via beautifulsoup4
sphinx==7.3.6
# via furo
# via manim-slides
# via myst-parser
# via nbsphinx
# via sphinx-basic-ng
Expand All @@ -353,9 +364,7 @@ sphinx==7.3.6
sphinx-basic-ng==1.0.0b2
# via furo
sphinx-click==5.1.0
# via manim-slides
sphinx-copybutton==0.5.2
# via manim-slides
sphinxcontrib-applehelp==1.0.8
# via sphinx
sphinxcontrib-devhelp==1.0.6
Expand All @@ -369,7 +378,6 @@ sphinxcontrib-qthelp==1.0.7
sphinxcontrib-serializinghtml==1.1.10
# via sphinx
sphinxext-opengraph==0.9.1
# via manim-slides
srt==3.5.3
# via manim
stack-data==0.6.3
Expand All @@ -381,6 +389,8 @@ sympy==1.12
# via manimgl
tinycss2==1.2.1
# via nbconvert
tomlkit==0.12.4
# via bump-my-version
tornado==6.4
# via ipykernel
# via jupyter-client
Expand All @@ -402,6 +412,7 @@ traitlets==5.14.2
typing-extensions==4.11.0
# via pydantic
# via pydantic-core
# via rich-click
urllib3==2.2.1
# via requests
validators==0.28.0
Expand All @@ -410,6 +421,8 @@ virtualenv==20.25.3
# via pre-commit
watchdog==2.3.1
# via manim
wcmatch==8.5.1
# via bump-my-version
wcwidth==0.2.13
# via prompt-toolkit
webencodings==0.5.1
Expand Down
Loading

0 comments on commit 9f2e475

Please sign in to comment.