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

[infra] Move mkdocs to use poetry as docs group dep #1486

Merged
merged 9 commits into from
Jan 6, 2025

Conversation

kevinjqliu
Copy link
Contributor

@kevinjqliu kevinjqliu commented Jan 5, 2025

Closes #923

  • Moved mkdocs/requirements.txt to poetry pyproject.toml as docs group dependencies
    • poetry add $(cat mkdocs/requirements.txt | grep -v #) --group docs
  • Add a new make docs-install command to install libraries required to run mkdocs
  • Add a new make docs-serve command to run mkdocs locally
  • Add a new make docs-build command to build mkdocs

@kevinjqliu kevinjqliu marked this pull request as ready for review January 5, 2025 22:24
@kevinjqliu
Copy link
Contributor Author

blocked on #1485

Makefile Outdated
@@ -97,3 +97,9 @@ clean: ## Clean up the project Python working environment
@find . -name "*.pyd" -exec echo Deleting {} \; -delete
@find . -name "*.pyo" -exec echo Deleting {} \; -delete
@echo "Cleanup complete"

docs:
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we call this one docs-serve for completeness?

pyproject.toml Show resolved Hide resolved
- name: Build
working-directory: ./mkdocs
run: mkdocs build --strict
run: make install
Copy link
Contributor

Choose a reason for hiding this comment

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

This will probably slow down the runs of the docs builds (since we install everything), do you have any numbers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@kevinjqliu kevinjqliu Jan 5, 2025

Choose a reason for hiding this comment

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

im not sure if this is apple-to-apple.
alternatively, we can add the mkdoc deps as a new poetry group and just install those

poetry install --with docs

@kevinjqliu kevinjqliu changed the title [infra] Move mkdocs to use poetry [infra] Move mkdocs to use poetry as docs group dep Jan 6, 2025
@kevinjqliu
Copy link
Contributor Author

moved to poetry as docs group dep, i like this more

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

I wasn't aware of the groups function in Poetry, but that seems to fit very nicely here. Thanks @kevinjqliu

@Fokko Fokko merged commit e5bfa1e into apache:main Jan 6, 2025
8 checks passed
@kevinjqliu kevinjqliu deleted the kevinjqliu/refactor-mkdocs branch January 7, 2025 17:33
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.

Move mkdocs action/workflow into docs group
2 participants