diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index af815998ef..0000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,357 +0,0 @@ -# Changelog -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [2.4.0] - 2022-05-18 -### Added -- Support for debug builds using `-DCMAKE_BUILD_TYPE=Debug` flag (#1277) - -### Changed -- Converted `pfcoil.f90` to Python (#1456) -- ChangeLog update procedure (#1574) -- Converted `pulse.f90` from Fortran to Python -- Converted `buildings_module.f90` to pure Python (#1552) -- Converted `water_usage.f90` to Python (#1570) -- Converted `machine_build.f90` to Python (#1576) -- Converted `kallenbach_module.f90` to Python, with the non-scanning part becoming utilities (#1579) -- Converted `structure.f90` to Python (#1538) -- Converted `costs.f90` to Python (#1637) - -### Fixed -- Bug where fpdivlim was being called for iteration variable 154 when it should be fne0 (#1659) -- thwcndut may now be input as zero. This is a conduit-free winding pack. -- Divertor's `run` method was not being called with `output=True` from `output.py` (#1553) -- Tracker's plotting inner loop should run over `set(titles)` to avoid running in `O(n)` opposed to `O(1)` (#1520) -- Fixed a typo in the implementation of `extended_plane_strain` from `sctfcoil.f90` (#1565) - -### Removed -- Removed Python 3.6 support in CI (#1490) -- Majority of `fispact` code (`lib/fispact/` and `fispact.f90`) as it is no longer used in PROCESS (#1650) - - -## [2.3.0] - 2022-01-20 -### Added -- Create scan notebook template (#1497) -- Create example Jupyter notebook (#1487) -- CS fatigue model (#1400) -- Tracking for cost model (#1344) - -### Changed -- Beta-norm and elongation aspect ratio dependence from Menard et al. 2016 (#1439) -- Convert tfcoil into Python/Hybrid Python-Fortran (#1452) -- Update LTS/HTS cost model (#1343) -- Convert costs step to pure python (#1448) -- Update HCD costs in cost model 2 (#1304) -- Elongation scaling aspect ratio stability margin (#1399) -- General PF coil placement (#1418) -- Axisymmetric extended plane strain (#998, #1414) - -### Fixed -- 5% regression test job missing values (#1503) -- N_cycle_fix (#1506) -- Plasma-side case of inboard TF coil (`casthi`) is neglected in computing radial stress distribution (#1509) -- Generalized plane strain TF coil stress model is not regression tested with a bucking cylinder (#1442) -- Resolve "REBCO current density incorrectly calculated (#1494) -- Resolve "Incorrect calculation of building sizes (#1395) - -## [2.2.0] - 2021-10-26 -### Added -- Add pumping variables as inputs for varying the efficiency of thermal to electrical conversion in develop-stable (#1374) -- Added xi_ebw input variable and set default value (#1371) -- Remove f90wrap from build process (#1397) -- Unit tests for costs_step added (#1372) -- Tracking for cost model (#1344) -- Convert caller.f90 to Python (#1354) -- EBW heating system (#1262) -- Call fcnvmc1 and 2 from Python (#1079) - -## Changed -- Fix the blnkith variable so that an Inboard blanket can be used whilst itart = 1 (Spherical Tokamak) (#1388) -- Elongation should be scaleable with aspect ratio (#1345) -- PROCESS TF geometry output issue (#1328) -- TF coil stress constraints using different limits for case and WP (#1327) -- Add centrepost nuclear heating to TF nuclear heating (#1331) -- Updated proc_plot.py for EBW plasma heating fix (#1387) -- change the formulae for the dittus-boelter eqn in tfcoil.f90 as it is wrong in develop-stable (#1375) -- Higher current density required in TF coil REBCO tape" - new sc material (#1350) -- Update of Shield Cost Calculations (#1407) -- PROCESS TF geometry output issue (#1328) -- Remove Cost Model 2 link to LSA (#1361) -- Issue 935 power plant water use (#935) -- Secondary EBW Heating Missing (#1324) - -## [2.1.2] - 2021-07-01 -### Added -- Add costs and temperature margin to Durham REBCO model (#1333) -- Parameterised regression test names added in pytest reporting (#1315) -- BoP cost for Cost model 2 (#1295) -- Add cryo-aluminium costing (#1272) -- Option to use toroidal beta in beta limit (#1290) -- Add array bounds check to Fortran compilation flags (#1294) - -### Changed -- cmake configuration step made more robust (#1326) -- Pf coil and BB cost model 2 update -- Enforced up/down symmetry in the vertical build for double-null - (#1309) -- Update indirect costs in cost model 2 (#1296) -- Update plot_scan tool labelling -- dcond dimension fix (#1297) -- Updated EBW gamma -- CMake build step fixed when using numpy v1.20.0 (#1258) - -## [2.1.1] - 2021-03-17 -### Added -- Adding the EBW scaling (#1262) -- Cost model 2 adds remote handing costs -- Cryopower constraint (#1120) -- Find a way to only review regression test diffs >5% (#1242) -- Adding the insulation effect to the Young modulus smearing in the - vertical direction -- Adding the scan plot utility -- Create tool for updating test references (#1239) - -### Changed -- Move to semantic versioning (#1241) -- Move obsolete_vars.py into Python package for Blueprint use (#1279) -- Joints heating error (#1264) -- Corrected some power accounting issues in creating the sankey diagram - (#1265) -- Plot ploc plotting (#1217) -- Break vmcon into smaller subroutines (#1078) -- Python-Fortran dictionaries not updating (#1235) -- Updated core references in documentation (#1247) - -## [2.1] - 2021-01-25 -### Added -- VMCON unit tests now run in test suite (#1077) -- Added ground insulation layer to resistive magnets (#1122) -- Implemented code coverage reporting for the regression tests (#?) -- Python 3.6 CI test jobs added (#1223) -- Added Flinter FORTRAN Code Quality Scoring (#?) - -### Changed -- Inboard and outboard vacuum vessel thickness variables changed (#433) -- New fixed turn cable size formulation (#1182) - -### Removed -- Removed Freia support: now untested in CI (#1211) - -## [2.0] - 2020-12-17 -### Bug Fixes -- Issue 1029 compiler warning on n contact tot (#1029) -- Fixed bug in TorGA interface which breaks under GFortran-10 (#?) -- Handle zero value in IN.DAT writer (#1101) -- Latest markdown version breaks Ford on develop (#1145) -- CMakeLists.txt not working with ; in commit message (#1089) -- HTML introduced into IN.DAT comments (#1124) -- Fixes Failing Tests on Freia (#?) - -### Features -- Connecting process output with other codes using json files (#1017) -- Allow Process to be installed as a Python package (#1013) -- Cryo-aluminium magnet model updates (#1016) -- Issue 1021 install script (#1021) -- Issue 999 New coil module for stellarator.f90 (#999) -- Issue 1015 costing (#1015) -- Issue 1010 LH (#1010) -- Issue 1035 JSON DN (#1035) -- Issue 1031 bucked and wedged (#1031) -- Issue 1044 wp geometry (#1044) -- Durham Nb-Ti model based on Ginsburg-Landau theory (#?) -- Issue 1053 resistive magnet updates (#1053) -- Issue 1063 ip warn (#1063) -- Issue 1054 sc cp neutronic shielding (#1054) -- Issue 1086 Elongation and Triangularity (#1086) -- Add Steady-State DEMO documentation and test suite (#?) -- Issue-1114 (#1114) -- Issue 1132 resistive model stability (#1132) -- Issue 1085 durham rebco v1 (#1085) -- Issue 1168 plot proc with rebco (#1168) -- issue-1171 : Adding the shield (#1171) -- Issue 1167 cost model 2 scalings (#1167) -- Adding a line setting the TF coil (#1165) -- Issue 866 ripple for resistive TF coils & 1143 sidewall thickness parametrization (#866) -- Convert project to Python-wrapped Fortran (#1092) - -### Minor Changes -- Real declarations in PROCESS (#1027) -- Make subroutines/functions explicitly use module variables (#980) -- Updated base docker image Dockerfile for PROCESS (#1108) -- Use find_package macro to locate GTest, removing need for GTEST_DIR Env variable (#?) -- Issue 1175 (#1175) -- Issue 899 error handling (and other issues detailed on commit messages) (#899) - -### Documentation updates -- Tidy docstrings to Ford format (#1026) -- Issue 944 updating gitpages (#944) -- Issue 1002 pl scenario docs (#1002) -- Get variable descriptions from inside the Ford site to display in gitlab pages (#948) -- Remove unwanted and empty modules from vardes (#1040) -- Issue 944 updating gitpages (#944) -- Large commented section in `initial.f90` (#1103) -- Issue 1125 st documentation update (#1125) -- Correcting relative path for included image (#1163) -- Issue 1173 update developper documentation (#1173) -- Issue 1179 update tf ripple doc (#1179) - -## 1.0.17 - -### Bug Fixes - -### Features -- Restored IFE (Issue #901) -- GitLab pages now hosts the autodoc html output (only develop) (issue #418) -- Git branch now in output file (#912) -- CI jobs now run for cmake custom targets -- Added diamagnetic and Pfirsch-Schlüter current scalings #992 - -### Minor Changes -- Renamed 'test_files' to 'unit_tests' #972 - -### Documentation update - - -## 1.0.16 - -### Bug Fixes - -- Fixed units issue with Lang et al. (2012) confinement scaling (#821) -- Fixed issue with error numbering (#826) -- Fixed issue with costing of TF coil dump resistors (#847) - -### Features - -- new command line argument `./process.exe help` provides help info -- new CMake option `-Ddll=ON/OFF`. Default is `ON`. Useful for profiling with gprof -- Updated version of Kallenbach testing (now can run test case that matches Kallenbach - paper or user defined inputs). See Userguide for more info. -- Updated version of Kallenbach scanning (now can specify the variable to scan - from a selection, number of scan points etc.). See Userguide for more info. -- Added NSTX and NSTX-Petty08 confinement time scalings (#820) -- Added option to input the confinement time -- Added a new spherical tokamak plasma current relation based on FIESTA fitting -- CI now runs on all branches named "issue-*" -- Unit tests incorporated into main branch - -### Minor Changes - -- Increased the number of scan points to 1000 (issue #809) -- For issue #379 constraint 52 now gives warning for iblanket=1 -- Updated FNSF test case (#822) -- Removed obsolete variable estotf (#199 #847) - -### Documentation update - -- Developper documentation update (code description/compilation/git instructions) - -## 1.0.15 - -### Bug Fixes -- Added emultmw calculation to stellarator and fixed power balance errors (Issue #783) -- Amended fpump* output to match with primary_pumping options. -- Corrected power crossing the separatrix for stellarators (Issue #787) -- Changed Connor-Hastie plasma current model to kappa95 and triang95% (Issue #791) - -### Features -- HTS REBCO model final version implemented -- Can now limit the CS peak field to be below set maximum -- Added Hubbard 2012 and 2017 I-mode threshold scaling -- Added Hubbard I mode confinement time scaling -- Added I-mode version of Reinke criterion (fzmin) -- New figure of linear combination figure of merit. Linear combination (50/50 - weighted) of $`Q`$ and $`t_{burn}`$. -- I mode scalings for confinement time and L-I power threshold from Hubbard 2017. -- New utility called `plot_profiles.py`. Plots T and n profiles for a list of given MFILES. -- Can now setup the repo in `debug` mode for compilation. See `README.md` for instructions. -- New scan variables - `impurity_ratio(9)` and `fgwsep`. -- New constraint on CS peak field. - -### Minor Changes -- Explicitly state 1990 $ for old cost model -- Made photon_wall and rad_fraction global variables, and added calculations to stellarator. -- TF coil documentation now in repository and makefile target `tfdoc`. - -## 1.0.14 - -### Bug Fixes - -- Wrong pedestal position used in plot_proc temperature plot (Issue #653) ([957f94a7](https://git.ccfe.ac.uk/process/process/commit/957f94a723b026f67544fa46548bc8a1be062d35)) -- Removed hardwired Martin scaling for L-H threshold in plot_proc.py (Issue #679 and #680) -- Fixed error in spherical tokamak divertor geometry calculation (Issue #697) -- Fixed error in spherical tokamak radial build calculation (Issue #704) -- Fixed error in current drive fractions adding to > 1 (Issue #705). -- Fixed issues with uncertainty python utility (Issue #716 #746) -- Fixed issues when there is no inboard blanket (Issue #722 #732) -- Fixed incorrect cross sectional area calculation in resistive TF coils (Issue #727) -- Fixed constraint equations plot in diagnose_process.py (Issue #738) -- Corrected units in resistive TF coil stress output -- Corrected units on ucme and uciac in global variables. -- Fixed issue with plot_proc.py scan counting (Issue #748) -- Fixed issue with run_process.py not working (Issue #766) -- Switched obsolete estotf for estotftgj in stellarator -- Corrected ztot calculation in tfpwr subroutine for resistive TF coils (#773) -- Corrected deltf in sctfcoil.f90 (#779) - -### Features - -PLASMOD - - PLASMOD is a 1D transport model which replaces many of the plasma physics calculations in PROCESS. The previous set up remains available. - - See reference: E. Fable et al., Fusion Engineering and Design, Volume 130, May 2018, Pages 131-136 - - PLASMOD can be run during every PROCESS iteration by setting ipedestal to 3. It can be run just once, at the end of a PROCESS run by setting ipedestal to 2. - - - Created a new file 'physics_functions.f90' to store code moved from physics.f90 which may be used by PLASMOD and other semi-independent models. - - This is to prevent circular dependencies. - - Subroutines include: beamcalc, beamfus, imprad, palph, palph2, prad_ipdg89, psync_albajar_fidone, pthresh, radpwr - - Functions include: bosch_hale, fsv, p_eped_scaling, t_eped_scaling, - - - New user-defined inputs have been added, which all have the prefix 'plasmod_'. These are specific controls and inputs to PLASMOD. - - For a complete list, see the vardes file. Where appropriate, previously-existing PROCESS input parameters still apply. - - Certain constraints and iterations variables cannot be used with PLASMOD - see the User Guide for more information. - -2D Scan - - implemented a basic 2-D scan feature in PROCESS. - - new inputs `scan_dim`, `isweep_2`, `nsweep_2` and `sweep_2`. - - Does the scan in a basic grid like manner (i.e. jumps to start of next row from end of previous). Would be nice to upgrade to 'zig-zag'-like approach. - -Utilities - - New script compare_radials.py to plot two radial profiles on the same chart for comparison. Takes input columns of data representing the profiles, with the first column being the x-axis, e.g. radial position. - - evaluate_uncertainties.py now outputs and additional file to allow analysis of failed PROCESS Runs. - - New script plot_sankey.py to plot a Sankey diagram of the PROCESS power flow - - New scripts cost_pie.py and cost_bar.py to analyse cost data. - - New script popcon.py to plot POPCON plot from MFILE. - -Miscellaneous -- TF stress in conduit Tresca criterion can now have regular and CEA adjusted options - (adjustment from [Torre et al. 2016](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=7390035) - paper). (Issue #678) -- [Snipes et al.](2000; http://iopscience.iop.org/article/10.1088/0741-3335/42/5A/336) H-mode threshold scaling options added (Issue #680) -- Initial version of `.gitlab-ci.yml` created for GitLab CI. -- Added Spherical Tokamak and Stellarator examples to the test suite (Issues #715 and #718) -- Output to MFILE variable names for cost models -- Added [Reinke detachment criterion](http://iopscience.iop.org/article/10.1088/1741-4326/aa5145/meta) as constraint equation and formula for tesep (Issue #707) - -### Minor changes - -- Changed upper bound on `coheof` from 1.0e8 to 5.0e8 (Issue #668). -- A number of changes to `plot_proc.py` and outputs in the fortran associated - with vertical build. (Merge request !18) -- Update utilities guide for a number of Python utilities - - `cad_output.py` (Issue #671) - - `convert_in_dat.py` (Issue #672) - - `mcnp_output.py` (Issue #674) - - `output_summary.py` and `output_detailed.py` (Issue #675) - - `plot_comparison.py` (Merge request !21) -- New Python utility - - `plot_comparison.py` (Merge request !21) -- File prefixes for input files now works as intended. For example input file called `my_input_IN.DAT` - will be outputted as `my_input_OUT.DAT` etc. -- `tbrnmn` no longer iteration variable as there is constraint equation 13 and f-value `ftburn` already. `tbrnmn` will act as the constraint limit input value. -- `cdtfleg` no longer an iteration variable. The outboard leg current density is now calculated for resistive TF coils. (Issue #727) -- `tfacpd` is now calculted for resistive TF coils so is no longer an input. -- Reset test_suite files (Issue #719) -- Added error reporting to function ncore (Issue #735) -- Added input `plasma_res_factor` for adjustment factor for plasma resistivity. Default is 1.0 to preserve old behaviour. -- Added additional scaling factor 'eped_sf' for the EPED pedestal model (pressure and temperature versions). -- Slight change to functionality of utilities/write_new_in_dat.py: This script will no longer create a new IN.DAT from a non-feasible solution. If a scan is run, it will take by default the last feasible solution. If required there is also an option to use the first feasible solution from a scan (Issue #752). -- Made more robust the reading of input files - comments are now denoted only via an asterisk (*), and if a comment is present without an asterisk the reading of the input file will stop (previously it simply ignored constraint equations and iteration variables that could not be read). It is no longer permissible to write an input over multiple lines. Users can now use punctuation in comments as they wish, including full stops and commas. -- Stellarator radial build is output to MFILE (Issue #770) diff --git a/changelog_update/.gitignore b/changelog_update/.gitignore deleted file mode 100644 index e115bec3eb..0000000000 --- a/changelog_update/.gitignore +++ /dev/null @@ -1 +0,0 @@ -changelog_update.md \ No newline at end of file diff --git a/changelog_update/1267.yaml b/changelog_update/1267.yaml deleted file mode 100644 index 8a5492a6c2..0000000000 --- a/changelog_update/1267.yaml +++ /dev/null @@ -1,10 +0,0 @@ -Added: -- new plotting script hdf_to_scatter_plot.py -Changed: -- all uncertainty tools consolidated into uncertainties_evaluate.py -Deprecated: -- /utilities/morris_method.py /utilities/sobol_method.py -Fixed: -- Fixes the uncertainty tools (#1267) -Removed: -- \ No newline at end of file diff --git a/changelog_update/1320.yaml b/changelog_update/1320.yaml deleted file mode 100644 index cd74084b16..0000000000 --- a/changelog_update/1320.yaml +++ /dev/null @@ -1,10 +0,0 @@ -Added: -- Python script (and example Jupyter notebook) to read from MFILE and write to csv (#1320) -Changed: -- -Deprecated: -- -Fixed: -- -Removed: -- \ No newline at end of file diff --git a/changelog_update/1539.yaml b/changelog_update/1539.yaml deleted file mode 100644 index 75fc00b76c..0000000000 --- a/changelog_update/1539.yaml +++ /dev/null @@ -1,10 +0,0 @@ -Added: -- -Changed: -- Converted plant_python.f90 to Python -Deprecated: -- -Fixed: -- -Removed: -- \ No newline at end of file diff --git a/changelog_update/1559.yaml b/changelog_update/1559.yaml deleted file mode 100644 index 642c266862..0000000000 --- a/changelog_update/1559.yaml +++ /dev/null @@ -1,10 +0,0 @@ -Added: -- -Changed: -- Boundary conditions set to 'drsep' to prevent infinity being returned as a value (#1559) -Deprecated: -- -Fixed: -- -Removed: -- \ No newline at end of file diff --git a/changelog_update/1606.yaml b/changelog_update/1606.yaml deleted file mode 100644 index 3face2764b..0000000000 --- a/changelog_update/1606.yaml +++ /dev/null @@ -1,10 +0,0 @@ -Added: - - -Changed: - - Converted divertor_ode.f90 to Python -Deprecated: - - -Fixed: - - -Removed: - - diff --git a/changelog_update/1612.yaml b/changelog_update/1612.yaml deleted file mode 100644 index 974b59de3b..0000000000 --- a/changelog_update/1612.yaml +++ /dev/null @@ -1,10 +0,0 @@ -Added: -- Collision detector between PF and TF coils for picture frame coils. Will raise a level 2 error to the user (#1612) -Changed: -- -Deprecated: -- -Fixed: -- -Removed: -- \ No newline at end of file diff --git a/changelog_update/1659.yaml b/changelog_update/1659.yaml deleted file mode 100644 index f5117f33ba..0000000000 --- a/changelog_update/1659.yaml +++ /dev/null @@ -1,10 +0,0 @@ -Added: -- -Changed: -- -Deprecated: -- -Fixed: -- Bug where fpdivlim was being called for iteration variable 154 when it should be fne0 (#1659) -Removed: -- \ No newline at end of file diff --git a/changelog_update/1701.yaml b/changelog_update/1701.yaml deleted file mode 100644 index 0809a7cbab..0000000000 --- a/changelog_update/1701.yaml +++ /dev/null @@ -1,10 +0,0 @@ -Added: -- -Changed: -- Thermal shield thickness now set using 3 inputs for thshield - inboard, outboard, vertical (i.e upper and lower) (#1701) -Deprecated: -- -Fixed: -- -Removed: -- \ No newline at end of file diff --git a/changelog_update/1723.yaml b/changelog_update/1723.yaml deleted file mode 100644 index 7ba1637e0f..0000000000 --- a/changelog_update/1723.yaml +++ /dev/null @@ -1,10 +0,0 @@ -Added: -- TF coil can now be placed inside the CS with the tf_in_cs switch (#1723) -Changed: -- -Deprecated: -- -Fixed: -- -Removed: -- \ No newline at end of file diff --git a/changelog_update/1726.yaml b/changelog_update/1726.yaml deleted file mode 100644 index f93daa362a..0000000000 --- a/changelog_update/1726.yaml +++ /dev/null @@ -1,10 +0,0 @@ -Added: -- -Changed: -- Added switch (i_hldiv) to turn on or off (divtart) divertor model. Allows user set hldiv value (#1726) -Deprecated: -- -Fixed: -- -Removed: -- \ No newline at end of file diff --git a/changelog_update/1735.yaml b/changelog_update/1735.yaml deleted file mode 100644 index 3cadff7e9e..0000000000 --- a/changelog_update/1735.yaml +++ /dev/null @@ -1,10 +0,0 @@ -Added: -- Added new divertor heat load model from Wade paper (2020) (#1735) -Changed: -- -Deprecated: -- -Fixed: -- -Removed: -- \ No newline at end of file diff --git a/changelog_update/1736.yaml b/changelog_update/1736.yaml deleted file mode 100644 index f81755c0f2..0000000000 --- a/changelog_update/1736.yaml +++ /dev/null @@ -1,10 +0,0 @@ -Added: -- Added Accounts 12 and 13 (Site Permits and Plant Licensing, respectively) to costs_step.py; updated test suite accordingly (#1736) -Changed: -- -Deprecated: -- -Fixed: -- -Removed: -- \ No newline at end of file diff --git a/changelog_update/1742.yaml b/changelog_update/1742.yaml deleted file mode 100644 index e58d3e1905..0000000000 --- a/changelog_update/1742.yaml +++ /dev/null @@ -1,12 +0,0 @@ -Added: -- -Changed: -- -Deprecated: -- -Fixed: -- -Removed: -- a_to_b.py (survey detected as unused utility) -- build_index.py (survey detected as unused utility) -- cad_output.py (survey detected as unused utility) \ No newline at end of file diff --git a/changelog_update/1745.yaml b/changelog_update/1745.yaml deleted file mode 100644 index a11cd3a2b2..0000000000 --- a/changelog_update/1745.yaml +++ /dev/null @@ -1,10 +0,0 @@ -Added: -- User can now input the plasma fuel burnup fraction using burnup_in (#1745) -Changed: -- -Deprecated: -- -Fixed: -- -Removed: -- \ No newline at end of file diff --git a/changelog_update/README.md b/changelog_update/README.md deleted file mode 100644 index c791109a5a..0000000000 --- a/changelog_update/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Instructions for the RSE updating the CHANGELOG on Process Upversioning - -### Step 1 -*This process should only be followed upon PROCESS upgrade i.e. from `2.4.0` to `2.5.0`.* - -The Python script uses `ArgParse` with the argument `version` to specify the version being unversioned to. This requires an extra argument to be included in the command when running the script. It takes a string as the `version` argument. For example, if you were up versioning to Process 2.5.1, you would use the following to run the Python script: - -From the terminal, run: -```bash -python changelog_update/changelog_upversion.py 2.5.1 -``` -This script will take the .yaml files in the `changelog_update` directory and using the jinja2 template, will combine the changes since the last Process upgrade by header as defined in the changelog dict (the headers seen above). - -A markdown file- `changelog_update.md`, will be created in the same directory and all the YAML files will be removed so they cannot be uploaded more than once. - -### Step 2 -Navigate to the `changelog_update.md` file which should include the new version number (as input by you as an argumument in the command line), the date of the running of the script (should be today), and then the content of the changes since the last upgrade. - -Now, the content of this file should be copied and pasted into the CHANGELOG.md file that already exists in the process root directory. \ No newline at end of file diff --git a/changelog_update/changelog_template.jinja2 b/changelog_update/changelog_template.jinja2 deleted file mode 100644 index 6e663e91c6..0000000000 --- a/changelog_update/changelog_template.jinja2 +++ /dev/null @@ -1,4 +0,0 @@ -## [{{process_version}}] - {{date_of_upversion}}{% for header in changelog_dict %} -### {{header}}{% for changelog_entry in changelog_dict[header] %} -- {{changelog_entry}}{% endfor %} -{% endfor %} diff --git a/changelog_update/changelog_upversion.py b/changelog_update/changelog_upversion.py deleted file mode 100644 index 6ed7ed0374..0000000000 --- a/changelog_update/changelog_upversion.py +++ /dev/null @@ -1,93 +0,0 @@ -import argparse -import sys -import yaml -import jinja2 -from pathlib import Path -from datetime import date - - -CURRENTDIR = Path(__file__).resolve().parent -# List of all .yaml files in the current directory. - -if __name__ == "__main__": - - yaml_files = CURRENTDIR.glob("*.yaml") - - parser = argparse.ArgumentParser( - description="Create the Changelog markdown for a new Process release" - ) - parser.add_argument("version", type=str, help="New version of process") - args = parser.parse_args() - - # Creating the version argument to be used in the command line so the user can define which version of Process is being implemented - - changelog_dict = { - "Added": [], - "Changed": [], - "Deprecated": [], - "Fixed": [], - "Removed": [], - } - - # Defining the changloge dictionary that is the same structure as the yaml files that users have generated using the - # create_changelog.py script. Each header is able to have mutliple changes. - - for file in yaml_files: - with open(file, "r") as stream: - try: - yaml_file = yaml.safe_load(stream) - - for header in changelog_dict: - changelog_dict[header] += yaml_file[header] - - except yaml.YAMLError: - print( - f"Failed to open and include content of {file} - please check headers match changelog_dict and that the structure of your yaml file matches that in `README.md` (i.e. space between hyphen and entry)." - ) - sys.exit() - - # Looping through and reading YAML files in CURRENTDIR - # Here, headers are the different values under which an entry to the changelog can be made i.e 'Fixed', 'Removed' etc. The script will exit - # if the structure of one of the .yaml files is incorrect. - - for header in changelog_dict: - changelog_dict[header] = [ - entry for entry in changelog_dict[header] if entry is not None - ] - - changelog_dict = { - header: entries for header, entries in changelog_dict.items() if entries - } - - # Only keeping the headers in the changelog dictionary if they have a changelog entry associated with them. - # So if the 'Added' header has no entries between the .yaml files, it is not included in the changelog dict for use in the changelog. - - environment = jinja2.Environment( - loader=jinja2.FileSystemLoader(str(Path(__file__).resolve().parent)) - ) - - template = environment.get_template("changelog_template.jinja2") - - context = { - "date_of_upversion": date.today(), - "process_version": args.version, - "changelog_dict": changelog_dict, - } - - # The changelog_template.jinja2 file holds the structure for producing the markdown file that is the output of this script. - # It creates a .md file with the headers and values from users' yaml scripts and is then available for copy and pasting into the - # changelog upon process upversioning. It takes todays date so you know when the script/changelog was updated and asks the user - # for the version of process that is being utilised in the upgrade via the command line ArgParse method. - - with open(CURRENTDIR / "changelog_update.md", "w") as f: - f.write(template.render(**context)) - - # Using the above logic, a file named 'changelog_update.md' is output in the CURRENTDIR- a markdown file. - - files_to_remove = CURRENTDIR.glob("*.yaml") - for f in files_to_remove: - f.unlink(missing_ok=True) - - # Checks the files in the CURRENTDIR after creating the changelog_update.md file for this upversion. It then finds which - # are .yaml files and removes them so that once they are uploaded, they are not stored and get uploaded twice in the next merge. - # This is safe as if the .yaml files did need to be accessed they would be in a previous commit. diff --git a/changelog_update/create_changelog.py b/changelog_update/create_changelog.py deleted file mode 100644 index ba5204fb8d..0000000000 --- a/changelog_update/create_changelog.py +++ /dev/null @@ -1,67 +0,0 @@ -import sys -import jinja2 -from pathlib import Path -from subprocess import run - -CURRENTDIR = Path(__file__).resolve().parent -# Defining the currentdir such that the script is always executed within the correct 'ChangeLog_Update' directory and -# that the YAML files are output here. - - -if __name__ == "__main__": - - branch_name = run( - "git rev-parse --abbrev-ref HEAD", - shell=True, - capture_output=True, - cwd=CURRENTDIR, - check=True, - ) - - git_branch_name = branch_name.stdout.decode() - git_branch_no = branch_name.stdout.decode().split("-")[0] - - if git_branch_no.isdigit() is True: - git_branch_no == git_branch_no - else: - git_branch_no == git_branch_name - - # Finding the name of the current git branch which shulde have the follwowing structure - # 1234-issue-name-from-merge-request - # Then the name is split by using the '-' as the partition. - # The number is wanted to use as the name for the .yaml file so this is taken as the 'git_branch_no' - - generated_yaml_file = Path(CURRENTDIR / f"{git_branch_no}.yaml") - - # This is just defining the yaml file that will be created by the running of this script. - # Showing that the generated_yaml_file will always be in the currentdir and named as git_branch_no.yaml e.g 1234.yaml - - if generated_yaml_file.is_file(): - print( - "This YAML file already exists - please locate it in the current directory and edit there." - ) - sys.exit() - else: - print( - f"Your file will be created in the changeLog_update directory and called: {git_branch_no}.yaml" - ) - - # The if statement checks if this script has already been run in the current branch and therefore if the yaml file you are about - # to create already exists. If this is the case, then the yaml file should be located in currentdir and edited with any changes - # there. This prevents overwriting of any changes that have already been documented in the yaml file. - # If the yaml file hasnt been created, the console will print the name your yaml file will have so you are able to locate it in - # the current directory. - - environment = jinja2.Environment( - loader=jinja2.FileSystemLoader(str(Path(__file__).resolve().parent)) - ) - - yaml_template = environment.get_template("yaml_template.jinja2") - - # Using jinja2 to template the standard .yaml file that is to be generated (empty) for user to fill out with their changes. - - with open(CURRENTDIR / f"{git_branch_no}.yaml", "w") as f: - f.write(yaml_template.render()) - - # Using the jinja2 template to write out a .yaml file in the current directory with the name being the users - # git branch number. diff --git "a/changelog_update/stellarator_develop\n.yaml" "b/changelog_update/stellarator_develop\n.yaml" deleted file mode 100644 index 28684006fd..0000000000 --- "a/changelog_update/stellarator_develop\n.yaml" +++ /dev/null @@ -1,19 +0,0 @@ -Added: -- Functionality to model generic stellarator coils by providing a pre-computed "stella_conf.json" file in the directory of the input file, which consists of reference calculations. Used if `istell=6` -- Stellarator coil forces functionality -- Gradient informed neoclassical transport sanity checks for the final design point -- Updated Stellarator user documentation -- ECRH induced density limits (`icc=91`) and two new iteration variables (f-value and max. achievable ECRH temperature at ignition point) -- New superconductor material jcrit scalings for stellarators (now the same as for tokamaks) -- Updated quench description -- Actual output of VV force density during quench -- Updated Stellarator regression test case (HELIAS-5) -- Gradient lengths information for stellarators -Changed: -- -Deprecated: -- -Fixed: -- -Removed: -- diff --git a/changelog_update/yaml_template.jinja2 b/changelog_update/yaml_template.jinja2 deleted file mode 100644 index f1cdaa094f..0000000000 --- a/changelog_update/yaml_template.jinja2 +++ /dev/null @@ -1,10 +0,0 @@ -Added: -- -Changed: -- -Deprecated: -- -Fixed: -- -Removed: -- diff --git a/documentation/proc-pages/development/versioning.md b/documentation/proc-pages/development/versioning.md index e041a10d5f..1c7f439a62 100644 --- a/documentation/proc-pages/development/versioning.md +++ b/documentation/proc-pages/development/versioning.md @@ -1,114 +1,4 @@ # Versioning -# Instructions on the new CHANGELOG procedure - -## The New Process -From now onward, users who make changes to the Process code will no longer update these changes in the `CHANGELOG.md` file. Instead, each change will be documented in a `.yaml` (YAML) file inside the `changelog_update` directory. This is so there are no more CHANGELOG merge conflicts upon merging into develop from individual branches. This .yaml file that you have subseuqently created should be committed alongside other changes you have made. - -## The Types of changes to be recorded -**Added**: For newly added features e.g. new models. - -**Changed**: For documenting changes in the existing functionality. - -**Deprecated**: For documenting soon-to-be removed features. - -**Removed**: For listing now removed (previously deprecated) features. - -**Fixed**: For documenting any bug fixes on features/changes made in a different release (i.e. do not add a bugfix to a feature or change that has not yet been released to master). - - - -## How the YAML file will look -This is the general structure of the YAML file that will be generated by using the Python script (described below) and in turn will be translated ready for upload upon Process version upgrade which will be carried out by a RSE. - -```yaml -Added: - - List any new features you have added here - - Another addition - -Changed: - - List any changes to existing functionality here - -Deprecated: - - List any soon-to-be removed features here - -Removed: - - List any features you have removed here - - Another removal - -Fixed: - - List any bug fixes here -``` - -## Generating the YAML file with a Python script -An empty YAML file with the following structure wil be generated in the changelog_update directory (`process/changelog_update`) when the Python script is run. The Python script will automatically extract the issue number that proceeds your Git branch and use this as the name for your generated YAML file e.g: - -Current branch: `9999-This-is-my-issue` - -The YAML file name generated in the `changelog_update` directory will be: `9999.yaml`. If you dont have numbers at the start of your branch name, the name of your yaml file with be `my-branch-name.yaml` - -### Step 1 -In the terminal, run the python script `create_changelog.py`, e.g: - -```bash -python changelog_update/create_changelog.py -``` -This script will create a .yaml file in the changelog_update directory where the name is that of your current git branch issue number.yaml. - -### Step 2 -Look in the changelog_update dir for your generated YAML file (determined by issue number)- This means your issue must have been created by a merge request. If you do NOT have an issue number in fornt of your current branch name, then you must create a merge request so your branch includes this issue number. - -### Step 3 -Open your generated YAML file which will look like below: -```BASH -Added: -- -Changed: -- -Deprecated: -- -Fixed: -- -Removed: -- -``` - -### Step 4 -Now you must add your changes to the YAML file manually. As seen in the section ['How the YAML file will look'](#how-the-yaml-file-will-look), each entry of a change is split into the different headers depending on the nature of the change. You are able to have multiple entries per header, and this just requires you to add another bullet point (hyphen) to a given category. - -An example of what the changes may look like if there is more than one entry can be seen below. **Syntax in the YAML file includes an important requirement for having a space between the hyphen and your text.** Also, no quotation marks are needed. - -At the end of each comment under each header, please add, in brackets, a hash followed by your issue number (see below). This is so it is possible to track at which point the changes were made. If you have made an entry that corresponds to multiple issues, please include these in the same format as seen in the example below. - -```yaml -Added: - - Added feature 1 (#1234) - - Added feature 2 (#1234) - - Added feature 3 (#1234) - -Changed: - - Changed feature 1 (#1234) - - Changed feature 2 (#1234,#5678) - -Deprecated: - - - -Removed: - - - -Fixed: - - Fixed bug 1 (#1234) -``` -Also, as seen above, if you haven't made changes, sections can be left empty. In this case we do not have a `Security` tag as there should be no changes invovled that would lead to any vulnerabilities. - -### Step 5 -All you need to do now is save your YAML file once you have added the changes to it, commit these changes and that is all. No changes need to be made to the CHANGELOG.md as this will be done automatically upon Process upversioning. - -## What warrants a changelog entry? -You can see the current CHANGELOG.md in the process directory, which has previous examples of what should be included in the changelog. Using [Gitlab guides](https://docs.gitlab.com/ee/development/changelog.html), a few key changelog entries are: - -- Any user-facing change must have a changelog entry -- Any developer-facing change (such as test suite changes) should **not** have a changelog entry -- A fix for regression introduced and then fixed in the same release (such as fixing a bug introduced during a monthly release candidate) should **not** have a changelog entry. ## Semantic Versioning Process attempts to use [semantic versioning](https://semver.org/), which takes the form `MAJOR.MINOR.PATCH`. Increment the: @@ -122,15 +12,11 @@ Process uses a `develop` and `master` release model. All development work is mer To upversion Process: -1. Create a branch from `develop` and merge request for the upversion +1. Create a branch from `main` and merge request for the upversion 2. Increment the version in `setup.py` according to the semver rules 3. Similarly increment the version in `main_module.f90`:`inform()`. This Fortran version step will be removed in time as the Python conversion progresses -4. Add an entry to the `CHANGELOG.md` for all notable changes since the previous version. Looking at merge commits (see "Extracting merge commits from git log" below) or merged merge requests since the previous version is a good way to do this -5. Push and merge into `develop` -6. Create a merge request to merge `develop` into `master`. Add a release note to the merge request, which should be a user-friendly summary of the changes in this version -7. Merge `develop` into `master` -8. Pull `master`, then tag the merge commit with `git tag -a vX.Y.Z -m "Version X.Y.Z"` (note the "v": see "Tagging a commit" below) -9. Push the tag to `master` with `git push origin vX.Y.Z` +4. Push and merge into `main` +5. Create a release through GitHub and create a tag according to semantic versioning ### Extracting merge commits from git log A useful command for getting merge commits from git log for writing the changelog is: @@ -161,12 +47,12 @@ git push origin vX.Y.Z is required to transfer the tag to the remote. ### Working with tags -|Command|Description| -|--------|--------| -|`git describe`|show the current tag| -|`git tag`|list all tags| -|`git tag -l "1.0.*"`|list tags contained in `1.0.z`| -|`git checkout vX.Y.Z`|checkout a specific tag| +| Command | Description | +| --------------------- | ------------------------------ | +| `git describe` | show the current tag | +| `git tag` | list all tags | +| `git tag -l "1.0.*"` | list tags contained in `1.0.z` | +| `git checkout vX.Y.Z` | checkout a specific tag | Between user tags `git` will create tags in the following format: ```