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

Add documentation for the math syntax #456

Merged
merged 23 commits into from
Jan 9, 2024

Conversation

brynpickering
Copy link
Member

@brynpickering brynpickering commented Apr 21, 2023

Fixes issue(s) #423

Summary of changes in this pull request:

  • New section for inbuilt math documentation, given in long-form LaTex math syntax
  • New section for "custom" math, including component syntax documentation and usage examples
  • Rendered schema in the references section.
  • Clean-up of docs more generally:
    • move all generation scripts to become hooks. Docs still currently build <10 seconds even when all generation scripts (incl. math docs) are hooks. Benefit is that they follow a consistent syntax and we can remove one dependency (gen-files).
    • Fix docstrings using old RST format and add some docstrings for methods included in the API docs.
    • Split API docs into their own pages so they are easier to manage in the nav/ToC.
    • Split example custom math into their own pages, again so they are easier to manage in the nav/ToC.
    • Simplify method of accessing calliope version dynamically by leveraging PyYAML's python/name syntax.

Reviewer checklist:

  • Test(s) added to cover contribution
  • Documentation updated
  • Changelog updated
  • Coverage maintained or improved

@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3680cdc) 95.00% compared to head (6e8fb49) 95.18%.
Report is 2 commits behind head on main.

❗ Current head 6e8fb49 differs from pull request most recent head c7f7e40. Consider uploading reports for the commit c7f7e40 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #456      +/-   ##
==========================================
+ Coverage   95.00%   95.18%   +0.18%     
==========================================
  Files          24       24              
  Lines        3303     3305       +2     
  Branches      706      652      -54     
==========================================
+ Hits         3138     3146       +8     
+ Misses         96       92       -4     
+ Partials       69       67       -2     
Files Coverage Δ
src/calliope/attrdict.py 96.48% <100.00%> (+0.03%) ⬆️
src/calliope/backend/backend_model.py 97.66% <100.00%> (+2.25%) ⬆️
src/calliope/backend/expression_parser.py 97.14% <ø> (ø)
src/calliope/backend/helper_functions.py 97.75% <ø> (ø)
src/calliope/core/model.py 94.70% <100.00%> (ø)
src/calliope/exceptions.py 94.87% <ø> (ø)
src/calliope/postprocess/postprocess.py 90.32% <100.00%> (ø)
src/calliope/preprocess/load.py 92.40% <100.00%> (ø)
src/calliope/preprocess/time.py 88.57% <100.00%> (ø)
src/calliope/util/logging.py 93.87% <100.00%> (+2.76%) ⬆️

@jnnr jnnr linked an issue Apr 21, 2023 that may be closed by this pull request
@brynpickering brynpickering marked this pull request as ready for review January 2, 2024 12:10
docs/custom_math/components.md Outdated Show resolved Hide resolved
docs/custom_math/components.md Outdated Show resolved Hide resolved
docs/custom_math/components.md Show resolved Hide resolved
docs/custom_math/components.md Outdated Show resolved Hide resolved
docs/custom_math/components.md Outdated Show resolved Hide resolved
docs/math/index.md Outdated Show resolved Hide resolved
docs/math/index.md Outdated Show resolved Hide resolved
docs/math/index.md Outdated Show resolved Hide resolved
docs/hooks/generate_custom_math_examples.py Outdated Show resolved Hide resolved
mkdocs.yml Outdated Show resolved Hide resolved
sjpfenninger
sjpfenninger previously approved these changes Jan 9, 2024
@brynpickering brynpickering merged commit 5d81832 into main Jan 9, 2024
8 of 9 checks passed
@brynpickering brynpickering deleted the feature-document-math-syntax branch January 9, 2024 15:57
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

Successfully merging this pull request may close these issues.

2 participants