Skip to content

Commit 3f74a0b

Browse files
committedMar 19, 2025
README and minor fixes before release
1 parent 3a37eb0 commit 3f74a0b

File tree

3 files changed

+61
-10
lines changed

3 files changed

+61
-10
lines changed
 

‎.github/workflows/CD.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ jobs:
151151
name: Cleanup tag
152152
needs: [check-release-tag, version-sanity-check, get-package-name, release-conda-package]
153153
# Run this job if the tag is a release tag and any of the previous jobs failed (and don't skip if any of the needed jobs is skipped)
154-
if: ${{ always() && failure() && needs.check-release-tag.outputs.is_release_tag == 'true' }}
154+
if: ${{ ( always() && failure() && needs.check-release-tag.outputs.is_release_tag == 'true') || cancelled() }}
155155
runs-on: ubuntu-latest
156156
permissions:
157157
contents: write

‎README.md

+57-6
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,27 @@
22

33
UMfile_util is a Python library that provides specific tools to process [UM files](https://code.metoffice.gov.uk/doc/um/latest/papers/umdp_F03.pdf).
44

5-
## List of functions
5+
- [Installation](#installation)
6+
- [List of functions](#list-of-functions)
7+
- [perturbIC](#perturbic)
8+
- [um\_fields\_subset](#um_fields_subset)
9+
- [change\_date](#change_date)
10+
- [Contributing](#contributing)
11+
- [Development/Testing instructions](#developmenttesting-instructions)
12+
- [Clone/fork umfile\_utils GitHub repo](#clonefork-umfile_utils-github-repo)
13+
- [Create a micromamba/conda testing environment](#create-a-micromambaconda-testing-environment)
14+
- [Install umfile\_utils as a development package](#install-umfile_utils-as-a-development-package)
15+
- [Running the tests](#running-the-tests)
16+
- [License](#license)
17+
18+
## Installation
19+
`umfile_utils` is released as a `conda` package within the `accessnri` Anaconda.org channel.
20+
To install it, run:
21+
```
22+
conda install accessnri::umfile_utils
23+
```
624

25+
## List of functions
726
- [perturbIC](#perturbic)
827
- [um_fields_subset](#um-fields-subset)
928
- [change_date](#change-date)
@@ -25,11 +44,43 @@ Change the time metadata of a UM restart file, without modifying its data conten
2544

2645
Run `change_date --help` for detailed usage information
2746

28-
## Installation
29-
TO BE ADDED
30-
3147
## Contributing
32-
TO BE ADDED
48+
External contributions (not from ACCESS-NRI) are accepted in the form of issues and PRs from forked repos.
49+
50+
### Development/Testing instructions
51+
For development/testing, it is recommended to install `umfile_utils` as a development package within a `micromamba`/`conda` testing environment.
52+
53+
### Clone/fork umfile_utils GitHub repo
54+
> [!NOTE]
55+
> If you are not part of the ACCESS-NRI, you can fork the repo instead.
56+
```
57+
git clone git@github.com:ACCESS-NRI/umfile_utils.git
58+
```
59+
60+
### Create a micromamba/conda testing environment
61+
> [!TIP]
62+
> In the following instructions `micromamba` can be replaced with `conda`.
63+
64+
```
65+
cd umfile_utils
66+
micromamba env create -n umfile_utils_dev --file .conda/env_dev.yml
67+
micromamba activate umfile_utils_dev
68+
```
69+
70+
### Install umfile_utils as a development package
71+
```
72+
pip install --no-deps --no-build-isolation -e .
73+
```
74+
75+
### Running the tests
76+
77+
To manually run the tests, from the `umfile_utils` directory, you can:
78+
79+
1. Activate your [micromamba/conda testing environment](#create-a-micromamba-conda-testing-environment)
80+
2. Run the following command:
81+
```
82+
pytest
83+
```
3384

3485
## License
35-
TO BE ADDED
86+
[Apache-2.0](https://choosealicense.com/licenses/apache-2.0/)

‎pyproject.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ requires = [
2828
]
2929

3030
[project.scripts]
31-
change_dump_date = "umfile_utils.change_dump_date:main"
32-
perturbic = "umfile_utils.perturbIC:main"
33-
fields_subset = "umfile_utils.um_fields_subset:main"
31+
change_date = "umfile_utils.change_dump_date:main"
32+
perturbIC = "umfile_utils.perturbIC:main"
33+
um_fields_subset = "umfile_utils.um_fields_subset:main"
3434

3535
[tool.setuptools.packages.find]
3636
where = ["src"]

0 commit comments

Comments
 (0)