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

Documentation improvements #699

Merged
merged 83 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
105ac2b
Add a workflow to build the docs every commit
dkfellows Jul 23, 2024
9ff1606
Wrong working dir
dkfellows Jul 23, 2024
c7a3d50
More tweaking
dkfellows Jul 23, 2024
31dd4eb
Ah! I understand what I did wrong
dkfellows Jul 23, 2024
8b693c2
Add a problem matcher for Sphinx
dkfellows Jul 23, 2024
636a623
Fix an issue, start doing basic field docs
dkfellows Jul 23, 2024
539e778
More docs of basic things.
dkfellows Jul 24, 2024
7437457
pre-commit fixes [skip ci]
hpcflow-actions Jul 24, 2024
cb990b3
NumPy style, not base Sphinx style
dkfellows Jul 24, 2024
c6e9a42
Starting to document actions
dkfellows Jul 24, 2024
874db23
pre-commit fixes [skip ci]
hpcflow-actions Jul 24, 2024
87de3ea
More action docs
dkfellows Jul 24, 2024
77262e1
pre-commit fixes [skip ci]
hpcflow-actions Jul 24, 2024
652996c
Doc for Action
dkfellows Jul 25, 2024
2a2ab97
pre-commit fixes [skip ci]
hpcflow-actions Jul 25, 2024
245fe6b
More doc
dkfellows Jul 25, 2024
80844fd
pre-commit fixes [skip ci]
hpcflow-actions Jul 25, 2024
02409f5
Next set of docs
dkfellows Jul 26, 2024
4b0fe5e
pre-commit fixes [skip ci]
hpcflow-actions Jul 26, 2024
8a911fe
Basic doc improvements for elements
dkfellows Jul 26, 2024
c165c07
pre-commit fixes [skip ci]
hpcflow-actions Jul 26, 2024
b1f7f05
Doc for loops, improve object lists
dkfellows Jul 26, 2024
84fc336
pre-commit fixes [skip ci]
hpcflow-actions Jul 26, 2024
51ac276
Doc for parameters
dkfellows Jul 26, 2024
3744532
pre-commit fixes [skip ci]
hpcflow-actions Jul 26, 2024
63a38cc
More bits
dkfellows Jul 26, 2024
0cc24d3
pre-commit fixes [skip ci]
hpcflow-actions Jul 26, 2024
c251804
Doc for tasks
dkfellows Jul 29, 2024
919b88a
pre-commit fixes [skip ci]
hpcflow-actions Jul 29, 2024
471abe0
First round of improved docs for Workflows
dkfellows Jul 29, 2024
bf3fc05
pre-commit fixes [skip ci]
hpcflow-actions Jul 29, 2024
e2a3466
Missed bits, more docs
dkfellows Jul 30, 2024
8f9883e
pre-commit fixes [skip ci]
hpcflow-actions Jul 30, 2024
3afcf71
Starting to document the persistent stores
dkfellows Jul 30, 2024
63200c5
pre-commit fixes [skip ci]
hpcflow-actions Jul 30, 2024
f2b97e7
More persistence docs
dkfellows Jul 30, 2024
0d4fd51
pre-commit fixes [skip ci]
hpcflow-actions Jul 30, 2024
c3b4b71
Stores and schedulers
dkfellows Jul 30, 2024
9677ea1
pre-commit fixes [skip ci]
hpcflow-actions Jul 30, 2024
33d6170
Need another extension to pick up todos in doc comments
dkfellows Jul 30, 2024
008ddf0
Starting to describe submission shells
dkfellows Jul 30, 2024
630d617
More bits for submissions and shells
dkfellows Jul 31, 2024
8c14ee0
pre-commit fixes [skip ci]
hpcflow-actions Jul 31, 2024
4d2f9fc
Bleah
dkfellows Jul 31, 2024
b69a806
Next round of docs
dkfellows Jul 31, 2024
19c1fb6
pre-commit fixes [skip ci]
hpcflow-actions Jul 31, 2024
8760972
More bits of docs
dkfellows Jul 31, 2024
081edee
pre-commit fixes [skip ci]
hpcflow-actions Jul 31, 2024
8b7d136
Module-level doc comments
dkfellows Aug 5, 2024
c00565f
pre-commit fixes [skip ci]
hpcflow-actions Aug 5, 2024
03d8d89
More module docs
dkfellows Aug 5, 2024
d75b57c
More docs
dkfellows Aug 5, 2024
a9001c1
pre-commit fixes [skip ci]
hpcflow-actions Aug 5, 2024
1469a65
More docs
dkfellows Aug 5, 2024
fdfe85f
pre-commit fixes [skip ci]
hpcflow-actions Aug 5, 2024
2b57625
D'oh!
dkfellows Aug 5, 2024
82a7402
More docs
dkfellows Aug 5, 2024
c6ba23c
pre-commit fixes [skip ci]
hpcflow-actions Aug 5, 2024
0576099
Some missing docs
dkfellows Aug 13, 2024
5881b88
pre-commit fixes [skip ci]
hpcflow-actions Aug 13, 2024
14e7c77
Em-dash
dkfellows Aug 13, 2024
64017da
Add explicit anchors
dkfellows Aug 13, 2024
63465b5
Tweak docs
dkfellows Aug 13, 2024
34cf925
Resolving ambiguous cross-references
dkfellows Aug 13, 2024
905e4b3
More reference fixing
dkfellows Aug 13, 2024
224784f
Tweak
dkfellows Aug 13, 2024
867d95d
Document predefined types
dkfellows Aug 20, 2024
9b8003d
Missed a few fields
dkfellows Aug 21, 2024
add7d51
pre-commit fixes [skip ci]
hpcflow-actions Aug 21, 2024
7deccc7
More labels for attributes
dkfellows Aug 27, 2024
9b41c3f
Docs for some omitted attributes
dkfellows Aug 27, 2024
d775683
pre-commit fixes [skip ci]
hpcflow-actions Aug 27, 2024
ab8385a
Workaround for Click not being Sphinx-friendly
dkfellows Aug 27, 2024
1cd4774
pre-commit fixes [skip ci]
hpcflow-actions Aug 27, 2024
00baca5
Found a hacky way to get the help information
dkfellows Aug 27, 2024
9fe18aa
pre-commit fixes [skip ci]
hpcflow-actions Aug 27, 2024
7bc43a9
It works... if a #: comment is present.
dkfellows Aug 27, 2024
f469832
Docs for the CommitResourceMap
dkfellows Aug 28, 2024
bb5d946
Better magic descriptor for dataclass
dkfellows Aug 28, 2024
e91876f
Derp!
dkfellows Aug 28, 2024
387c745
Document the attributes of Config
dkfellows Sep 4, 2024
4971005
docs: update `ParallelMode` docs
aplowman Sep 23, 2024
773bc1b
Remove bonus colon!
dkfellows Sep 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/problem-matchers/sphinx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"problemMatcher": [
{
"owner": "sphinx-problem-matcher",
"pattern": [
{
"regexp": "^(.*):(\\d+):\\s+(\\w*):\\s+(.*)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4
}
]
},
{
"owner": "sphinx-problem-matcher-loose",
"pattern": [
{
"_comment": "A bit of a looser pattern, doesn't look for line numbers, just looks for file names relying on them to start with / and end with .rst",
"regexp": "(\/.*\\.rst):\\s+(\\w*):\\s+(.*)$",
"file": 1,
"severity": 2,
"message": 3
}
]
},
{
"owner": "sphinx-problem-matcher-loose-no-severity",
"pattern": [
{
"_comment": "Looks for file names ending with .rst and line numbers but without severity",
"regexp": "^(.*\\.rst):(\\d+):(.*)$",
"file": 1,
"line": 2,
"message": 3
}
]
}
]
}
44 changes: 44 additions & 0 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Documentation
env:
PYTHON_VERSION: "3.12"
POETRY_VERSION: "1.4"
on: push
jobs:
sphinx:
# Note that we only do this on one platform and with the earliest reasonable Python
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Init Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Init Poetry ${{ env.POETRY_VERSION }}
run: |
python -m pip install poetry==${{ env.POETRY_VERSION }}
poetry config virtualenvs.in-project true
poetry config installer.modern-installation false
- name: Cache Virtual Environment
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-sphinx-${{ env.PYTHON_VERSION }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
run: |
poetry install
- name: Configure Problem Matcher
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
# See: https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md
# See: https://github.com/python/cpython/pull/20325
- name: Run Sphinx
run: |
poetry run make clean html
working-directory: docs
- name: Upload documentation artifact
uses: actions/upload-artifact@v4
with:
name: hpcflow-documentation (${{ github.sha }})
path: docs/build/html
if-no-files-found: error
# TODO: Publish the docs to an internal site
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ def prepare_task_schema_action_info(app):
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx.ext.autosectionlabel",
"sphinx.ext.todo",
"sphinx_jinja",
"sphinx_copybutton",
"sphinx_click",
Expand Down
23 changes: 11 additions & 12 deletions docs/source/contribute/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ Recommended reads
Installation for development
============================

`Install poetry <https://python-poetry.org/docs/#installation>`_
----------------------------------------------------------------
`Install poetry <https://python-poetry.org/docs/#installation>`_ first.


Clone repo
Expand All @@ -27,14 +26,14 @@ Clone the git repo (see ssh links below), and then make sure that you switch to

This branch is protected, so create a feature branch before pushing to the repo.

hpcflow
.........
Checking out hpcflow
....................
::

git clone git@github.com:hpcflow/hpcflow-new.git

matflow
........
Checking out matflow
....................
::

git clone git@github.com:hpcflow/matflow-new.git
Expand Down Expand Up @@ -78,17 +77,17 @@ Open the virtual enviroment with::

poetry shell

hpcflow
--------
CLI
....
Working with hpcflow
--------------------

You can interact with the CLI by calling::

python3 hpcflow/cli/cli.py --help


matflow
--------
Working with matflow
--------------------

link to local hpcflow
......................
To be able to work with hpcflow and immediately see the changes reflected in matflow you need to reconfigure the hpcflow dependency to point to your local copy of hpcflow.
Expand Down
1 change: 1 addition & 0 deletions docs/source/user/how_to/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This help snippets guide you through common quick tasks in |app_name|.

Configuration <config>
Task Schemas <task_schemas>
Template Components <template_components>
Workflow Templates <workflow_templates>
Workflows <workflows>
Environments <environments>
2 changes: 1 addition & 1 deletion docs/source/user/how_to/workflows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ We support paths like:
* `ssh://user@host/path/to/workflow.json` for remote json
* `https://sandbox.zenodo.org/record/1210144/files/workflow.zip` for zenodo zarr-zip

You can convert a zarr store to a zarr-zip store using `Workflow.to_zip()`.
You can convert a zarr store to an archived zarr-zip store using `Workflow.zip()`.
9 changes: 8 additions & 1 deletion hpcflow/data/demo_data/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# required for `demo_data` to be accessible as a package resource in Python 3.8/3.9
"""
Data for the demonstration workflows.

Note
----
This is required for `demo_data` to be accessible as a package resource in
Python 3.8/3.9.
"""
3 changes: 3 additions & 0 deletions hpcflow/data/demo_data_manifest/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
Manifest for demonstration data.
"""
5 changes: 4 additions & 1 deletion hpcflow/sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import os
import sys

# classes used in the construction of a workflow:
#: Classes used in the construction of a workflow.
#: :meta hide-value:
sdk_classes = {
"Workflow": "hpcflow.sdk.core.workflow",
"Task": "hpcflow.sdk.core.task",
Expand Down Expand Up @@ -95,6 +96,8 @@
}

# these are defined as `BaseApp` methods with an underscore prefix:
#: Functions exported by the application.
#: :meta hide-value:
sdk_funcs = (
"make_workflow",
"make_demo_workflow",
Expand Down
Loading
Loading