Skip to content

Commit

Permalink
Docs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Dec 12, 2024
1 parent 44b1e73 commit 0b63542
Show file tree
Hide file tree
Showing 2 changed files with 208 additions and 0 deletions.
204 changes: 204 additions & 0 deletions docs/everest/config_generated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,108 @@ Simulation settings

Defines which queue system the everest submits jobs to

**name (optional)**
Type: *Literal[<QueueSystem.TORQUE: 'TORQUE'>, 'torque', 'TORQUE']*




**max_running (optional)**
Type: *int*




**submit_sleep (optional)**
Type: *float*




**project_code (optional)**
Type: *Optional[str]*




**activate_script (optional)**
Type: *Optional[str]*




**qsub_cmd (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**qstat_cmd (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**qdel_cmd (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**queue (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**memory_per_job (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**num_cpus_per_node (optional)**
Type: *int*




**num_nodes (optional)**
Type: *int*




**cluster_label (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**job_prefix (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**keep_qsub_output (optional)**
Type: *bool*




**qstat_options (optional)**
Type: *Optional[str]*




**queue_query_timeout (optional)**
Type: *Optional[str]*





**resubmit_limit (optional)**
Type: *Optional[NonNegativeInt]*
Expand Down Expand Up @@ -1096,6 +1198,108 @@ requirements of the forward models.

Defines which queue system the everest submits jobs to

**name (optional)**
Type: *Literal[<QueueSystem.TORQUE: 'TORQUE'>, 'torque', 'TORQUE']*




**max_running (optional)**
Type: *int*




**submit_sleep (optional)**
Type: *float*




**project_code (optional)**
Type: *Optional[str]*




**activate_script (optional)**
Type: *Optional[str]*




**qsub_cmd (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**qstat_cmd (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**qdel_cmd (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**queue (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**memory_per_job (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**num_cpus_per_node (optional)**
Type: *int*




**num_nodes (optional)**
Type: *int*




**cluster_label (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**job_prefix (optional)**
Type: *Optional[Annotated[str, StringConstraints]]*




**keep_qsub_output (optional)**
Type: *bool*




**qstat_options (optional)**
Type: *Optional[str]*




**queue_query_timeout (optional)**
Type: *Optional[str]*






export (optional)
Expand Down
4 changes: 4 additions & 0 deletions src/everest/docs/generate_docs_from_config_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import inspect
import re
import sys
from typing import get_args

from pydantic.fields import FieldInfo

Expand Down Expand Up @@ -68,6 +69,9 @@ def parse_field_info(field_infos: dict[str, FieldInfo]):
r"List\[(.*)\.(\w+)\]", r"List[\2]", annotation
)
parsed_subfields = parse_field_info(subfields)
elif model_field.annotation:
for field in get_args(model_field.annotation):
parsed_subfields = parse_field_info(field.model_fields)

except Exception:
# If it failed, we simply assume the field was a str, int, float etc.
Expand Down

0 comments on commit 0b63542

Please sign in to comment.