Skip to content

Commit d18fc47

Browse files
committed
Merge branch 'main' into prompt-toolkit
2 parents 9f88697 + be4a177 commit d18fc47

File tree

7 files changed

+38
-37
lines changed

7 files changed

+38
-37
lines changed

.github/CONTRIBUTING.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,17 @@ for a list of dependencies needed for building `cmd2`.
9191
See the `dev` list under the `[dependency-groups]` heading in [pyproject.toml](../pyproject.toml)
9292
for a list of dependencies needed for building `cmd2`.
9393

94-
| Prerequisite | Minimum Version | Purpose |
95-
| -------------------------------------------------------------------- | --------------- | -------------------------------- |
96-
| [codecov](http://doc.pytest.org/en/latest/) | `2.1.13` | Cover coverage reporting |
97-
| [mypy](https://mypy-lang.org/) | `1.13.0` | Static type checker |
98-
| [pytest](https://docs.pytest.org/en/stable/) | `3.0.6` | Unit and integration tests |
99-
| [pytest-cov](http://doc.pytest.org/en/latest/) | `6.0.0` | Pytest code coverage |
100-
| [pytest-mock](https://pypi.org/project/pytest-mock/) | `3.14.0` | Pytest mocker fixture |
101-
| [mkdocs-macros-plugin](https://mkdocs-macros-plugin.readthedocs.io/) | `1.3.7` | MkDocs Plugin for macros |
102-
| [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) | `9.5.49` | Documentation |
103-
| [mkdocstrings[python]](https://mkdocstrings.github.io/) | `0.27.0` | MkDocs Plugin for Python AutoDoc |
104-
| [ruff](https://github.com/astral-sh/ruff) | `0.7.3` | Fast linter and formatter |
105-
| [uv](https://github.com/astral-sh/uv) | `0.5.1` | Python package management |
94+
| Prerequisite | Minimum Version | Purpose |
95+
| ------------------------------------------------------- | --------------- | ---------------------------------- |
96+
| [codecov](http://doc.pytest.org/en/latest/) | `2.1.13` | Cover coverage reporting |
97+
| [mypy](https://mypy-lang.org/) | `1.13.0` | Static type checker |
98+
| [pytest](https://docs.pytest.org/en/stable/) | `3.0.6` | Unit and integration tests |
99+
| [pytest-cov](http://doc.pytest.org/en/latest/) | `6.0.0` | Pytest code coverage |
100+
| [pytest-mock](https://pypi.org/project/pytest-mock/) | `3.14.0` | Pytest mocker fixture |
101+
| [mkdocstrings[python]](https://mkdocstrings.github.io/) | `0.27.0` | Zensical plugin for Python AutoDoc |
102+
| [ruff](https://github.com/astral-sh/ruff) | `0.7.3` | Fast linter and formatter |
103+
| [uv](https://github.com/astral-sh/uv) | `0.5.1` | Python package management |
104+
| [Zensical](https://github.com/zensical/zensical) | `0.0.17` | Markdown-based documentation |
106105

107106
If Python is already installed in your machine, run the following commands to validate the versions:
108107

@@ -349,8 +348,8 @@ are primarily related to continuous integration and release deployment.
349348

350349
#### Changes to the documentation files
351350

352-
If you made changes to any file in the `/docs` directory, you need to build the MkDocs documentation
353-
and make sure your changes look good:
351+
If you made changes to any file in the `/docs` directory, you need to build the Zensical
352+
documentation and make sure your changes look good:
354353

355354
```sh
356355
$ make docs-test

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ jobs:
2727
python-version: "3.14"
2828
- name: Install the project
2929
run: uv sync --group docs
30-
- name: Check if the MkDocs documentation can be built
31-
run: uv run mkdocs build -s
30+
- name: Check if the Zensical documentation can be built
31+
run: uv run zensical build -s

.readthedocs.yaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Read the Docs configuration file for MkDocs projects
2-
# See https://docs.readthedocs.io/en/stable/intro/mkdocs.html for details
1+
# Read the Docs configuration file for Zensical projects
2+
# See https://docs.readthedocs.com/platform/stable/intro/zensical.html for details
33

44
# Required
55
version: 2
@@ -10,17 +10,23 @@ version: 2
1010
# - epub
1111
formats: all
1212

13-
# Build documentation in the "docs/" directory with MkDocs
14-
mkdocs:
15-
configuration: mkdocs.yml
16-
1713
# Set the OS, Python version and other tools you might need
1814
build:
1915
os: ubuntu-24.04
2016
tools:
21-
python: "3.13"
17+
python: latest
2218
jobs:
19+
pre_create_environment:
20+
- asdf plugin add uv
21+
- asdf install uv latest
22+
- asdf global uv latest
23+
create_environment:
24+
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
2325
install:
24-
- pip install .
25-
- pip install dependency-groups
26-
- pip-install-dependency-groups docs
26+
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --group docs
27+
build:
28+
html:
29+
- zensical build
30+
post_build:
31+
- mkdir -p $READTHEDOCS_OUTPUT/html/
32+
- cp --recursive build/html/* $READTHEDOCS_OUTPUT/html/

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ test: ## Test the code with pytest.
4040

4141
.PHONY: docs-test
4242
docs-test: ## Test if documentation can be built without warnings or errors
43-
@uv run mkdocs build -s
43+
@uv run zensical build -s
4444

4545
.PHONY: docs
46-
docs: ## Build and serve the documentation
47-
@uv run mkdocs serve
46+
docs: ## Build and serve the documentation (and open in default browser)
47+
@uv run zensical serve -o
4848

4949
.PHONY: build
5050
build: clean-build ## Build wheel file

docs/doc_conventions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ See the [Links](https://www.markdownguide.org/basic-syntax/) Markdown syntax doc
6262

6363
## API Documentation
6464

65-
The API documentation is mostly pulled from docstrings in the source code using the MkDocs
65+
The API documentation is mostly pulled from docstrings in the source code using the Zensical
6666
[mkdocstrings](https://mkdocstrings.github.io/) plugin.
6767

6868
When using `mkdocstrings`, it must be preceded by a blank line before and after, i.e.:

docs/javascripts/readthedocs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
document.addEventListener("DOMContentLoaded", function (event) {
2-
// Trigger Read the Docs' search addon instead of Material MkDocs default
2+
// Trigger Read the Docs' search addon instead of Zensical default
33
document.querySelector(".md-search__input").addEventListener("focus", (e) => {
44
const event = new CustomEvent("readthedocs-search-show");
55
document.dispatchEvent(event);

pyproject.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,8 @@ dependencies = [
3939
[dependency-groups]
4040
build = ["build>=1.2.2", "setuptools>=80.7.1", "setuptools-scm>=9.2"]
4141
dev = [
42-
"black>=25",
4342
"codecov>=2.1",
4443
"ipython>=8.23",
45-
"mkdocs-git-revision-date-localized-plugin>=1.5",
46-
"mkdocs-material>=9.7.1",
4744
"mkdocstrings[python]>=1",
4845
"mypy>=1.13",
4946
"pre-commit>=3",
@@ -52,14 +49,13 @@ dev = [
5249
"pytest-mock>=3.14.1",
5350
"ruff>=0.14.10",
5451
"uv-publish>=1.3",
52+
"zensical>=0.0.17",
5553
]
5654
docs = [
57-
"black>=25",
58-
"mkdocs-git-revision-date-localized-plugin>=1.5",
59-
"mkdocs-material>=9.7.1",
6055
"mkdocstrings[python]>=1",
6156
"setuptools>=80.7.1",
6257
"setuptools_scm>=8",
58+
"zensical>=0.0.17",
6359
]
6460
quality = ["pre-commit>=3"]
6561
test = [

0 commit comments

Comments
 (0)