Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace collate_data.py with hexdoc-hexcasting for generating the web book #642

Merged
merged 90 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
4e00174
Squash all pre-refactor hexdoc commits
object-Object Nov 21, 2023
0dd19a2
Use new favicon feature
object-Object Nov 5, 2023
88978de
Use new hexdoc imports
object-Object Nov 5, 2023
e507253
Bump version
object-Object Nov 5, 2023
7b08887
changed patchouli icon ids to 0.11 ones so we don't crash
SamsTheNerd Oct 19, 2023
bb03ebd
added mob effect icons and enchanted book icon so that it loads all t…
SamsTheNerd Oct 19, 2023
86ce776
added flayable entity renders
SamsTheNerd Oct 20, 2023
c64a3b4
added mindflay render cards
SamsTheNerd Oct 20, 2023
80b5de5
added informative blurb to mindflay recipe cards about villager requi…
SamsTheNerd Oct 20, 2023
91fa3f0
underscore villager requirements
SamsTheNerd Nov 5, 2023
ec71f77
the most reviewed and least DS_Stored code in the world
SamsTheNerd Nov 5, 2023
5505bec
code goes ~ and has no spaces
SamsTheNerd Nov 5, 2023
09c4bc4
Move changes to correct locations
object-Object Nov 6, 2023
a6eee18
Remove hexdoc workflows and temporarily disable build_docs on push
object-Object Nov 6, 2023
acc7aa5
Update CI for new project setup
object-Object Nov 6, 2023
5c435d8
Fix hexdoc imports
object-Object Nov 6, 2023
3156c86
Rename properties.toml to hexdoc.toml
object-Object Nov 6, 2023
f6536ad
Add gaslighting tag and fix advancements location
object-Object Nov 6, 2023
9f42b78
Use default_rendered_templates hook
object-Object Nov 6, 2023
0e17a82
Disable workflow and remove testpypi
object-Object Nov 6, 2023
1248fbe
Update hooks
object-Object Nov 7, 2023
3530061
Support new texture loading
object-Object Nov 13, 2023
c390ef8
Temporarily switch to direct hexdoc reference
object-Object Nov 13, 2023
f4421f6
Update CI ref
object-Object Nov 13, 2023
dd7275d
Remove texture overrides
object-Object Nov 13, 2023
82d6584
Update to new hook structure
object-Object Nov 18, 2023
553b44a
Remove minecraft_assets stuff
object-Object Nov 19, 2023
9107feb
Add hexdoc_minecraft dependency
object-Object Nov 19, 2023
c8c3860
Workaround issue with action link validation for non-English languages
object-Object Nov 20, 2023
f0a9987
Add direct reference to hexdoc-minecraft wheel
object-Object Nov 20, 2023
7756749
Update CI workflow
object-Object Nov 20, 2023
ee92b16
Change default branch for testing
object-Object Nov 20, 2023
a0107a6
Take advantage of new concurrency settings
object-Object Nov 21, 2023
ad44c10
Use new hexdoc versions
object-Object Nov 21, 2023
c1ba95e
Merge branch 'squashing-docgen-2' into 1.20
object-Object Nov 21, 2023
463a2c4
Add more branch patterns
object-Object Nov 21, 2023
7d41987
Change default branch to 1.20
object-Object Nov 21, 2023
734e9c2
Fix validation errors for zh_cn
object-Object Nov 21, 2023
4b48367
Fix validation errors for ru_ru
object-Object Nov 21, 2023
a22026c
Remove allow-direct-refs
object-Object Nov 22, 2023
18efa4d
Remove --allow-missing from nodemon.json
object-Object Nov 23, 2023
7fb8752
Use TRACE instead of DEBUG
object-Object Nov 23, 2023
62e92cd
Remove outdated README info
object-Object Nov 26, 2023
97b508d
Use TypeTaggedTemplate for brainsweep recipes instead of macros [no ci]
object-Object Dec 2, 2023
4411fb1
Add workflow_call event
object-Object Dec 2, 2023
f3079f2
Add parallel release workflow
object-Object Dec 2, 2023
d751c6a
Add per-branch toggles [no ci]
object-Object Dec 2, 2023
fe98498
Add build-group-id and bump hatch-gradle-version
object-Object Dec 2, 2023
4716615
Use build-group-id
object-Object Dec 2, 2023
4731bce
Bump web book version from refs/heads/1.20
object-Object Dec 2, 2023
1aa7875
Revert "Bump web book version from refs/heads/1.20"
object-Object Dec 2, 2023
6d962ca
??? [no ci]
object-Object Dec 2, 2023
dd2c0cb
Improve parallel release concurrency
object-Object Dec 2, 2023
24b67b4
Bump web book version from refs/heads/1.20
object-Object Dec 2, 2023
7145274
Revert "Bump web book version from refs/heads/1.20"
object-Object Dec 2, 2023
e6b1e51
fine i give up github you win
object-Object Dec 2, 2023
0366196
Bump web book version from refs/heads/1.20
object-Object Dec 2, 2023
d8fa3a9
Bump web book version from refs/heads/1.20
object-Object Dec 3, 2023
f74ad40
Remove segment option
object-Object Dec 3, 2023
fe0772c
Re-add GH_TOKEN
object-Object Dec 3, 2023
300c369
Replace --lang with --quiet-lang
object-Object Dec 10, 2023
ee78a07
Use hexdoc@main workflow
object-Object Dec 10, 2023
16961f8
Revert "Use hexdoc@main workflow"
object-Object Dec 10, 2023
6dd7395
Revert "Revert "Use hexdoc@main workflow""
object-Object Dec 10, 2023
1efa8d6
Switch to new context style [ci skip]
object-Object Dec 17, 2023
186c5cd
Add link_overrides
object-Object Dec 17, 2023
bf40d9f
Add warning if no patterns were found
object-Object Dec 28, 2023
9dcdd79
Integrated new rendering options using a Rust -> WASM
JohnDog3112 Jan 8, 2024
01cf05b
Merge remote-tracking branch 'upstream/main' into 1.20
object-Object Jan 12, 2024
8192c60
Run datagen
object-Object Jan 12, 2024
15bc1cc
Revert staves tag change, re-add zenith sortnum
object-Object Jan 12, 2024
60ee6c6
Re-add Edified Wood recipe page
object-Object Jan 12, 2024
7edab68
Bump version to 1.0.dev23
object-Object Jan 12, 2024
260b88c
Switched color palettes to match HexBug better.
JohnDog3112 Jan 12, 2024
3ae426a
Renamed render.js to hexcasting_render.js and added the animated opti…
JohnDog3112 Jan 12, 2024
5b8ca9e
Removed inline styles for CSS
JohnDog3112 Jan 12, 2024
fafc9e9
Renamed colors, switched them to what HexBug uses, and removed transp…
JohnDog3112 Jan 12, 2024
d620784
Setup all of the names/interfaces to be localized
JohnDog3112 Jan 18, 2024
7236895
.vscode auto-change
object-Object Mar 29, 2024
7d5a6b3
Merge remote-tracking branch 'upstream/main' into 1.20
object-Object Mar 29, 2024
9f6b451
Change branch name
object-Object Mar 29, 2024
df9fa4a
Bump hexdoc dependency to a10
object-Object Mar 29, 2024
4e3b366
Merge pull request #8 from JohnDog3112/1.20
object-Object Mar 29, 2024
cd3d923
Fix outdated command
object-Object Mar 29, 2024
f71ab9e
Improve appearance of pattern rendering dropdown
object-Object Mar 29, 2024
b8abe22
Bump version to 1.0.dev24
object-Object Mar 29, 2024
5a98060
Fix default_branch in hexdoc.toml
object-Object Mar 29, 2024
f98e45b
Update hexdoc plugin license
object-Object Mar 29, 2024
66b52f7
Run hexdoc build on pull requests to make sure the book works
object-Object Mar 29, 2024
36780a2
Fix pr hexdoc error caused by gh pages api
object-Object Mar 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 52 additions & 21 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,60 @@
name: Build the Python doc-gen
name: Build the web book

on:
push:
branches: [main]
branches: main
workflow_dispatch:
inputs:
release:
description: Release this version
type: boolean
default: false
publish:
description: Package index to publish to
type: choice
options:
- none
- PyPI

env:
PYPI_PACKAGE: hexdoc-hexcasting

permissions:
contents: read

jobs:
build_docs:
runs-on: ubuntu-latest
hexdoc:
uses: hexdoc-dev/hexdoc/.github/workflows/hexdoc.yml@main
permissions:
contents: write
pages: read
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
python-version: "3.11"
release: |-
${{
github.event_name != 'push' && inputs.release
|| github.event_name == 'push' && startsWith(github.event.head_commit.message, '[Release]')
}}

publish-pypi:
runs-on: ubuntu-latest
needs: hexdoc
if: |-
needs.hexdoc.outputs.release == 'true' &&
(github.event_name == 'push' || inputs.publish == 'PyPI')
environment:
name: pypi
url: https://pypi.org/p/${{ env.PYPI_PACKAGE }}
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Generate file
run: doc/collate_data.py Common/src/main/resources hexcasting thehexbook doc/template.html index.html.uncommitted
- name: Check out gh-pages
uses: actions/checkout@v3
with:
clean: false
ref: gh-pages
- name: Overwrite file and commmit
run: |
mv index.html.uncommitted index.html
git config user.name "Documentation Generation Bot"
git config user.email "[email protected]"
git add index.html
git diff-index --quiet HEAD || git commit -m "Update docs at index.html from $GITHUB_REF"
- name: Upload changes
run: git push
- name: Download package artifact
uses: actions/download-artifact@v3
with:
name: hexdoc-build
path: dist

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
13 changes: 13 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,16 @@ jobs:
run: |
git add --intent-to-add .
git diff --name-only --exit-code -- ":!:*/src/generated/resources/.cache/*"

hexdoc:
uses: hexdoc-dev/hexdoc/.github/workflows/hexdoc.yml@main
permissions:
contents: write
pages: read
secrets:
GH_TOKEN: ""
with:
python-version: "3.11"
release: false
deploy-pages: false
site-url: https://hexcasting.hexxy.media
166 changes: 166 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# hexdoc
doc/**/_export/generated/
/_site/
/_checkout/
__gradle_version__.py
.hexdoc/

# eclipse
bin
*.launch
Expand All @@ -22,9 +29,168 @@ eclipse
run
.DS_Store

# MacOS moment
.DS_Store

# Files from Forge MDK
forge*changelog.txt

Session.vim
plot/


# Python

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"ms-python.vscode-pylance",
"charliermarsh.ruff",
"samuelcolvin.jinjahtml",
"noxiz.jinja-snippets",
],
}
34 changes: 34 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports.ruff": "explicit"
},
"editor.rulers": [88],
},
"[yaml][html][css][javascript][jinja-html][jinja-css][jinja-js]": {
"editor.tabSize": 2,
},
"[html][jinja-html]": {
"editor.rulers": [120],
},
"ruff.organizeImports": true,
"ruff.lint.args": [
"--extend-ignore=I", // format on save is enabled, so don't show the squiggles
],
"python.languageServer": "Pylance",
"python.analysis.diagnosticMode": "workspace",
"python.analysis.packageIndexDepths": [
{"name": "hexdoc", "depth": 3},
{"name": "pydantic", "depth": 2},
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"files.associations": {
"*.js.jinja": "javascript",
"*.css.jinja": "css",
"*.jcss.jinja": "jinja-css", // for files with a lot of jinja stuff, where the linting isn't useful
"*.json5.jinja": "json5",
},
}
Loading
Loading