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

Improvements to docs infrastructure #497

Merged
merged 16 commits into from
Aug 14, 2024
Merged

Improvements to docs infrastructure #497

merged 16 commits into from
Aug 14, 2024

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Jul 28, 2024

Please see issues for more details!

Copy link
Contributor

Preview the changes: https://turinglang.org/docs/pr-previews/497
Please avoid using the search feature and navigation bar in PR previews!

@penelopeysm
Copy link
Member Author

penelopeysm commented Jul 28, 2024

Unfortunately, GitHub is still running the version of the workflows on the main branch, so the current PR preview doesn't show the correctly built docs (for example, it still has the UndefVarError I mentioned in #495).

To get around this, I'm going to temporarily add a new workflow file that runs on this branch, then remove it after it's done running.

Edit: The workflow ran at: https://github.com/TuringLang/docs/actions/runs/10131613167/job/28014548724?pr=497 and the preview docs now reflect the docs that would be built if this PR were merged.

@penelopeysm penelopeysm force-pushed the pysm/building-docs branch 6 times, most recently from 7cbb93c to 6a380d5 Compare August 9, 2024 15:12
The action now:

 - runs on all PRs to main / backport branches
 - runs on pushes to main / backport branches

It always checks that the version of Turing in Project.toml matches that
in _quarto.yml.

Additionally, if the PR is targeted at main / the push is to the main
branch, it also checks that the version of Turing matches the latest
release on GitHub.
@penelopeysm penelopeysm marked this pull request as ready for review August 9, 2024 15:20
@penelopeysm
Copy link
Member Author

(@shravanngoswamii Requesting your expertise on github actions here :))

@shravanngoswamii
Copy link
Member

I had kind of assumed that after we upgrade master to 0.34, we would then also create a backport-v0.33

Actually, we created the backport of v0.32 because it was released when I was developing versions workflows for this repo!
See here, we are publishing rendered docs of old versions in gh-pages itself:
https://github.com/TuringLang/docs/blob/b65e747ccc8ea125b83a1db6f3de80c0bb839947/.github/workflows/publish.yml#L45C1-L52C55

https://github.com/TuringLang/docs/blob/b65e747ccc8ea125b83a1db6f3de80c0bb839947/.github/workflows/publish.yml#L93C1-L99C23

gh-pages: https://github.com/TuringLang/docs/tree/gh-pages/versions

@shravanngoswamii
Copy link
Member

In current workflow, we have to create a branch from some old commit and then update the old docs by changing version number in _quarto.yml

@penelopeysm
Copy link
Member Author

In current workflow, we have to create a branch from some old commit and then update the old docs by changing version number in _quarto.yml

Yeah. I think we are agreeing, right? ;) The docs for v0.33 would live in a v0.33 branch (we can call it backport-v0.33 for consistency, or we can take a different name, not a big deal). The Project.toml and _quarto.yml on that branch would be kept at 0.33. Then we make edits on that branch if we want to change old docs. As long as we keep the structure of those branches in agreement with the publish workflow, I don't see any problems arising.

@shravanngoswamii
Copy link
Member

Is it fine to create a lot of branches, because they will keep increasing!

@penelopeysm
Copy link
Member Author

Personally I wouldn't have a problem with it! As long as we are publishing multiple versions of the docs online, the source for those versions will have to live somewhere, and this repo is the most logical place to house them.

Most software projects I know do this too, for example the Julia core repo has release/vX.Y branches with all the docs which (I presume) is how they keep docs for old versions online :)

If we find one day that there are too many branches, then we could just stop providing online documentation for old versions. For example, we could say that we provide docs only for the 5 latest versions. We could discuss that in the future, but I can't say I feel particularly bad about using GitHub's disk space haha.

@shravanngoswamii
Copy link
Member

shravanngoswamii commented Aug 14, 2024

We could discuss that in the future, but I can't say I feel particularly bad about using GitHub's disk space haha.

Well, I agree to all your points! I am approving changes from my side! Maybe @yebai would like to review it before merging!

@shravanngoswamii
Copy link
Member

@penelopeysm Thank you for all the effort!!

@yebai
Copy link
Member

yebai commented Aug 14, 2024

@mhauru can you take a look too, and approve before merging?

@mhauru mhauru self-requested a review August 14, 2024 10:07
Copy link
Member

@mhauru mhauru left a comment

Choose a reason for hiding this comment

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

Had a few questions and small comments, seems great. That auto-version-updater GHA is faaancy! I wonder if the Julia code for it could live in a .jl file somewhere. Having that much Julia code as a string in yaml feels funny, and exempts it from things like linting.

.github/workflows/version_check.yml Outdated Show resolved Hide resolved
.github/workflows/version_check.yml Outdated Show resolved Hide resolved
.github/workflows/version_check.yml Show resolved Hide resolved
.github/workflows/version_check.yml Outdated Show resolved Hide resolved
.github/workflows/version_check.yml Outdated Show resolved Hide resolved
Copy link
Member

@mhauru mhauru left a comment

Choose a reason for hiding this comment

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

Looks great, thanks Penny!

@penelopeysm
Copy link
Member Author

Thanks everyone!

@penelopeysm penelopeysm merged commit c0dc95b into master Aug 14, 2024
4 checks passed
@penelopeysm penelopeysm deleted the pysm/building-docs branch August 14, 2024 13:11
github-actions bot added a commit that referenced this pull request Aug 14, 2024
penelopeysm added a commit that referenced this pull request Aug 14, 2024
penelopeysm added a commit that referenced this pull request Aug 14, 2024
penelopeysm added a commit that referenced this pull request Aug 14, 2024
penelopeysm added a commit that referenced this pull request Aug 14, 2024
Namely, using a single environment for the project. This ensures that
this branch plays well with the GitHub workflow.
yebai pushed a commit that referenced this pull request Aug 14, 2024
* Update README following #497

* Specify Quarto minimum version

* Streamline instructions for rendering a single file
penelopeysm added a commit that referenced this pull request Sep 12, 2024
* Backport changes from #497 to v0.32 docs

Namely, using a single environment for the project. This ensures that
this branch plays well with the GitHub workflow.

* Update README

As per #506

* Streamline instructions for rendering a single file
@penelopeysm penelopeysm mentioned this pull request Nov 26, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants