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

Configs documentation plan #908

Open
atteggiani opened this issue Mar 26, 2025 · 12 comments
Open

Configs documentation plan #908

atteggiani opened this issue Mar 26, 2025 · 12 comments

Comments

@atteggiani
Copy link
Contributor

atteggiani commented Mar 26, 2025

Background

This issue is a starting point for a discussion and future planning on ACCESS-NRI documentation websites.

Currently, the only ACCESS-NRI documentation website is the Hive Docs (this repo).
However, as a topic started by @chrisb13, there is the need to have other websites for technical documentation related to various model config repos (an example is the ACCESS-OM3-configs repo, but this could be applied to any ACCESS-NRI model config repo).
Model config repo documentation will be referred to as config docs below.

Documentation framework

It was decided that, for consistency and to simplify development, the framework used to develop all documentation websites will be mkdocs, specifically the mkdocs-material theme (which is the one used for the Hive Docs website).

Requirements for config docs

  • Config docs will be stored within the related model config repo, within a docs folder, and therefore will be versioned together with model config repo versioning structure (using git tags). In this sense, config docs version and model config version refer to the same version and mean the same thing.
  • Model config repo tags are used for Zenodo citations, so the each config docs version would automatically be included on Zenodo
  • Documentation website should have latest version as default, but users should be able to select a past config docs version
  • CI/CD for automatic build and deployment (and PR previews) of the config docs (similar to current Hive Docs)
  • (Possibly) Config docs can be turned into a PDF (each version separately)

Website build/Layout/Design

We should aim for a consistent layout/design across websites (this has been already a point of discussion within the Hive Docs team).
For the Documentation websites (Hive Docs, config docs), since the plan is to use mkdocs-material, I think the best solution is to have a custom mkdocs-material build that is used to build all documentation websites. This common build would contain the basic website structure and layouts that are shared across all doc websites, with the possibility for each of them to still have website-specific design.

Deployment/Domain (URL)

We are currently using GitHub pages to deploy the Hive Docs. Currently it works great and we don't have to pay a hosting service (we only pay the domain - https://access-hive.org.au/).

Domain

GitHub pages doesn't allow multiple sub-domains (for example configs.access-hive.au and docs.access-hive.au) for the same user/organization.
What we can have is multiple sub-pages (e.g.: access-hive.au/configs/... , access-hive.au/docs/..., as it already happens for the Hive Docs development website and PR-previews websites).
I think this is our only option if we want to deploy the websites through GitHub pages.

Deployment through GitHub pages

Deployment for different builds (different mkdocs.yaml) under sub-pages of the same root domain is possible but there are drawbacks that need to be discussed. Some relevant ones are detailed in the paragraphs below.

GitHub Pages size limitations

GitHub pages have limitations. In particular:

  • Published GitHub Pages sites may be no larger than 1 GB.

This is not a strict rule as the current Hive Docs website, including the main website, development website and each PR-preview websites, are about 2GB now but the deployments succeeds, even though there is a warning message.

Even with optimisations implemented and with config docs websites that should not be bigger than 20-30 MB each, if we end up having multiple websites is likely we reach a point where the deployment will fail. Therefore, it is something we need to discuss.

Website deployment concurrency

For purpose of deployment, all documentation websites (Hive Docs + config docs) should be seen as one single website (composed by multiple more-or-less-separated sub-pages): for any sub-page to be re-deployed the whole website needs to be re-deployed. This also includes cases when PR-previews are deployed (basically each deployment, regardless how it was triggered, deploys the entire website).
However, only ONE single website is present at the same time by accessing the root URL (and any sub-pages), that corresponds to the latest deployed instance.
With multiple unrelated docs that need to be joined together for a single deployment, this generates concurrency problems (I will not go over all the details here but I'll be happy to explain further on this).
This point also needs a discussion.

Summary

I think having technical documentation for the model configs is very important.
To achieve a good user-experience and ensure seamless and simple (enough) documentation development process, I think addressing the points above is crucial and a proper discussion/planning is necessary.

@chrisb13
Copy link

chrisb13 commented Mar 27, 2025

Hi atteggiani,

Thanks for the detailed summary of some of the upcoming considerations regarding the access hive "config docs". Really exciting and helpful to better understand some of the technical issues ahead! Some further thoughts below.

develop all documentation websites will be mkdocs, specifically the mkdocs-material theme (which is the one used for the Hive Docs website).

Sounds good

Config docs will be stored within the related model config repo, within a docs folder

Yes, our starting point will be
https://github.com/ACCESS-NRI/access-om3-configs

but likely also (@blimlim @ccarouge)
https://github.com/ACCESS-NRI/access-esm1.6-configs

However, there is a related interest in creating some "model docs" for WOMBAT (@pearseb @dougiesquire), this will use mkdocs too but be more of a technical model description rather than specific configuration details. The plan is for that to live alongside the model code here:
https://github.com/aCCESS-NRI/gFDL-generic-tracers/

therefore will be versioned together with model config repo versioning structure (using git tags). In this sense, config docs version and model config version refer to the same version and mean the same thing.

@aekiss, made a good point about this. Ideally it would be more flexible. This is because we will likely want to update the docs at times when we are not updating the configs (e.g. fixing typos, user contributions etc). As we discussed @atteggiani this afternoon, it's a little tricky given that releases occur for specific config's. We'll need to think more about this.

  • Model config repo tags are used for Zenodo citations, so the each config docs version would automatically be included on Zenodo

As the above suggestion, yes, we'll want something like this but will need to think carefully about how we release a 'zenodo version'

  • Documentation website should have latest version as default, but users should be able to select a past config docs version
  • CI/CD for automatic build and deployment (and PR previews) of the config docs (similar to current Hive Docs)
  • (Possibly) Config docs can be turned into a PDF (each version separately)

Sounds perfect!

For purpose of deployment, all documentation websites (Hive Docs + config docs) should be seen as one single website
Sounds good.

GitHub pages doesn't allow multiple sub-domains (for example configs.access-hive.au and docs.access-hive.au) for the same user/organization.

Ok but I think it would be possible to do if we use a separate forwarding service? My reading of this* is that it might be possible with a "Project site", will look more into it.

*"Project sites, whether owned by an organization or a personal account, are unlimited."

What we can have is multiple sub-pages (e.g.: access-hive.au/configs/... , access-hive.au/docs/..., as it already happens for the Hive Docs development website and PR-previews websites). I think this is our only option if we want to deploy the websites through GitHub pages.

As we discussed @atteggiani this afternoon, we'll keep thinking about possible solutions.

@ccarouge
Copy link
Member

ccarouge commented Apr 2, 2025

It does not seem to be known but readthedocs is compatible with mkdocs. That is what we are using for the CABLE docs. We have chosen to go this route because of the versioning. Readthedocs is built to support versioning based on tags so it was the easiest route for us.
I am not saying that's what we should do for the configs, just making sure people know of the possible options.

A few links to see how it works and is setup if you are interested:
CABLE docs
readthedocs setup in CABLE repo. Our doc is using 2 tools: mkdocs for the User guide and FORD for API documentation from the source code itself. The setup for readthedocs in the yaml file is then more complicated than with just mkdocs but that shows fancier stuff is possible.
GitHub action to get the preview in PR. It adds a link to the preview doc at the bottom of the description box of the PR:

Image

@ccarouge
Copy link
Member

ccarouge commented Apr 2, 2025

After reading the limitations outlined in the first message, it looks it might be worth looking at readthedocs. Changing the whole setup is particularly annoying and I wouldn't recommend doing it without a good reason. From a coarse read of readthedocs doc and my poor understanding of websites, however, it seems readthedocs would solve some of the problems mentioned.

@atteggiani
Copy link
Contributor Author

atteggiani commented Apr 2, 2025

Thank you for the useful information @ccarouge!

Does readthedocs provide automatic hosting as well? How does it work?

I agree, mkdocs, mkdocs-material and readthedocs can be completely viable options and they have multiple plugins/extensions already available to handle most of our use cases (versioning from tags, documentation from code, etc.).

I think trying to standardize the framework used (for new docs) makes sense so whoever is working on that project/doc has an "easier" pathway forward because multiple things can be copied from other repos.
What I think is important is having a "unified" layout for the multiple ACCESS-NRI websites (Main website, Hive Docs, various config docs, etc.) so that they can all be somehow connected to ACCESS-NRI. This can be made easier by having a standardized way to develop/build the different docs.

In this specific case, for the versioning, what you do with CABLE can be achieved by using both readthedocs or mkdocs-material (I haven't tested but according to the documentation it should be too hard).
However, in this case what is needed is not a single version for the whole doc website, but multiple independent versions for different configurations included within the doc website (each configuration as a different page in a specific section of the website).
I don't think there is any built-in plugin that allows this. Therefore, independently from the framework chosen to write/deploy the documentation, we might need to implement a solution for this requirement.

@dougiesquire
Copy link
Contributor

I second just using readthedocs. Does everything really need to be part of access-hive.au? Is there an issue with just having links to urls for other related docs?

@atteggiani
Copy link
Contributor Author

atteggiani commented Apr 2, 2025

I second just using readthedocs. Does everything really need to be part of access-hive.au? Is there an issue with just having links to urls for other related docs?

Domains can be changed even for readthedocs (in case we want), so I don't see any issue with that.
We can definitely have links to the relevant docs within the Hive Docs.
The 2 main issues that remain (regardless of the framework used) are the ones I already pointed out in my previous message;

  1. Having a common basic layout (what the website looks like) for the ACCESS-NRI websites (so that they can be easily connected to ACCESS-NRI) (This is more-or-less-easily solvable with some CSS).
  2. Having multiple independent versioning system (from git tags) for different pages within the same doc website (I have no current easy solution for this)

@chrisb13
Copy link

chrisb13 commented Apr 2, 2025

I second just using readthedocs. Does everything really need to be part of access-hive.au? Is there an issue with just having links to urls for other related docs?

What's your thinking there @dougiesquire? It is just the set up faff?

Unsurprising at this point I suppose.. I'm in favour of using mkdoc. I think being close to the access-hive makes the user feel like there is fewer doc systems. So having a similar look and feel is useful, as is one team helping manage the same system. And my impression is that we have similar challenges in both systems. Davide and I have made some offline progress on the deployment issue so it's not as tricky as above posts appear.

Having a common basic layout (what the website looks like) for the ACCESS-NRI websites (so that they can be easily connected to ACCESS-NRI) (This is more-or-less-easily solvable with some CSS).

Out of scope (here) but I think this is an important one and it would be great to see that addressed.

Let's catch up on point 2.

@dougiesquire
Copy link
Contributor

What's your thinking there @dougiesquire? It is just the set up faff?

Unsurprising at this point I suppose.. I'm in favour of using mkdoc.

As @ccarouge points out, readthedocs can be used with mkdocs.

My thinking is the same as @ccarouge's: some of the difficulties flagged in an earlier post should be easily handled with readthedocs.

I'm quite possibly misunderstanding/oversimplifying something here, but the theme is something that is easy to change later. It would be a shame for details around how the docs look to get in the way of getting docs hosted somewhere.

@dougiesquire
Copy link
Contributor

Having multiple independent versioning system (from git tags) for different pages within the same doc website (I have no current easy solution for this)

Again, I'm probably misunderstanding the issue, but is this necessary if separate docs are hosted on separate websites?

@atteggiani
Copy link
Contributor Author

atteggiani commented Apr 2, 2025

I'm quite possibly misunderstanding/oversimplifying something here, but the theme is something that is easy to change later. It would be a shame for details around how the docs look to get in the way of getting docs hosted somewhere.

Yes I completely agree.

My point 1 here can definitely be addressed at a later time and should not block the development/hosting of the documentation.

If readthedocs supports mkdocs and solves the hosting problems, I don't see reasons not to go with it.
However, point 2 needs to be addressed, and I don't think readthedocs as a simple solution to it.

@dougiesquire
Copy link
Contributor

However, point 2 needs to be addressed, and I don't think readthedocs as a simple solution to it.

As above I'm not sure I understand the issue here. Can the docs for each repo (e.g. cable, wombat, om3-configs etc) be hosted and versioned independently and then linked to from access hive docs?

@atteggiani
Copy link
Contributor Author

atteggiani commented Apr 2, 2025

For Cable and Wombat yes.

For om3-configs (and any model config repo), there are multiple experiment configurations within the same repo, each versioned separately.

As an example, for ACCESS-ESM1.5-configs, there are:

  • release-historical+concentrations-1.2
  • release-historical+concentrations-1.1
  • release-historical+concentrations-1.0
  • release-preindustrial+concentrations-1.2
  • release-preindustrial+concentrations-1.1
  • release-preindustrial+concentrations-1.0

Similar patterns exist for ACCESS-OM2 and (in the future) for ACCESS-OM3.

Will in general the model config experiment configurations be updated at the same time?
Meaning that the latest versioning numbers will always be the same across each of the experiment configurations?

If that is the case, then there is a solution (but not as simple as Wombat or Cable), because the documentation version can be attributed to the latest experiment config version number: for example, documentation version 1.1 would refer to release-historical+concentrations-1.1, release-preindustrial+concentrations-1.1, and in general all experiment configurations version 1.1.

If the experiment configuration versioning is independent: for example the latest release-historical+concentrations is 1.2 but the latest release-preindustrial+concentrations might be 1.4 (as I think it it), this is not possible and we need to think of another solution for the model config repos.

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

No branches or pull requests

4 participants