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

Readthedocs render #36

Merged
merged 32 commits into from
Jan 15, 2024
Merged

Readthedocs render #36

merged 32 commits into from
Jan 15, 2024

Conversation

liamhuber
Copy link
Member

The build doesn't crash, but it's not showing the content either. For starters, let's add the myst dependency, which should be needed for rendering the markdown file.

Copy link

Binder 👈 Launch a binder notebook on branch pyiron/pyiron_ontology/myst_docs

Copy link

codacy-production bot commented Jan 11, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (64d7422) 459 418 91.07%
Head commit (7f400b6) 459 (+0) 418 (+0) 91.07% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#36) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation

@liamhuber
Copy link
Member Author

The class diagrams don't render, and the API documentation is not triggering

@liamhuber
Copy link
Member Author

API docs are working, but the mermaid diagrams are still not rendering

@liamhuber
Copy link
Member Author

Ugh, it looks even worse now

@liamhuber
Copy link
Member Author

Ok, the readthedocs logs have the following line: WARNING: command 'mmdc' cannot be run (needed for mermaid output), check the mermaid_cmd setting which is probably the source of the trouble

I saw in the logs I was getting a "WARNING: command 'mmdc' cannot be run (needed for mermaid output), check the mermaid_cmd setting" warning. I found some random github issue suggesting that the mermaid cli needs to be involved, and then had the pragmatic idea to just go do whatever the sphinxcontrib-mermaid folks are doing for _their_ readthedocs because it's obviously working for them! Sure enough, they install the mermaid cli on readthedocs. Let's try it.
@liamhuber
Copy link
Member Author

I found some random github issue suggesting that the mermaid cli needs to be involved, and then had the pragmatic idea to just go do whatever the sphinxcontrib-mermaid folks are doing for their readthedocs because it's obviously working for them! Sure enough, they install the mermaid cli on readthedocs. Let's try it.

Copy link

codacy-production bot commented Jan 12, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (64d7422) 459 418 91.07%
Head commit (9f51a6f) 459 (+0) 418 (+0) 91.07% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#36) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation

@liamhuber
Copy link
Member Author

The readthedocs log has the following error:

writing... WARNING: mm code 'classDiagram\n    class PyironOntoThing\n    PyironOntoThing: get_sources()\n    <<Abstract>> PyironOntoThing\n    WorkflowThing <|--PyironOntoThing\n    <<Abstract>> WorkflowThing\n    Parameter <|--PyironOntoThing\n    <<Abstract>> Parameter\n    Function <|--WorkflowThing\n    IO <|--Parameter\n    IO <|--WorkflowThing\n    <<Abstract>> IO\n    Input <|--IO\n    Output <|--IO\n    Generic <|--Parameter\n    Generic: is_representable_by()\n    Generic: is_more_specific_than()': Mermaid exited with error:
[stderr]
b'\nTimeoutError: Timed out after 30000 ms while waiting for the WS endpoint URL to appear in stdout!\n    at ChromeLauncher.launch (file:///home/docs/.asdf/installs/nodejs/16.18.1/.npm/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/node/ProductLauncher.js:119:23)\n    at async run (file:///home/docs/.asdf/installs/nodejs/16.18.1/.npm/lib/node_modules/@mermaid-js/mermaid-cli/src/index.js:404:19)\n    at async cli (file:///home/docs/.asdf/installs/nodejs/16.18.1/.npm/lib/node_modules/@mermaid-js/mermaid-cli/src/index.js:184:3)\n\n'
[stdout]
b''
done

@liamhuber
Copy link
Member Author

Forcing the output type to PNG worked...or I just needed to re-run; either way the build is correctly showing the diagrams.

Be careful as the failure may re-occur: there are reports of the upstream puppeteer as the root of the timeout error:

@liamhuber
Copy link
Member Author

Actually, the error is still showing up in the raw readthedocs log, but the image is showing in the final rendered docs nonetheless...

@liamhuber liamhuber merged commit ec497c5 into main Jan 15, 2024
17 checks passed
@liamhuber liamhuber deleted the myst_docs branch January 15, 2024 21:08
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