Skip to content

Commit 636443f

Browse files
authored
Merge pull request #136 from xylar/fix-docs
Yet more updates and fixes to the docs
2 parents 31d75cb + d74d208 commit 636443f

File tree

6 files changed

+119
-74
lines changed

6 files changed

+119
-74
lines changed

docs/releasing/creating-rcs/rc-dependencies.md

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ E3SM-developed dependencies.
1111

1212
## Step-by-Step: Creating an RC for `e3sm_diags`
1313

14-
### 1. Tag a Release Candidate in the Source Repo
14+
### 1. Tag a Release Candidate or Make a GitHub Release
15+
16+
#### 1.1 Tag a Release Candidate in the Source Repo
17+
18+
In some repos like MPAS-Analysis, it is desirable to tag a release candidate
19+
without making a GitHub release page. This avoids clutter and confusion.
20+
21+
We will use E3SM Diags in this example even though this is not the preferred
22+
workflow for that repository.
1523

1624
Go to the source repository:
1725
[E3SM Diags GitHub](https://github.com/E3SM-Project/e3sm_diags)
@@ -36,6 +44,57 @@ git push origin v3.0.0rc1
3644

3745
---
3846

47+
#### 1.2 Perform at GitHub Release
48+
49+
In other repositories like E3SM Diags and zppy, developers prefer that you
50+
create release pages for release candidates. These pages provide clarity and
51+
provenance for the release candidate just like for a normal release.
52+
53+
Follow these steps to create a release candidate via GitHub:
54+
55+
- **Pull the latest changes on `main`:**
56+
```bash
57+
git checkout main
58+
git pull origin main
59+
```
60+
61+
- **Create a new branch from `main`:**
62+
```bash
63+
git checkout -b bump/0.1.0rc1
64+
```
65+
66+
- **Push the branch to your fork or upstream:**
67+
```bash
68+
git push --set-upstream origin bump/0.1.0rc1
69+
```
70+
71+
- **Bump the version in the Python files:**
72+
- You can use the `tbump` tool (available in the conda development
73+
environments for `e3sm_diags` and `e3sm_to_cmip`):
74+
```bash
75+
tbump 0.1.0rc1 --no-tag
76+
```
77+
This will automatically update version strings, add, commit, and push
78+
changes to remote.
79+
- Alternatively, manually update version strings in files such as
80+
`pyproject.toml`, `setup.py`, and `<python_package>/__init__.py`. Then
81+
add, commit, and push these changes.
82+
83+
- **Open a pull request:**
84+
- Use your `bump/0.1.0rc1` branch as the source and merge into `main`.
85+
- Example: [Compare · E3SM-Project/e3sm_to_cmip](https://github.com/E3SM-Project/e3sm_to_cmip/compare)
86+
87+
- **Publish a new GitHub Release:**
88+
- Go to the [GitHub Releases page](https://github.com/E3SM-Project/e3sm_to_cmip/releases/new).
89+
- Click "Choose a tag" and enter `0.1.0rc1` (ideally without a `v`, but
90+
follow the repo’s conventions).
91+
- For "Release title", use `v0.1.0rc1` (with a `v`).
92+
- Click "Generate release notes" and organize the changelog as needed.
93+
- Check the box "Set as a pre-release".
94+
- Click "Publish release".
95+
96+
---
97+
3998
### 2. Prepare the Feedstock PR
4099

41100
Go to the conda-forge feedstock for `e3sm_diags`:
@@ -117,7 +176,7 @@ conda install -c conda-forge/label/e3sm_diags_dev e3sm_diags
117176

118177
Creating an RC for a dependency involves:
119178

120-
1. Tagging the source repository
179+
1. Tagging a Release Candidate or making a GitHub release
121180
2. Opening a PR on the feedstock targeting the `dev` branch
122181
3. Waiting for CI to pass, then merging
123182

docs/releasing/creating-rcs/rc-e3sm-unified.md

Lines changed: 16 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -35,63 +35,30 @@ Edit `recipes/e3sm-unified/meta.yaml`:
3535
`e3sm_diags`, `mpas-analysis`, etc.)
3636

3737
---
38+
## 3. Run `build_packages.py`
3839

39-
## 3. Regenerate the Build Matrix
40+
If you are building packages for an RC version of E3SM-Unified, the script
41+
will build packages for Python 3.10 and the `nompi` and `hpc` versions of MPI
42+
by default (those needed for login and compute nodes, respectively, on HPC).
43+
You may wish to use the `--python` and `--mpi` flags to override these.
4044

41-
Run the matrix generator script to define combinations of Python and MPI:
45+
You should supply the `--conda` flag if not using `~/miniforge3`.
4246

4347
```bash
44-
cd recipes/e3sm-unified/configs
45-
rm *.yaml
46-
python generate.py
48+
./build_packages.py --conda ~/minforge3 --python 3.10 --mpi nompi hpc
4749
```
4850

49-
This produces matrix files like:
51+
The script will produce a matrix of files like:
5052

51-
* `mpi_mpich_python3.10.yaml`
52-
* `mpi_hpc_python3.10.yaml`
53+
* `configs/mpi_nompi_python3.10.yaml`
54+
* `configs/mpi_hpc_python3.10.yaml`
5355

54-
---
55-
56-
## 4. Edit `build_package.bash`
57-
58-
Update the channel list to include dev labels for any packages still in RC
59-
form. For example:
60-
61-
```bash
62-
channels="-c conda-forge/label/chemdyg_dev \
63-
-c conda-forge/label/e3sm_diags_dev \
64-
-c conda-forge/label/mache_dev \
65-
-c conda-forge/label/mpas_analysis_dev \
66-
-c conda-forge/label/zppy_dev \
67-
-c conda-forge/label/zstash_dev \
68-
-c conda-forge"
69-
```
70-
71-
Then define which matrix files to test. For example:
72-
73-
```bash
74-
for file in configs/mpi_mpich_python3.10.yaml configs/mpi_hpc_python3.10.yaml
75-
do
76-
conda build -m $file --override-channels $channels .
77-
done
78-
```
79-
80-
Make sure:
81-
82-
* You use `--override-channels` to isolate testing to dev packages
83-
* You only include dev labels for packages with RCs — use stable versions
84-
otherwise
56+
These are then used by `conda build` to build the appropriate variant of
57+
the conda package.
8558

8659
---
8760

88-
## 5. Build and Troubleshoot
89-
90-
Run the script:
91-
92-
```bash
93-
bash build_package.bash
94-
```
61+
## 4. Troubleshoot
9562

9663
If builds fail, consult the
9764
[Troubleshooting Conda Build Failures](rc-troubleshooting.md) guide.
@@ -100,7 +67,7 @@ resolution issues.
10067

10168
---
10269

103-
## 6. Make a draft PR
70+
## 5. Make a draft PR
10471

10572
Push the branch to your fork of `e3sm-unified` and make a draft PR to the
10673
main `e3sm-unified` repo. Use that PR to document progress and highlight
@@ -110,7 +77,7 @@ acces to E3SM's Confluence pages). See
11077

11178
---
11279

113-
## 7. Keeping updated on Confluence
80+
## 6. Keeping updated on Confluence
11481

11582
As deployment and testing progresses, you needs to make sure that the packages
11683
in your `update-to-<version>` branch match the
@@ -127,7 +94,7 @@ jargon**) what is new in their package that would be of interest to users.
12794

12895
---
12996

130-
## 8. Tag and Publish the RC
97+
## 7. Tag and Publish the RC
13198

13299
After test builds are successful:
133100

docs/releasing/planning-updates.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,25 @@ using the [Creating Release Candidates](creating-rcs/overview.md) workflow.
7373

7474
---
7575

76+
## ✍️ Updating `meta.yaml`
77+
78+
Once the package list and versions are finalized, update the
79+
[`recipes/e3sm-unified/meta.yaml`](https://github.com/E3SM-Project/e3sm-unified/blob/main/recipes/e3sm-unified/meta.yaml)
80+
file to reflect the new selections. This file is the authoritative source for
81+
the conda environment and must be kept in sync with the planned versions.
82+
83+
- Edit the `meta.yaml` to add new packages, update versions, or remove
84+
deprecated packages as needed.
85+
- Ensure that all changes are consistent with the decisions made during
86+
planning.
87+
- Commit these changes to your release branch as part of preparing the
88+
release candidate.
89+
90+
> **Tip:** Also update `e3sm_supported_machines/default.cfg` to match, unless
91+
there is a technical reason to diverge.
92+
93+
---
94+
7695
## 📦 Managing Version Pins During Conda-Forge Migrations
7796

7897
E3SM-Unified often needs to coordinate with conda-forge's centralized version

docs/releasing/release-workflow.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22

33
The release process typically follows this progression:
44

5-
1. **[How Conda and Spack Work Together in E3SM-Unified](conda-vs-spack.md)**
6-
2. **[Planning Package Updates](planning-updates.md)**
7-
3. **[Creating Release Candidates](creating-rcs/overview.md)**
8-
4. **[Deployment and Testing](testing/overview.md)**
9-
5. **[Adding a New Machine](adding-new-machines.md)**
10-
6. **[Finalizing the Release](finalizing-release.md)**
11-
7. **[Maintaining Past Versionse](maintaining-past-versions.md)**
5+
1. **[Planning Package Updates](planning-updates.md)**
6+
2. **[Creating Release Candidates](creating-rcs/overview.md)**
7+
3. **[Deployment and Testing](testing/overview.md)**
8+
4. **[Adding a New Machine](adding-new-machines.md)**
9+
5. **[Finalizing the Release](finalizing-release.md)**
10+
6. **[Maintaining Past Versionse](maintaining-past-versions.md)**
1211

13-
Each of these steps is detailed in its own page. See below for a high-level
14-
summary.
12+
We begin with some background information, then each of these steps is detailed
13+
in its own page. See below for a high-level summary.
1514

1615
---
1716

18-
## 1. How Conda and Spack Work Together in E3SM-Unified
17+
## Backgraound: How Conda and Spack Work Together in Polaris
1918

2019
Why does E3SM-Unified use both Conda and Spack? What roles do they each serve?
2120
Before you start, it's critical to understand how these two systems work
@@ -25,7 +24,7 @@ together.
2524

2625
---
2726

28-
## 2. Planning Package Updates
27+
## 1. Planning Package Updates
2928

3029
Updates are driven by the needs of the E3SM community, typically discussed via
3130
Confluence or GitHub. This step documents how to propose new packages or
@@ -35,7 +34,7 @@ changes to existing ones.
3534

3635
---
3736

38-
## 3. Creating Release Candidates
37+
## 2. Creating Release Candidates
3938

4039
This step covers:
4140

@@ -46,13 +45,13 @@ This step covers:
4645

4746
---
4847

49-
## 4. Deploying and Testing on HPCs
48+
## 3. Deploying and Testing on HPCs
5049

5150
Before full deployment, release candidates are installed on a subset of HPC
5251
platforms for iterative testing and validation. This stage often requires
53-
extensive coordination and may involve debugging and extending the Spack build
54-
workflow, updating the E3SM Spack fork, and modifying `mache` to support new
55-
systems or changes in machine configurations.
52+
updating updating `mache` to support new systems or changes in machine
53+
configurations, adding package versions to E3SM's Spack fork, and
54+
troubleshooting deployment scripts.
5655

5756
Testing includes everything from basic imports to full `zppy` workflows. This
5857
is a collaborative effort, with the full iterative process often spanning
@@ -62,7 +61,7 @@ several weeks to a few months.
6261

6362
---
6463

65-
## 5. Adding a New Machine
64+
## 4. Adding a New Machine
6665

6766
Most of the work for adding a new machine takes place in `mache`. Here we
6867
provide notes on adding new HPCs that are specific to E3SM-Unified.
@@ -71,7 +70,7 @@ provide notes on adding new HPCs that are specific to E3SM-Unified.
7170

7271
---
7372

74-
## 6. Finalizing the Release
73+
## 5. Finalizing the Release
7574

7675
Once all RCs pass testing:
7776

@@ -84,7 +83,7 @@ Once all RCs pass testing:
8483

8584
---
8685

87-
## 7. Maintaining Past Versions
86+
## 6. Maintaining Past Versions
8887

8988
Older versions of E3SM-Unified sometimes require maintenance (repairs or
9089
deletion).

docs/releasing/testing/deploying-on-hpcs.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ Other flags are optional and will be discussed below.
4646
versions of some conda packages required in the installation environment
4747
(notably `mache`)
4848
* Version numbers here should match `meta.yaml` unless diverging for a reason
49-
* A special case is `esmpy = None`, required so ESMPy comes from conda-forge,
50-
not Spack.
49+
* Special case are `esmpy = None` and `xesmf = None`, required so ESMPy and
50+
xESMF come from conda-forge, not Spack (for compatibility with xCDAT and
51+
E3SM Diags).
5152

5253
### ⚙️ `shared.py`
5354

@@ -125,7 +126,7 @@ used during deployment.
125126
connection and you should pipe the output to a log file, e.g.:
126127
127128
```bash
128-
./deploy_e3sm_unified.py --conda ~/miniforge3 | tee deploy.log
129+
./deploy_e3sm_unified.py --conda ~/miniforge3 2>&1 | tee deploy.log
129130
```
130131
131132
**Note:** It is not recommended that you try to deploy E3SM-Unified

docs/releasing/testing/troubleshooting-deploy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ build.
140140
## 📎 Related Tools & Tips
141141

142142
* Use `screen`, `tmux`, or `nohup` for long deployments
143-
* Always log output: `... | tee deploy.log`
143+
* Always log output: `... 2>&1 | tee deploy.log`
144144
* Validate final symlinks and paths manually after deployment
145145
* Document which system + compiler + MPI variants have been tested
146146

0 commit comments

Comments
 (0)