Skip to content

Commit c415d7a

Browse files
authored
chore(pixi): add pixi task to make release notes tex file, update dev docs (#2282)
#2108 neglected to document mk_releasenotes.py for developers, do so. Give the script named --toml and --tex parameters with default values develop.toml and develop.tex in the same directory as the script. Add a pixi task to run the script with defaults. Rename the deprecations task to collect-deprecations, following pattern verb[-noun].
1 parent edb1c85 commit c415d7a

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152

153153
- name: Collect deprecations
154154
working-directory: modflow6
155-
run: pixi run deprecations
155+
run: pixi run collect-deprecations
156156

157157
- name: Show deprecations
158158
working-directory: modflow6/doc/mf6io/mf6ivar/md

distribution/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,17 @@ These should occur roughly in the order presented above. The procedure is automa
7878

7979
### Update release notes
8080

81-
The release notes document is constructed from the `doc/ReleaseNotes/ReleaseNotes.tex` LaTeX file. During each development cycle, release notes should be maintained in `doc/ReleaseNotes/develop.tex` — this file is referenced from `doc/ReleaseNotes/ReleaseNotes.tex`.
81+
The release notes PDF document is constructed from the `doc/ReleaseNotes/ReleaseNotes.tex` LaTeX file. During development, release notes should be maintained in `doc/ReleaseNotes/develop.toml` — this file is turned into a LaTeX file by `doc/ReleaseNotes/mk_releasenotes.py`. A pixi task is available for this, e.g. `pixi run make-release-notes`. The resulting LaTex file is referenced from `doc/ReleaseNotes/ReleaseNotes.tex`.
8282

8383
Before making a release, add a line to the Release History section of `ReleaseNotes.tex` providing the version number, date and DOI of the current release, e.g. `6.4.4 & February 13, 2024 & \url{https://doi.org/10.5066/P9FL1JCC}`.
8484

8585
After each release is made, several steps are required to reset the release notes for the next development cycle:
8686

8787
- copy `develop.tex` into a new file `doc/ReleaseNotes/previous/vx.y.z.tex` (where `x.y.z` is the semantic version just released)
8888
- add a new entry like `\input{./previous/vx.y.z.tex}` to line 3 of `doc/ReleaseNotes/appendixA.tex`
89-
- overwrite `develop.tex` with the contents of `doc/ReleaseNotes/vx.y.z-template.tex`
89+
- clear `develop.toml`
9090

91-
Now new changes can be added to `develop.tex` as development proceeds.
91+
Now new changes can be added to `develop.toml` as development proceeds until the next release.
9292

9393
**Note**: Newly deprecated MF6IO options are included in the release notes. See the [developer docs](../DEVELOPER.md#deprecation-policy) for more info on MF6's deprecation policy, searching for deprecations among DFNs, and generating a deprecations table for insertion into the release notes.
9494

distribution/build_docs.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,12 @@ def build_notes_tex(force: bool = False):
145145
tex_path.unlink(missing_ok=True)
146146
with set_dir(RELEASE_NOTES_PATH):
147147
out, err, ret = run_py_script(
148-
"mk_releasenotes.py", toml_path, tex_path, verbose=True
148+
"mk_releasenotes.py",
149+
"--toml",
150+
toml_path,
151+
"--tex",
152+
tex_path,
153+
verbose=True,
149154
)
150155
assert not ret, out + err
151156

doc/ReleaseNotes/mk_releasenotes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
if __name__ == "__main__":
1515
parser = argparse.ArgumentParser()
16-
parser.add_argument("toml_path")
17-
parser.add_argument("tex_path")
16+
parser.add_argument("--toml", default="develop.toml")
17+
parser.add_argument("--tex", default="develop.tex")
1818
args = parser.parse_args()
19-
toml_path = Path(args.toml_path).expanduser().absolute()
20-
tex_path = Path(args.tex_path).expanduser().absolute()
19+
toml_path = Path(args.toml).expanduser().absolute()
20+
tex_path = Path(args.tex).expanduser().absolute()
2121
if not toml_path.is_file():
2222
warn(f"Release notes TOML file not found: {toml_path}")
2323
sys.exit(0)

pixi.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ build-docs = { cmd = "python build_docs.py", cwd = "distribution" }
113113
build-dist = { cmd = "python build_dist.py", cwd = "distribution" }
114114
test-dist-scripts = { cmd = "pytest -v --durations 0", cwd = "distribution" }
115115
update-version = { cmd = "python update_version.py", cwd = "distribution" }
116-
deprecations = { cmd = "python deprecations.py", cwd = "doc/mf6io/mf6ivar" }
116+
collect-deprecations = { cmd = "python deprecations.py", cwd = "doc/mf6io/mf6ivar" }
117117
check-citations = "cffconvert --validate -i CITATION.cff"
118+
make-release-notes = { cmd = "python mk_releasenotes.py", cwd = "doc/ReleaseNotes" }
118119

119120
[feature.rtd.tasks]
120121
sphinx = { cmd = "make html", cwd = ".build_rtd_docs" }

0 commit comments

Comments
 (0)