Pytools requires Python 3.8+.
Pytools uses poetry to manage dependencies and projects.
curl -sSL https://install.python-poetry.org | python3 -
PATH:export PATH="$HOME/.local/bin:$PATH"
poetry install
Pytools provides the following executables:
This executable generates API docs for Pulsar C++ Client using doxygen:
poetry run bin/cpp-apidoc-generator.py <VERSION>
... where the VERSION is released semantic version like 2.10.2 or 3.0.0.
This executable generates API docs for Pulsar Node.js Client using typedoc:
poetry run bin/js-apidoc-generator.py <VERSION>
... where the VERSION is released semantic version like 1.8.2.
This executable generates API docs for Pulsar Java Client, Admin and Functions using Maven:
poetry run bin/java-apidoc-generator.py <VERSION>
... where the VERSION is released semantic version like 2.10.2.
This executable generates Pulsar references, including command-line documents and configs:
poetry run bin/reference-doc-generator.py --master-path=<path> [--version=<VERSION>] [--kind={all|admin|cient|config|perf|pulsar}]
... where:
master-path is path to the main repo, which must be built to execute the bin scripts;version is the version of the main repo, default to next a.k.a. the latest master branch;kind is what references to generate, default to all.This executable generates REST API docs based on Swagger:
poetry run bin/rest-apidoc-generator.py [--master-path=<path>] [--version=<VERSION>]
... where:
master-path is path to the main repo. If it's empty, the script will clone the main repo on the fly.version is the version of the main repo, default to master a.k.a. the latest master branch;This executable synchronizes references built from the main repo:
poetry run bin/site-updater.py --master-path=<PATH> [--push={y|n|auto}]
... where:
master-path is path to the main repo;push specifies whether push to the remote site repo.This executable publishes a new static site built from the current site repo:
poetry run bin/site-publisher.py --site-path=<PATH> [--push={y|n|auto}]
... where:
site-path is path to the site repo (of published branch asf-site-next);push specifies whether push to the remote published branch of site repo.If files don't get updated in the published website although site publishing is successful, one of the problems might be that the git history of asf-site-next branch is too large.
This is how to clean the history of asf-site-next branch:
git clone --depth 1 -b asf-site-next https://github.com/apache/pulsar-site pulsar-site-static cd pulsar-site-static git checkout --orphan asf-site-next-truncated git add -A git commit -m "History truncated" git push -f origin HEAD:asf-site-next
If push fails, you might need to remove branch protection of asf-site-next branch. This is handled in the .asf.yaml file of the main branch.