-
-
Notifications
You must be signed in to change notification settings - Fork 67
Automate generation of outputs #248
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
Conversation
This PR uses a patched version of https://github.com/sphinx-contrib/sphinxcontrib-runcmd. The patches include:
The directive is not actively maintained, with low code activity. I will prepare pull requests over the next weeks/months, but the author may decide not to accept every PR (also, the directive itself is a wrapper around Here's an example of what we had before:
Which renders to: With the new directive, we have:
Which renders to: |
7671261
to
9674a51
Compare
As for the second part, I forgot we are building the final version on ReadTheDocs, which already uses Docker 😄 Right now it's not able to locate the included files, so I believe its default working directory is different than what I am using. Will play with that value, but quite close to having a working preview before updating the other files. |
1f85b9b
to
bc7cf00
Compare
Preview of the same part of the site, but now rendered in ReadTheDocs (note that there's no We have full control of the output, so in theory we could even find-replace that value for something else if needed, but that makes the build a little more brittle I guess. |
This is great to see! A big bonus if the explicit color coding can be maintained instead of random highlighting by the parser. |
Good idea. I know |
a765204
to
f377c5d
Compare
@@ -28,6 +28,7 @@ watch: clean | |||
--ignore='**venv' \ | |||
--ignore='**.github' \ | |||
--ignore='*.egg-info' \ | |||
--ignore='**_includes/**/*.txt' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid the make watch
command from refreshing multiple times as the output.txt
and other workflow outputs are written to this _includes
folder during the build.
```{admonition} Visualization of 1st-workflow.cwl | ||
[](https://view.commonwl.org/workflows/github.com/common-workflow-language/user_guide/blob/main/_includes/cwl/21-1st-workflow/1st-workflow.cwl) | ||
[](https://view.commonwl.org/graph/png/github.com/common-workflow-language/user_guide/blob/a29e7eae0006660946fc705a310b37a21a7e1edc/_includes/cwl/21-1st-workflow/1st-workflow.cwl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the TODO added above, and the change of link ☝️
50% of the pages converted to use |
0d2dc4b
to
4cbba09
Compare
Also fix a few typos found during review. Replace backticks code blocks by code-block directive. Update conformance tests. Ignore output.txt files.
4cbba09
to
25b8896
Compare
Ready for review! Found a few typos here and there, and some examples that were broken. Also found some code blocks that were not using the Also updated the names of the directories in the The output of the commands now must be dynamically generated during build by ReadTheDocs 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Can we finish the cwl-runner
→ cwltool
migration?
When that is done, then I'll compare a diff of the rendered output for my final review
… at the top comment, and can be used for diffing.
Thanks for that @mr-c, the build is now fixed on RTD. I've fixed your other feedback. It should be ready for review again :D 🥁 🤞 |
|
8d2078e
to
9b20c53
Compare
acd68d1
to
99abb19
Compare
99abb19
to
172b8a9
Compare
This one was trickier, especially since we are running RTD builds already inside Docker, and even though docker-in-docker works, I would prefer to avoid that. The best solution I could think of was udocker, @mr-c. WDYT? I modified the script to re-use the existing CWLTOOL_OPTIONS, adding just the option to remove colors. Then, in RTD settings I set the environment variable to use udocker. This way, anyone building the User Guide can use udocker, podman, docker, etc. But on RTD, it will always use udocker. |
Does it use Docker properly when rendered with GitHub Pages? |
Ah, another good catch @mr-c. I've added the environment variable for GH Pages too, since it'll be using a Docker container for building the docs. I've pushed the commit here, but then added an extra commit and pushed only to my fork. Then enabled the workflow to run on my fork, so that we could have a preview before merging: https://kinow.github.io/user_guide/topics/additional-arguments-and-parameters.html https://github.com/kinow/user_guide/actions (see commit with message "f" - for some unknown reason all my temporary commits have this "f" message 🤷♂️ 😄 ). Thanks! |
4c6c63b
to
86106a0
Compare
Thank you @kinow ! |
Thank you for reviewing and testing the containers on GH. I liked that GH action improvement to prepull the containers! |
👍 It was necessary to keep the docker pull output out of the cwltool output |
Closes #148
{code-block} console
that usescwltool
or another command that we would like to run during build (have updated a few files from the beginning of the docs, following the Next links… I think up to the second section of Topics).