8000 :memo: Refactor documentation for adding variables and constraints in… by chris-ashe · Pull Request #3692 · ukaea/PROCESS · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

📝 Refactor documentation for adding variables and constraints in… #3692

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

Merged
merged 3 commits into from
Jun 17, 2025

Conversation

chris-ashe
Copy link
Collaborator
@chris-ashe chris-ashe commented Jun 16, 2025

This pull request updates the PROCESS documentation to reflect changes in the codebase as it transitions from Fortran to Python. The updates clarify how to add inputs, iteration variables, figures of merit, scan variables, and constraints in the Python-based framework. The most important changes include updates to variable initialization, iteration variable handling, figure of merit definitions, and scan variable configuration.

Updates for Python-based framework:

Input Variables:

  • Updated instructions for adding input variables, replacing Fortran-specific steps with Python-based processes. Examples now include Python code for defining variables in input.py and initializing them in .py files.

Iteration Variables:

  • Replaced Fortran-based iteration variable handling with Python instructions, including the use of the ITERATION_VARIABLES dictionary in iteration_variables.py.

Figures of Merit:

  • Updated the process for adding figures of merit to utilize the objective_function() method and the OBJECTIVES_NAMES dictionary in objectives.py.

Scan Variables:

  • Transitioned scan variable handling to Python, using the SCAN_VARIABLES dictionary in scan.py for configuration. Examples now reflect Python syntax.

Constraint Equations:

  • Clarified that constraint equations are now added to constraints.py and registered with the ConstraintManager, moving away from Fortran-based methods.… PROCESS code

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@chris-ashe chris-ashe self-assigned this Jun 16, 2025
@chris-ashe chris-ashe added the Documentation Improvements or additions to documentation label Jun 16, 2025
@chris-ashe chris-ashe linked an issue Jun 16, 2025 that may be closed by this pull request
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the documentation for adding variables and constraints by updating the instructions and examples to reflect the transition from a Fortran-based to a Python-based framework. Key changes include updated guidelines for input variables, iteration variables, figures of merit, and scan variables with Python code examples, as well as minor modifications to constraint equation instructions.

Comments suppressed due to low confidence (2)

documentation/proc-pages/development/add-vars.md:1

  • Typo in header: 'Variabales' should be 'Variables'.
# Guide for adding Variabales & Constraints

documentation/proc-pages/development/add-vars.md:61

  • Typo: 'derscription' should be corrected to 'description'.
4. Update the lablxc derscription in numerics.f90.

@codecov-commenter
Copy link
codecov-commenter commented Jun 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 38.13%. Comparing base (9201e19) to head (4dee33f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3692   +/-   ##
=======================================
  Coverage   38.13%   38.13%           
=======================================
  Files          88       88           
  Lines       22470    22470           
=======================================
  Hits         8570     8570           
  Misses      13900    13900           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

chris-ashe and others added 2 commits June 16, 2025 11:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@chris-ashe chris-ashe requested review from j-a-foster and removed request for timothy-nunn June 17, 2025 08:08
Copy link
Collaborator
@j-a-foster j-a-foster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with doc changes.

@chris-ashe chris-ashe merged commit b16c99a into main Jun 17, 2025
17 of 18 checks passed
@chris-ashe chris-ashe deleted the 1342-improve-documentation-for-adding-new-variables branch June 17, 2025 08:58
@chris-ashe chris-ashe mentioned this pull request Jun 18, 2025
OceanNuclear pushed a commit that referenced this pull request Jul 12, 2025
)

* 📝 Refactor documentation for adding variables and constraints in `PROCESS` code

* Update documentation/proc-pages/development/add-vars.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update documentation/proc-pages/development/add-vars.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve documentation for adding new variables
3 participants
0