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

add auto/light/dark mode for docs #625

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

s-light
Copy link
Contributor

@s-light s-light commented Aug 26, 2024

@s-light
Copy link
Contributor Author

s-light commented Aug 26, 2024

hmm.
the docs render check failed with

added code example for nodes.md
Traceback (most recent call last):
  File "docs/autogen.py", line 127, in <module>
    mkdoc_autogen()
  File "docs/autogen.py", line 123, in mkdoc_autogen
    add_all_code_examples(destination_path)
  File "/home/runner/work/python-on-whales/python-on-whales/docs/docs_utils.py", line 494, in add_all_code_examples
    add_code_example(destination, "pods.md", generate_code_demo_pods())
  File "/home/runner/work/python-on-whales/python-on-whales/docs/docs_utils.py", line 447, in generate_code_demo_pods
    pod = podman.pod.create("my-pod")
  File "/home/runner/work/python-on-whales/python-on-whales/python_on_whales/components/pod/cli_wrapper.py", line 457, in create
    return Pod(self.client_config, run(full_cmd), is_immutable_id=True)
  File "/home/runner/work/python-on-whales/python-on-whales/python_on_whales/utils.py", line 222, in run
    raise DockerException(
python_on_whales.exceptions.DockerException: The command executed was `/usr/bin/podman pod create --name my-pod`.
It returned with code 125
The content of stdout is 'initializing source docker://k8s.gcr.io/pause:3.5: Requesting bear token: invalid status code from registry 404 (Not Found)
'
The content of stderr is 'Error: repository name must have at least one component
'

that seems not like a bug i introduced with my pullrequest.. (at least to me)

@gabrieldemarmiesse
Copy link
Owner

I think it'd unrelated to your PR. Dark mode is appreciated! I'll take a look at it. Thanks!

@gabrieldemarmiesse
Copy link
Owner

@s-light sorry for the delay. I re-ran the job, and got the following error: ModuleNotFoundError: No module named 'griffe.collections'. I think this should be added to the list of dependencies for the docs. You can find the file here: https://github.com/gabrieldemarmiesse/python-on-whales/blob/master/docs/requirements.txt

@LewisGaul
Copy link
Collaborator

LewisGaul commented Sep 1, 2024

I'm hitting the docs job issue mentioned too, where a podman command is failing with exit code 125 and output:

$ /usr/bin/podman pod create --name my-pod
initializing source docker://k8s.gcr.io/pause:3.5: Requesting bear token: invalid status code from registry 404 (Not Found)
Error: repository name must have at least one component

This "pause" container image it's trying to pull is used as the pod's default infra container, and the reason the doc generation is trying to run this command is to generate docs with real output from commands. I'm not sure why this is an issue on the docs job and not the podman pod tests job... My guess is it would be fixed by running scripts/ci-podman-update.sh in the docs job, I'll try that out in a separate PR.

gabrieldemarmiesse pushed a commit that referenced this pull request Sep 5, 2024
Hopefully fixing two issues that have started being hit in the "Render
docs" CI job:
* `podman pod create` failing with "initializing source
docker://k8s.gcr.io/pause:3.5: Requesting bear token: invalid status
code from registry 404 (Not Found)", reported at
#625 (comment)
and seen in other PRs too.
* Fixed by updating podman in the CI, since doc generation involves
running podman commands.
* `ModuleNotFoundError: No module named 'griffe.collections'` reported
at
#625 (comment)
and seen in other PRs too.
* Fixed by updating doc package dependencies and pinning a couple more
indirect dependencies (I think the lack of pinning `griffe` while
pinning to an older version of `mkdocstrings-python` was the
problem...).
@gabrieldemarmiesse
Copy link
Owner

I generated the docs locally, it looks awesome! Many thanks!

@gabrieldemarmiesse gabrieldemarmiesse merged commit cfd6920 into gabrieldemarmiesse:master Sep 5, 2024
21 checks passed
@s-light s-light deleted the patch-1 branch September 5, 2024 19:23
@s-light
Copy link
Contributor Author

s-light commented Sep 5, 2024

thanks for merging!
do you have to create a release for the deployment to get triggered?

Deployments :
github-pages 2 months ago

@gabrieldemarmiesse
Copy link
Owner

The documentation is updated automatically at every release. I'll create one soon, you'll see the changes then. It's going to make the docs much easier to read :)

@gabrieldemarmiesse
Copy link
Owner

It's live!

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.

3 participants