Skip to content

Infra: add justfile for extensions docs build #195

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

CalMacCQ
Copy link
Contributor

@CalMacCQ CalMacCQ commented Jul 1, 2025

Initial work on coming up with a justfile that should live in pytket-docs-theming

My intention is that the build-strict recipe is used in C.I. to catch any broken links, warnings, bad coverage etc.

People building the docs locally will just use just build and just serve.

@CalMacCQ CalMacCQ requested a review from cqc-alec as a code owner July 1, 2025 09:37
@CalMacCQ CalMacCQ marked this pull request as draft July 1, 2025 09:37
@CalMacCQ CalMacCQ removed the request for review from cqc-alec July 1, 2025 09:37
cp docs/pytket-docs-theming/pyproject.toml docs
cp docs/pytket-docs-theming/uv.lock docs

PROJECT_NAME := `(basename $(pwd))`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have only set the name in the project title here. Its quite annoying to get the package verison out of the uv environment.

Should be doable as part of the build recipe

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could just set the name and get the version from pip?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a branch now for testing -> CQCL/pytket-docs-theming#20

@CalMacCQ CalMacCQ marked this pull request as ready for review July 3, 2025 12:51
@CalMacCQ CalMacCQ requested a review from cqc-melf July 3, 2025 12:53
coverage: install
cd docs && uv run sphinx-build -v -b coverage . build/coverage

build-strict: install
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the strict recipe that will run in C.I. It will fail on warnings, broken links and bad coverage.

cd docs && uv run sphinx-build {{SPHINX_ARGS}} -b html . build -D html_title={{PROJECT_NAME}}

linkcheck: install
cd docs && uv run sphinx-build -b linkcheck . build
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arguably when this jsutfile is included in the docs theming submodule we can just have users put it into the docs directory and remove all of these cd commands.

@@ -14,3 +14,6 @@ pytket/extensions/braket/_metadata.py
.DS_Store
docs/pyproject.toml
docs/poetry.lock
docs/uv.lock
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to use the uv file at the central website deployment?

cp docs/pytket-docs-theming/pyproject.toml docs
cp docs/pytket-docs-theming/uv.lock docs

PROJECT_NAME := `(basename $(pwd))`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could just set the name and get the version from pip?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants