Hex Casting web book.
Project description
hexdoc
This is the Python docgen for Hex Casting.
Version scheme
We use hatch-gradle-version to generate the version number based on whichever mod version the docgen 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
Creating a plugin / addon
WIP.
- Run these commands, then follow the prompts:
pip3 install cruft cruft create gh:object-Object/HexMod --directory doc
--directory doc
tells Cookiecutter to look for a template in thedoc
directory of HexMod, and cannot be omitted.- If you run this from within an existing mod repo, add the flag
-f
, and leave theoutput_directory
option blank when prompted by Cookiecutter.- Note: this currently overwrites any conflicting files, including your .gitignore, so you may need to use your Git history to re-add anything not covered by the new file.
- Fill in the TODOs in
doc/hexdoc.toml
(mostly paths to files/folders in your mod so hexdoc can find the data it needs). - Try running the docgen locally by following the instructions in
doc/README.md
. - If it doesn't already exist, create an empty
gh-pages
branch and push it. - On GitHub, under
Settings > Pages
, set the source toDeploy from a branch
, the branch togh-pages
, and the folder todocs/
. - Commit and push the docgen, and see if the CI works.
- On GitHub, under
Settings > Environments
, create two new environments calledpypi
andtestpypi
. - Follow these instructions for PyPI and TestPyPI: https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc/
- TestPyPI is a duplicate of PyPI which can be used for testing package publishing without affecting the real index. The CI workflow includes a manual execution option to publish to TestPyPI.
- If you like to live dangerously, this step is optional - you can remove the
publish-testpypi
job and theTestPyPI
release choice from your workflow without impacting the rest of the CI.
Updating to the latest Cookiecutter template
Run this command: cruft update
See also: https://cruft.github.io/cruft/#updating-a-project
Setup
python3.11 -m venv venv
.\venv\Scripts\activate # Windows
. venv/bin/activate.fish # fish
source venv/bin/activate # everything else
# run from the repo root, not doc/
pip install -e .[dev]
Usage
For local testing, create a file called .env
in the repo root following this template:
GITHUB_REPOSITORY=gamma-delta/HexMod
GITHUB_SHA=main
GITHUB_PAGES_URL=https://gamma-delta.github.io/HexMod
Then run these commands to generate the book:
# run from the repo root, not doc/
hexdoc render
hexdoc merge
Or, run this command to render the book and start a local web server:
hexdoc serve --lang en_us
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for hexdoc_hexcasting-0.10.3.1.0.dev20.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbe95e1e0db5a6c70f591b505680371b8f265db8d8cbb6c950c15e5cf81d8a76 |
|
MD5 | 782524273d9f075efbf4485536d3a9ae |
|
BLAKE2b-256 | 45c531b197b6fbe17e6c40d7a7773f0fa134cf25030ec01d04ef475f0a4aac78 |
Close
Hashes for hexdoc_hexcasting-0.10.3.1.0.dev20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dcb6798bdce35fe27f1432db08bb4f8aa02cdb92dba207178946cacbadd4879 |
|
MD5 | 23f2a109ee28d78ed4e715ed8d470d90 |
|
BLAKE2b-256 | db50789dcf11d4bed2f9bc5a5754dfc926d2223340b0ca9f267f979b983a21c5 |