Development#
This page describes how to set up t-doc for development. It isn't necessary for creating and editing documents.
Install#
Install the required packages for your system.
Install Node.js, include the
npm
package manager and make sure it's on the systemPATH
.-
python -m pip install build hatchling
python -m pip install --user build hatchling
python -m pip install --user build hatchling
Clone the
t-doc/common
repository (substituteUSER
with your username).hg clone https://USER@c-space.net/rc/hg/t-doc/common cd common
Checkout and activate the
main
bookmark.hg checkout main
Run the local server with
TDOC_VERSION=dev
. This installs thet-doc-common
package as editable into the virtual environment_venv/dev
.set TDOC_VERSION=dev run.py --debug serve
TDOC_VERSION=dev ./run.py --debug serve
TDOC_VERSION=dev ./run.py --debug serve
Upgrade#
Pull missing changesets from the
t-doc/common
repository.hg pull
Update to the branch head.
hg update --check
Update the generated files.
python -m build --no-isolation --wheel
If any Python dependencies need to be upgraded, delete the
_venv/dev
directory. It will be re-created when the local server is run the next time withTDOC_VERSION=dev
.Alternatively, the
t-doc-common
package metadata and any out-of-date dependencies can be updated in-place._venv\dev\Scripts\pip.exe install --upgrade --editable .
_venv/dev/bin/pip install --user --upgrade --editable .
_venv/dev/bin/pip install --user --upgrade --editable .