Clone the Git repository:
git clone https://github.com/cachedjdk/cjdk.git
cd cjdkMake sure to enable the pre-commit Git hooks:
uv tool install pre-commit
# Or: pipx install pre-commit
pre-commit installWe use ty for type checking. This will be added to the pre-commit hook in the future (when an official ty hook is available), but for now, you can run it manually:
uv run ty checkTo run the tests:
uv run pytestTo build the documentation with Jupyter Book:
CJDK_HIDE_PROGRESS_BARS=1 uv run --group docs jb build docs/
# Now view docs/_build/html/index.htmlSome of the documentation pages are Jupyter notebooks stored in MyST Markdown format using Jupytext. To edit these in Jupyter Lab, right-click the file and select "Open With > Notebook" (if it asks you to select a kernel, you probably tried to open a Markdown file that is not a notebook).
New notebook pages can be added by first creating the notebook (.ipynb) in
Jupyter Lab, then running jupytext mypage.ipynb --to myst. Delete the
.ipynb file so that the MyST (.md) file is the single source of truth.
(versioning-scheme)=
cjdk uses SemVer 2, with the scope of API for versioning purposes comprising the Python API, command-line interface, and environment variables for configuration.
As specified by SemVer, anything can change during the 0.x series, although the plan is to keep disruptive changes to a minimum.
- Document in docstring. For Python API, follow our flavor of NumPy style.
- List in the "unreleased" section of
docs/changelog.md. Change the planned next release version if necessary. - Document in Jupyter Book (
docs/). Addversionadded,versionchanged, ordeprecateddirective.
If changing the next release version, ensure that any existing versionadded,
versionchanged, or deprecated directives are updated.
- Ensure
docs/changelog.mdlists all changes since the last release, and convert the "unreleased" section to the new version. - Also ensure that there are no
versionadded,versionchanged, ordeprecateddirectives with a patch or minor version that is being skipped without releasing. - Tag the commit to release.
The rest is taken care of automatically.