Skip to content

Commit 08f28a6

Browse files
authored
Merge pull request #1180 from SciML/access_built_documentation
Add advice on checking built docs to dev documentation
2 parents c1b223d + 2716b2b commit 08f28a6

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
7.66 KB
Loading

docs/src/devdocs/dev_guide.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,26 @@ been installed by the package resolver had it not been capped, a patch release
3333
should be preferred. If the new release branch is branched from master, *it
3434
needs to ensure Project.toml caps are all ≥ to those listed in the previous
3535
Catalyst release branch*.
36+
37+
## Development advice
38+
39+
### Checking doc builds for errors
40+
When updating documentation, Catalyst will run any Julia code provided within example blocks to dynamically create figures and outputs. In addition to automatically creating these for us, it also provides an automatic check that all code in documentation is correct. Here, if any of the documentation code throws an error, the build job will fail. The documentation build job can be found at the bottom of a PRs conversation, here is an example of a failed one:
41+
![Failed builddocs link](../assets/devdocs/failed_builddocs_link.png)
42+
To check what errors were produced, click on the "Details" link of the job. Next, any errors can be found at the bottom of the "Build and deploy" section (which should be opened automatically).
43+
44+
### Inspecting documentation of a PR or branch
45+
When updating documentation it is typically useful to view the updated documentation in HTML format (which is the format users will see). Here, some errors are much easier to spot in html format as compared with the raw text files from which these are generated. There are two primary ways to view updated documentation, either by downloading them from the PR or by building the docs locally.
46+
47+
Whenever a PR to Catalyst is created, CI will create a corresponding documenter build job. If the build job passes, you can access the built documentation (which will be the new Catalyst documentation if the PR is merged) through the following steps:
48+
1. Click on "Details" in the documentation build job (at the bottom of the PR conversation tab).
49+
2. Expand the "Upload site as artifact" section.
50+
3. Click on the link at the end (which follows the "Artifact download URL: " text).
51+
4. This will download a zip folder containing the documentation. Extract it to a location on your computer and then open the "index.html" file.
52+
53+
To build the Catalyst documentation locally:
54+
1. Navigate to the ".julia/dev/Catalyst/docs/" folder and run the "make.jl" file using ">julia make.jl". Alternatively, open a Julia session, activate the "docs" environment, and run the file using `include("make.jl").
55+
2. Open the ".julia/dev/Catalyst/docs/build/index.html" file.
56+
57+
### Spellchecking in your code
58+
Especially when writing documentation, but also when writing normal code, it can be useful to have a spellchecker running through your texts. While code can be copied into a spellchecker and checked there (which is still useful to check grammar), it can also be very useful to (for users of VSCode) run the [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) extension. This will automatically provide simple spell-checking for code and documentation as you write it.

0 commit comments

Comments
 (0)