Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
ede81d1
Added new variables for efficiency of pf-coil power components
grmtrkngtn Feb 4, 2026
ef8d2e3
Updated the indices in loops to align with PROCESS style guide
grmtrkngtn Feb 4, 2026
c1b3831
updates the dosctring of new pf power variables
grmtrkngtn Feb 5, 2026
e9aaa12
Refactored pfpwr. Added new functions to calculate busbar, power supp…
grmtrkngtn Feb 5, 2026
b26b4cd
Added documentation for the changes to pf power accounting
grmtrkngtn Feb 10, 2026
91b22d0
Corrected unparsed variables
j-a-foster Feb 10, 2026
8f51ff7
Fixed subscripts in docs
j-a-foster Feb 10, 2026
5332df6
Removed unnecessary comments
grmtrkngtn Feb 11, 2026
42db87e
change ngrpt to n_pf_coil groups for clarity
grmtrkngtn Feb 11, 2026
0671d75
Updated index name for number of pf coils in each group
grmtrkngtn Feb 11, 2026
caeecef
Updated ii index to idx_circuit
grmtrkngtn Feb 11, 2026
8feead1
Updated jj index to idx_group
grmtrkngtn Feb 11, 2026
6c61b06
Updated jpf to idx_pf_coil, removed id_coil_in_group
grmtrkngtn Feb 11, 2026
6d5448c
Updated kk to idx_time
grmtrkngtn Feb 11, 2026
5d532b3
Updated ii to idx_time_interval
grmtrkngtn Feb 11, 2026
2032b8f
Updated ii to idx_circuit
grmtrkngtn Feb 11, 2026
1b908dd
Updated functions and calls to use the updated indexing
grmtrkngtn Feb 11, 2026
eb88315
Separate shield, vacuum vessel, and blanket calculations (#4064)
chris-ashe Feb 4, 2026
b6b401a
Move certain large test data to json files (#4084)
je-cook Feb 9, 2026
728a4b4
Move first wall geometry calculations into dedicated class (#4077)
chris-ashe Feb 10, 2026
230e386
Add plasma neutron surface power to output (#4087)
chris-ashe Feb 10, 2026
90edc92
Move beta calculations into separate class (#4053)
chris-ashe Feb 11, 2026
a9d1e0f
Fixed negativity in sqrt in costs.py by np.clip. (#4065)
OceanNuclear Feb 12, 2026
4afa759
Create physics inductance class (#4085)
chris-ashe Feb 12, 2026
a1b1796
Extend support for deuteron and triton in DetailedPlasma (#4088)
chris-ashe Feb 13, 2026
b511fe9
Merge remote-tracking branch 'origin/main' into 972-pf-power-supplies…
grmtrkngtn Feb 17, 2026
4364a98
reformatted total energy loss equation
grmtrkngtn Apr 9, 2026
07f212d
updated _pf_loss_storage_j to numpy docstring
grmtrkngtn Apr 9, 2026
55c3398
updated _pf_loss_powersupply_j to numpy docstring
grmtrkngtn Apr 9, 2026
8209454
updated _pf_loss_busbar_j to numpy docstring
grmtrkngtn Apr 9, 2026
0120116
updated _pf_loss_interval_total_j to numpy docstring
grmtrkngtn Apr 9, 2026
22e50bf
updated pfpwr docstring
grmtrkngtn Apr 9, 2026
5248478
updated pfpwr variables in line with style guide
grmtrkngtn Apr 9, 2026
1878e6d
updated pfbusr with res_pf_bus#
grmtrkngtn Apr 9, 2026
31a718f
Merge branch 'main' into 972-pf-power-supplies-accounting-2
grmtrkngtn Apr 9, 2026
88d8619
Tightened comments
grmtrkngtn Apr 9, 2026
095bc14
renamed index to a_pf_bus_cm
grmtrkngtn Apr 10, 2026
af71af8
Create diamagnetic current class (#4156)
chris-ashe Apr 9, 2026
defd5b8
Update CI regression docs (#4162)
clmould Apr 9, 2026
a135b59
Upgrade CLI to use click (#4105)
je-cook Apr 9, 2026
94a57f2
Use hatch run in CI for plotting summary (#4169)
timothy-nunn Apr 9, 2026
f112e24
Add FwBlktVVShape enum (#4167)
chris-ashe Apr 9, 2026
25a1184
Convert costs 2015 to new data structure (#4153)
clmould Apr 9, 2026
f4772c4
Move plot plasma current into summary.py (#4170)
timothy-nunn Apr 9, 2026
bdd92cc
Ensure njit is used in plasma fields (#4172)
chris-ashe Apr 10, 2026
ed24b3a
Remove unused configuration.py file (#4175)
je-cook Apr 10, 2026
79f831d
Fix stacked plots writing multiple files (#4068)
chris-ashe Apr 10, 2026
23266c6
Add `enum` for profile shape (#4180)
chris-ashe Apr 13, 2026
4755844
Upgrade pre-commit versions (#4178)
je-cook Apr 13, 2026
2a2e157
Corrected unparsed variables
j-a-foster Feb 10, 2026
7946050
Removed unnecessary comments
grmtrkngtn Feb 11, 2026
c61c6bd
Separate shield, vacuum vessel, and blanket calculations (#4064)
chris-ashe Feb 4, 2026
2303824
Move certain large test data to json files (#4084)
je-cook Feb 9, 2026
f81ac02
Move first wall geometry calculations into dedicated class (#4077)
chris-ashe Feb 10, 2026
e782901
Add plasma neutron surface power to output (#4087)
chris-ashe Feb 10, 2026
7af71e9
Move beta calculations into separate class (#4053)
chris-ashe Feb 11, 2026
08b8797
Fixed negativity in sqrt in costs.py by np.clip. (#4065)
OceanNuclear Feb 12, 2026
1b8b4fc
Create physics inductance class (#4085)
chris-ashe Feb 12, 2026
f71e108
Extend support for deuteron and triton in DetailedPlasma (#4088)
chris-ashe Feb 13, 2026
886e8c5
updated pfpwr docstring
grmtrkngtn Apr 9, 2026
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
16 changes: 11 additions & 5 deletions .github/workflows/process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ jobs:
regression-test:
runs-on: ubuntu-latest
needs: [tracking]
# depend on make and tracking job but dont skip if tracking was skipped
# depend on make and tracking job but don't skip if tracking was skipped
# run PROCESS on the regression test input files and compare results to the tracked files
if: always()
continue-on-error: true
strategy:
Expand All @@ -80,6 +81,8 @@ jobs:

run-tracking-inputs:
runs-on: ubuntu-latest
# run PROCESS on the regression test input files and archive output MFILEs
# only runs upon merge to main
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
Expand Down Expand Up @@ -114,10 +117,12 @@ jobs:
run: hatch run lint:fmt

tracking:
# update tracker to include the MFILEs created by the run-tracking-inputs job
concurrency:
group: tracking-jobs
cancel-in-progress: false
runs-on: ubuntu-latest
# depends on run-tracking-inputs; only runs upon merge to main
needs: run-tracking-inputs
if: github.ref == 'refs/heads/main'
env:
Expand Down Expand Up @@ -168,6 +173,7 @@ jobs:
group: docs-jobs
cancel-in-progress: false
runs-on: ubuntu-latest
# depends on tracking; only runs upon merge to main
needs: tracking
if: github.ref == 'refs/heads/main'
steps:
Expand All @@ -190,10 +196,10 @@ jobs:
name: tracked-mfiles
path: tracking/
- run: mv tracking/large_tokamak_nof.SIG_TF.json tracking/large_tokamak_nof_SIG_TF.json
- name: Create an example plot proc
run: hatch run python process/core/io/plot_proc.py -f tracking/large_tokamak_nof_MFILE.DAT
- name: Move plot proc file to docs images
run: mv tracking/large_tokamak_nof_MFILE.DATSUMMARY.pdf documentation/source/images/plot_proc.pdf
- name: Create an example plot summary
run: hatch run process plot summary -f tracking/large_tokamak_nof_MFILE.DAT
- name: Move plot summary file to docs images
run: mv tracking/large_tokamak_nof_MFILE.DATSUMMARY.pdf documentation/source/images/plot_summary.pdf
- run: hatch run docs:build
- name: Download tracking html
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
exclude: ^.*\.DAT$|.*\.dat$|.*\.tex$|.*\.PPF$|.*\.FLD$|.*\.ps$|ref_dicts.json$|.*\.md$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-merge-conflict

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.3
rev: v0.15.10
hooks:
- id: ruff
args: [--fix]
Expand All @@ -22,14 +22,14 @@ repos:
args: [--mapping, '2', --sequence, '4', --offset, '2']

- repo: https://github.com/biomejs/pre-commit
rev: v2.3.8
rev: v2.4.11
hooks:
- id: biome-format
types: [json]
args: [--indent-style=space, --indent-width=2, --line-width=89]

- repo: https://github.com/kynan/nbstripout
rev: 0.5.0
rev: 0.9.1
hooks:
- id: nbstripout
args: [--extra-keys=metadata.language_info.version]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
import plotly.graph_objects as go

import process.models.superconductors as superconductors
from process.models import superconductors

temp_c0max = 90.0 # Critical temperature (K) at zero field and strain
b_c20max = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
import plotly.graph_objects as go

import process.models.superconductors as superconductors
from process.models import superconductors

# Create a grid of temperature and field values
temp_conductor = np.linspace(1, 11.0, 50) # Temperature range (K)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
import plotly.graph_objects as go

import process.models.superconductors as superconductors
from process.models import superconductors

# Create a grid of temperature and field values
temp_conductor = np.linspace(1, 8.0, 50) # Temperature range (K)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
import plotly.graph_objects as go

import process.models.superconductors as superconductors
from process.models import superconductors

# Create a grid of temperature and field values
temp_conductor = np.linspace(4.2, 30.0, 50) # Temperature range (K)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
import plotly.graph_objects as go

import process.models.superconductors as superconductors
from process.models import superconductors

temp_c0max = 16.06 # Critical temperature (K) at zero field and strain
b_c20max = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
import plotly.graph_objects as go

import process.models.superconductors as superconductors
from process.models import superconductors

# Create a grid of temperature and field values
temp_conductor = np.linspace(4.2, 40.0, 50) # Temperature range (K)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
import plotly.graph_objects as go

import process.models.superconductors as superconductors
from process.models import superconductors

# Create a grid of temperature and field values
temp_conductor = np.linspace(1, 10.0, 50) # Temperature range (K)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
import plotly.graph_objects as go

import process.models.superconductors as superconductors
from process.models import superconductors

temp_c0max = 16.34 # Critical temperature (K) at zero field and strain
b_c20max = (
Expand Down
11 changes: 8 additions & 3 deletions documentation/source/development/ci-guide.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@

# GitHub Actions

Our GitHub actions Continuous Integration (CI) pipeline serves to ensure each branch and pull request conforms to our testing and style requirements. Due to the requirement of all stages on the built PROCESS artefacts and Docker image, all of our CI can currently be found in one workflow file: `process.yml`. A summary of each job within this workflow can be found below:
Our GitHub actions Continuous Integration (CI) pipeline serves to ensure each branch and pull request conforms to our testing and style requirements. All of our CI can currently be found in one workflow file: `process.yml`. A summary of each job within this workflow can be found below:

| Name | Functionality |
| ---- | ------------- |
| unit-test | Installs PROCESS and runs the unit tests. The job will fail if any of the unit tests fail. |
| integration-test | Installs PROCESS and runs the integration tests. The job will fail if any of the integration tests fail. |
| regression-test | Installs PROCESS and runs the regression tests with a 0% and 5% tolerance, respectively. The job will fail if any of the regression tests fail. |
| regression-test | Installs PROCESS and runs the regression tests with a 0.2% and 5% tolerance, respectively. The job will fail if any of the regression tests fail. The job uses tracked MFILEs for regression test comparisons. |
| run-tracking-inputs | Installs PROCESS and runs the regression test input files, archiving the output MFILEs. Only runs on the **main** branch. |
| tracking | Collects MFILEs for input files of interest and creates a dashboard of changes in key values over time (one datapoint for each commit on main). Only runs on the **main** branch. |
| pre-commit-quality-check | ensures the pushed code meets our standards as defined in `.pre-commit-config.yaml`. |
| docs | Builds and deploys the documentation onto GitHub pages. |
| docs | Builds and deploys the documentation onto GitHub pages. |

!!! Info "Regression Job"
When creating a PR, the tracked MFILEs from the point at which you branched off main will be used during the regression test job. This job may fail on your PR. If so, these changes to the output will need to be reviewed. If the changes are accepted (i.e. they come from a necessary change to a model), upon merge to main the
`run-tracking-inputs` job will run the regression input files to generate the associated MFILEs to be tracked by the
`tracking job`, and these will now reflect the changes your PR has introduced. Therefore when the regression job runs upon merge of your code into main, it will use these updated tracked MFILEs, and the regression tests will pass.
18 changes: 12 additions & 6 deletions documentation/source/development/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@ filename, then call a method to create a plot file, then check that the plot was

### Regression tests

Regression tests detect changes in the entire program's behaviour by checking that for a given
Regression tests detect changes in the entire program's behaviour by checking that for a given
input, it produces exactly the same output as before those changes. It detects changes in the
program's output. Therefore if your code changes the program's output, it will fail the regression
test. In this case that output difference will need to be reviewed and if accepted, the expected (or
reference) will be updated.
program's output. Therefore, if your code changes the program's output, it will fail the regression
test. In this case, that output difference will need to be reviewed and, if accepted,
the expected (or reference) output will be updated to reflect these changes when your code is merged into main.

Regression tests compare the output of PROCESS locally when running an input file to a reference output stored in a
[repository](https://github.com/timothy-nunn/process-tracking-data). The test suite will download the reference output for the commit where the your current branch branched off of main. This means **each branch is accountable for only its changes since it branched off of main**.
[repository](https://github.com/timothy-nunn/process-tracking-data). The test suite will download the reference output for the commit where the current branch branched off main. This means **each branch is accountable for only its changes since it branched off main**.


!!! Info "CI System"
Our tests are run automatically using the Continous Integration (CI) system on GitHub.
More information about how the jobs run on our CI and update the tracked files can be found [here](https://ukaea.github.io/PROCESS/development/ci-guide/).


## pytest

Expand Down Expand Up @@ -154,7 +160,7 @@ something has changed, in this case by >5%.
### Running the CI on a branch

When those local changes are committed and pushed, the CI system for the branch runs. This runs 5%
and 0% tolerance regression jobs, which are allowed to fail. This shows the author and reviewer
and 0.2% tolerance regression jobs, which are allowed to fail. This shows the author and reviewer
what the changes to the regression results are as a result of the code changes on that branch.

## Drawbacks to this approach
Expand Down
2 changes: 1 addition & 1 deletion documentation/source/eng-models/machine-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


Simplified scale diagrams of the vertical and horizontal cross-sections of the machine can be
output in the summary created by using the utility `plot_proc.py` (currently stored in `process/process/core/io`).
output in the summary created by using the utility `summary.py` (currently stored in `process/process/core/io/plot`).

The coordinate system is $(R,Z)$ system, where $R$ is the radial distance from the vertical
centreline (axis) of the torus, and $Z$ is the vertical distance from the equatorial midplane.
Expand Down
Loading