Conversation
…ide (needs fixing still)
…xpected) fortran warnings
There was a problem hiding this comment.
Pull request overview
This PR restructures and expands the JANUS documentation using a Diátaxis-style layout, updates the MkDocs/Zensical-based site configuration and theme assets, and adds automation for building docs and installing SOCRATES.
Changes:
- Add new documentation sections/pages (How-to, Tutorials, Explanations, Reference, Community) and reorganize navigation accordingly.
- Introduce
tools/get_socrates.shhelper script for cloning/building SOCRATES with logging. - Update docs site build/deploy configuration (MkDocs config + GitHub Pages workflow) and add theme CSS/JS overrides.
Reviewed changes
Copilot reviewed 18 out of 23 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/get_socrates.sh | New helper script to clone/build SOCRATES with logging and simplified terminal output |
| mkdocs.yml | Reworked navigation + Material theme features, plugins, and extra assets for the new docs structure |
| docs/stylesheets/extra.css | Adds PROTEUS/JANUS branding and UI styling overrides for Material |
| docs/stylesheets/footnotes.css | Footnote styling tweaks and reduced spacing around titles/images |
| docs/proteus-framework.md | Adds a PROTEUS framework overview landing page within JANUS docs |
| docs/javascripts/header-links.js | Adds header click behavior to route users to a chosen “docs home” |
| docs/index.md | Updates docs homepage content and contribution links |
| docs/getting_started.md | Replaces install-centric page with a “quick path” + task chooser cards |
| docs/Tutorials/first_run.md | Adds a runnable “first run” tutorial based on the demo script |
| docs/Reference/publications.md | Adds a publications reference page |
| docs/How-to/test.md | Adds a testing guide describing how to run and interpret test coverage |
| docs/How-to/installation.md | Adds a standalone installation guide for JANUS + SOCRATES |
| docs/How-to/documentation.md | Adds documentation development instructions (local build/preview + structure) |
| docs/Explanations/model.md | Adds a detailed physical/model overview (equations + references) |
| docs/Community/contact.md | Adds contact/community channels page |
| docs/Community/CONTRIBUTING.md | Includes root CONTRIBUTING.md into docs site |
| docs/Community/CODE_OF_CONDUCT.md | Includes root CODE_OF_CONDUCT.md into docs site |
| docs/overrides/partials/extrahead.html | Removes the previous extrahead override (favicon handling moved to theme config) |
| README.md | Updates docs badge/linking and surfaces docs workflow + tests badge |
| .gitignore | Ignores built documentation output (site/) and local SOCRATES clone (socrates/) |
| .github/workflows/docs.yaml | Switches docs deployment to GitHub Pages artifact-based flow using Zensical build |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
| - uses: actions/cache@v4 | ||
| python-version: 3.x | ||
| - run: pip install zensical markdown-include pymdown-extensions mkdocstrings mkdocstrings-python |
There was a problem hiding this comment.
The workflow installs a bespoke set of doc build dependencies instead of using the repo’s declared docs extras (pyproject.toml [project.optional-dependencies].docs). This can easily drift (e.g., missing mkdocs-material required by theme: material in mkdocs.yml). Consider installing the package with its docs extra (or a pinned requirements file) to keep CI and local builds consistent.
| - run: pip install zensical markdown-include pymdown-extensions mkdocstrings mkdocstrings-python | |
| - run: pip install ".[docs]" |
| # and with code 255 when auth fails or no SSH key is present. | ||
| use_ssh=false | ||
| if ssh -T git@github.com 2>/dev/null; then | ||
| : # exit 0 would be unusual, but treat as success |
There was a problem hiding this comment.
In the SSH auth check, an exit code of 0 is treated as success in the comment, but use_ssh remains false, so the script will still select the HTTPS URI even though SSH worked. Consider setting use_ssh=true for both exit codes 0 and 1 (or invert the logic to explicitly detect the failure case only).
| : # exit 0 would be unusual, but treat as success | |
| use_ssh=true # exit 0 would be unusual, but treat as success |
| ./build_code 2>&1 | tee -a "$logfile" | grep -iE "error:|fatal error:|undefined reference|cannot find|ld returned" >&2 | ||
| build_exit=${PIPESTATUS[0]} |
There was a problem hiding this comment.
The build output filtering doesn't match the comment: tee -a "$logfile" still echoes the full build output to the terminal. If the goal is to only show matched error lines on the terminal, redirect tee's stdout away from the terminal (or avoid tee and write directly to the logfile while separately printing errors).
| ./build_code 2>&1 | tee -a "$logfile" | grep -iE "error:|fatal error:|undefined reference|cannot find|ld returned" >&2 | |
| build_exit=${PIPESTATUS[0]} | |
| ./build_code \ | |
| > >(tee -a "$logfile" >/dev/null) \ | |
| 2> >(tee -a "$logfile" | grep -iE "error:|fatal error:|undefined reference|cannot find|ld returned" >&2) | |
| build_exit=$? |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
nichollsh
left a comment
There was a problem hiding this comment.
Overall looks great! Thanks, Karen. I have some minor suggestions below to fix some typos.
We should think about how to consolidate these various get_socrates scripts, since there are now multiple versions across several different repositories. We could potentially host them all in the SOCRATES repo itself, and access the get_socrates.sh file with curl piped to sh.
Thanks Harrison, I see now I was a bit tired, so thanks for seeing the typos. |
Co-authored-by: Harrison Nicholls <32022679+nichollsh@users.noreply.github.com>
Co-authored-by: Harrison Nicholls <32022679+nichollsh@users.noreply.github.com>
Co-authored-by: Harrison Nicholls <32022679+nichollsh@users.noreply.github.com>
Co-authored-by: Harrison Nicholls <32022679+nichollsh@users.noreply.github.com>
|
Thanks, @stuitje! Happy for this to be merged. |
timlichtenberg
left a comment
There was a problem hiding this comment.
Great addition, thanks Karen! :)
Description
This PR updates JANUS' documentation with Zensical and adds substantial documentation using the Diataxis structure.
New pages
tools/get_socrates.sh, JANUS installation, data download, etcexamples/demo_runaway_greenhouse.pyExplanations/. Please take a look here as I struggled a bit. All feedback welcome.Reference/contact.mdTools
tools/get_socrates.sh: new helper script to clone and build SOCRATES, with build output logged tobuild.log, and only real errors printed to terminal