Skip to content

Add docs infrastructure and uv fixes#12

Open
antirotor wants to merge 11 commits into
developfrom
enhancement/add-docs-infrastructure
Open

Add docs infrastructure and uv fixes#12
antirotor wants to merge 11 commits into
developfrom
enhancement/add-docs-infrastructure

Conversation

@antirotor
Copy link
Copy Markdown
Member

Changelog Description

Add infrastructure to generate API documentation.

Additional review information

This PR is also fixing bugs in powershell tool script about uv logic

Testing notes:

  • all deps should be installed as expected
  • docs should be build

@antirotor antirotor self-assigned this Oct 1, 2025
@antirotor antirotor added the type: enhancement Improvement of existing functionality or minor addition label Oct 1, 2025
@MustafaJafar
Copy link
Copy Markdown
Member

MustafaJafar commented Dec 15, 2025

@antirotor About MK docs, The current setup, relies on:

  • mkdocs.yml
  • mkdocs_requirments.txt
  • mkdocs_hooks.py
  • docs folder
  • deploy_mkdocs.yml

Same changes here actually: ynput/ayon-houdini#306
and it can be tested from cli as shown in ynput/ayon-core#1441

@MustafaJafar
Copy link
Copy Markdown
Member

This PR is also fixing bugs in powershell tool script about uv logic

Where 😅? I didn't find any changes related to powershell or uv.

Comment thread pre-commit-config.yaml
@@ -0,0 +1,27 @@
# See https://pre-commit.com for more information
Copy link
Copy Markdown
Member

@iLLiCiTiT iLLiCiTiT Dec 16, 2025

Choose a reason for hiding this comment

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

I'm against this pre commit hook. This is just annoying and everybody will ignore the error anyways. The PR should have linting validation instead.

When I just want to commit my current changes to "keep progress" I really don't care about it being ruff valid.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Anything that's invisible and doesn't block me is fine - like end-of-file-fixer or whatever. Those that may block me should just run on the PRs - however, if those are cosmetic things that then take a long time to fix or comment on in average PRs then having them fixed beforehand does make it worth our while.

Comment thread .github/workflows/deploy_mkdocs.yml
@MustafaJafar
Copy link
Copy Markdown
Member

MustafaJafar commented Dec 22, 2025

I was trying to test the mk generation but it gave me 404 maybe because I was not able to access actions. (can't even see actions tab).

gh workflow run deploy_mkdocs.yml --ref feature/ci-mkdocs-with-enhancements

Never mind, I'm going to test it via a different way.
well, this doesn't work https://docs.ayon.dev/ayon-addon-template/latest yet.

Comment thread .github/workflows/deploy_mkdocs.yml
Comment thread tools/manage.ps1
Change-Cwd
function Deploy-UvEnv {
Set-Cwd
Write-Color -Text ">>> ", "Test if UV is installed ... " -Color Green, Gray -NoNewline
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I get this on windows

Line |
 160 |      Write-Color -Text ">>> ", "Test if UV is installed ... " -Color G …
     |      ~~~~~~~~~~~
     | The term 'Write-Color' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling
     | of the name, or if a path was included, verify that the path is correct and try again.

Comment thread tools/manage.ps1
Write-Host "Commands:"

Write-Info -Text " create-env ", "Install uv and update venv by lock file" -Color White, Cyan
Write-Info -Text " ruff-check ", "Run Ruff check for the repository" -Color White, Cyan
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

tools/manage.ps1 ruff-check

raise a lot of things.

Are the Ruff rules a lot than what we used to have?

Comment thread tools/manage.ps1
Write-Info -Text " ruff-fix ", "Run Ruff fix for the repository" -Color White, Cyan
Write-Info -Text " codespell ", "Run codespell check for the repository" -Color White, Cyan
Write-Info -Text " build-docs ", "Build documentation" -Color White, Cyan
Write-Info -Text " serve-docs ", "Serve documentation locally" -Color White, Cyan
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I get this from this command.

>>>  Cleaning cache files ... OK
error: Failed to spawn: `mkdocs`
  Caused by: program not found

Comment thread tools/manage.ps1
Write-Info -Text " ruff-check ", "Run Ruff check for the repository" -Color White, Cyan
Write-Info -Text " ruff-fix ", "Run Ruff fix for the repository" -Color White, Cyan
Write-Info -Text " codespell ", "Run codespell check for the repository" -Color White, Cyan
Write-Info -Text " build-docs ", "Build documentation" -Color White, Cyan
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this one has the same result as in https://github.com/ynput/ayon-addon-template/pull/12/changes#r3011399207

btw running uv build docs returns

E:\Ynput\ayon-addon-template>uv build docs                
Building source distribution...
  × Failed to build `E:\Ynput\ayon-addon-template\docs`
  ╰─▶ E:\Ynput\ayon-addon-template\docs does not appear to be a Python project, as neither `pyproject.toml` nor `setup.py` are present
      in the directory

@MustafaJafar
Copy link
Copy Markdown
Member

btw, I don't have access to Actions tab in this repo and not sure why the
https://docs.ayon.dev/ayon-addon-template/latest doesn't have something yet.

@MustafaJafar
Copy link
Copy Markdown
Member

MustafaJafar commented Mar 30, 2026

btw, the way our uv setup works is as follows:
These work on my side.
Also, I believe it can't serve the site without building it in the first place.

uv pip install -r mkdocs_requirements.txt
uv run mike deploy 0.0.0
uv run mike deploy --update-aliases 0.0.0
uv run mike set-default latest
uv run mike serve

uv run mike delete 0.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants