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

Multi-version documentation #317

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

AVHopp
Copy link
Collaborator

@AVHopp AVHopp commented Jul 18, 2024

This PR introduces the multi-version documentation.

The logic is the following:

  • A new branch gh-pages was created. On this branch, the actual documentation is hosted. For each version of the documentation, including stable and latest, there is one folder containing the actual documentation. This makes the folders reachable via URLs once the settings in the repository have changed.
  • As of now, the latest stable version is included for "backwards compatibility". Note however that this version does not yet contain the version selector and won't until the next release!
  • There are two different cases in which the new docs workflow will be triggered:
  1. There was a push to main: This rebuilds the latest folder and updates it.
  2. There was a release: This updates the folders latest, stable and X.Y.Z, where X.Y.Z is the tag that was used in the release.
  • Whenever any folder other than stable is being created, an announcement banner saying that this is not the stable version is included. Also, a "version selector" is injected, showing both the current version and providing a link to the (currently not nice looking) page for switching the version.
  • The gh-pages branch was designed such that it is as minimal as possible. Thus, all actual python scripts and logic is contained in the actual branch and is being copied from main whenever the documentation is built.
  • NOTE: This does not yet fix the issue of having the proper README.md appear on the github page for technical reasons. Happy to explain the detailed reasons via a meeting or here if you are interested.

For testing, I created the exact same Pull Request as well as as "dummy release" on my fork and merged both of these/created a new release, so please have a look at https://avhopp.github.io/baybe_dev/stable/ for details.

@AVHopp AVHopp self-assigned this Jul 18, 2024
@AVHopp AVHopp added the documentation Improvements or additions to documentation label Jul 18, 2024
@AVHopp AVHopp marked this pull request as draft July 18, 2024 12:36
@AVHopp AVHopp added repo Requires changes to the project configuration enhancement Expand / change existing functionality new feature New functionality release This will be merged directly before the next release labels Jul 18, 2024
@AVHopp AVHopp force-pushed the docs/multi_version branch 3 times, most recently from bbf8ca6 to 53012d3 Compare July 19, 2024 15:07
@AVHopp AVHopp marked this pull request as ready for review July 21, 2024 10:38
@AVHopp AVHopp force-pushed the docs/multi_version branch 5 times, most recently from 1cbb080 to 0f331a2 Compare July 21, 2024 14:24
Copy link
Collaborator

@Scienfitz Scienfitz left a comment

Choose a reason for hiding this comment

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

does this need any preparation? this repo has enver had the corresponding branch used unlike the fork so I wonder whether anything is implicitly expected/needed or should it just work flat out?

docs/index.md Outdated Show resolved Hide resolved
.github/workflows/docs.yml Show resolved Hide resolved
docs/scripts/add_version.py Outdated Show resolved Hide resolved
docs/scripts/add_version.py Outdated Show resolved Hide resolved
docs/scripts/add_version.py Outdated Show resolved Hide resolved
@@ -1,20 +1,12 @@
name: Documentation

on:
push:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Regarding stuff that still needs to be changed on the repo side:

  • There is already a prepared gh-pages branch in this repo
  • We only need to change the settings in this repo to deploy from that branch instead of using github actions.

Copy link
Collaborator

@AdrianSosic AdrianSosic left a comment

Choose a reason for hiding this comment

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

Hi @AVHopp, thanks for getting this to work 👍🏼 I'm also currently trying to get the lockfile running, and then we have all missing pieces ready for a first multi-version doc!

docs/scripts/add_version.py Outdated Show resolved Hide resolved
docs/scripts/add_version.py Outdated Show resolved Hide resolved
docs/scripts/add_version.py Outdated Show resolved Hide resolved
@AVHopp AVHopp force-pushed the docs/multi_version branch 2 times, most recently from 7a00ffe to 8682e7b Compare July 25, 2024 14:41
@AVHopp AVHopp marked this pull request as draft July 28, 2024 12:27
@AVHopp AVHopp force-pushed the docs/multi_version branch 3 times, most recently from 2c996a1 to 4f098cc Compare July 28, 2024 21:09
@AVHopp AVHopp force-pushed the docs/multi_version branch 4 times, most recently from e23935b to 6da823b Compare August 5, 2024 07:58
@AVHopp AVHopp marked this pull request as ready for review August 9, 2024 12:43
docs/scripts/utils.py Show resolved Hide resolved
docs/scripts/utils.py Show resolved Hide resolved
docs/scripts/utils.py Show resolved Hide resolved
docs/scripts/utils.py Show resolved Hide resolved
Copy link
Collaborator

@AdrianSosic AdrianSosic left a comment

Choose a reason for hiding this comment

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

Hi @AVHopp. Thanks for taking care of this. There is so much custom html stuff involved that it is really hard for me to review. But the main requirement are:

  1. it does its job
  2. you've tested it
  3. the code is in a clean enough form for you so that you won't freak out when we notice that another change is required in 2 weeks time :D

So I guess all that is fulfilled, so accept 🚀

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the hotfix logic is not yet explained in the PR description?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will include, do you want to check it then or just have it for the sake of it being documented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement Expand / change existing functionality new feature New functionality release This will be merged directly before the next release repo Requires changes to the project configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants