Remove snapshots and improve some documentation
This commit is contained in:
parent
1768b3759f
commit
b719c042df
5 changed files with 14 additions and 12125 deletions
2
.github/workflows/build_docs.yml
vendored
2
.github/workflows/build_docs.yml
vendored
|
@ -27,7 +27,7 @@ on:
|
|||
- PyPI (release)
|
||||
- TestPyPI
|
||||
segment:
|
||||
description: 'Version segment to bump with Hatch (default: none)'
|
||||
description: 'Version segment to bump with Hatch'
|
||||
type: string
|
||||
required: false
|
||||
|
||||
|
|
|
@ -2,9 +2,18 @@
|
|||
|
||||
Contains the Python docgen for Hex Casting.
|
||||
|
||||
## Setup
|
||||
## Version scheme
|
||||
|
||||
The minimum Python version to run this project is `3.11`.
|
||||
This package uses [hatch-gradle-version](https://pypi.org/project/hatch-gradle-version) to generate a version number based on the mod version it was built with.
|
||||
|
||||
The version is in this format: `mod-version.python-version.mod-pre.python-dev.python-post`
|
||||
|
||||
For example:
|
||||
* Mod version: `0.11.1-7`
|
||||
* Python package version: `1.0.dev0`
|
||||
* Full version: `0.11.1.1.0rc7.dev0`
|
||||
|
||||
## Setup
|
||||
|
||||
```sh
|
||||
python -m venv venv
|
||||
|
|
16
doc/TODO.md
16
doc/TODO.md
|
@ -1,16 +1,4 @@
|
|||
- [x] Better resource loading
|
||||
- [x] Fix model_validator type hints (before should take Any and narrow from there)
|
||||
- [x] Sandbox for Jinja
|
||||
- [x] First-class addon support
|
||||
- [x] Versioning
|
||||
- [x] GitHub Actions
|
||||
- [x] Pypi releasing
|
||||
- [x] API improvements (disable exporting, make it easier (possible?) to generate book for imported mods)
|
||||
- [x] Language
|
||||
- [x] Version
|
||||
- [x] Don't delete sitemap markers
|
||||
- [x] delete in dest, then copy, then traverse again to build sitemap from scratch
|
||||
- [x] Dropdowns for ^
|
||||
- [ ] Rewrite the JS code in TypeScript, because I'm going insane trying to modify this
|
||||
- [ ] Unit test for mock addon book
|
||||
- [ ] Re-add edified wood recipe to [Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/edified.json](items/edified) when it actually exists
|
||||
- [ ] Re-add edified wood recipe to [Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/edified.json](items/edified) when it actually exists
|
||||
- [ ] Fix mobile styling for navbar dropdowns
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,39 +0,0 @@
|
|||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from syrupy.assertion import SnapshotAssertion
|
||||
|
||||
from hexdoc.hexdoc import Args, main
|
||||
|
||||
PROPS = "doc/properties.toml"
|
||||
|
||||
|
||||
def test_file(tmp_path: Path, snapshot: SnapshotAssertion):
|
||||
# generate output docs html file and assert it hasn't changed vs. the snapshot
|
||||
main(
|
||||
Args.parse_args(
|
||||
[PROPS, "--lang", "en_us", "--release=true", "-o", tmp_path.as_posix()]
|
||||
)
|
||||
)
|
||||
out_path = tmp_path / "index.html"
|
||||
assert out_path.read_text("utf-8") == snapshot
|
||||
|
||||
|
||||
def test_cmd(tmp_path: Path, snapshot: SnapshotAssertion):
|
||||
# as above, but running the command we actually want to be using
|
||||
subprocess.run(
|
||||
[
|
||||
"hexdoc",
|
||||
PROPS,
|
||||
"--lang",
|
||||
"en_us",
|
||||
"--release=true",
|
||||
"-o",
|
||||
tmp_path.as_posix(),
|
||||
],
|
||||
stdout=sys.stdout,
|
||||
stderr=sys.stderr,
|
||||
)
|
||||
out_path = tmp_path / "index.html"
|
||||
assert out_path.read_text("utf-8") == snapshot
|
Loading…
Reference in a new issue