Skip to content

Commit a154db7

Browse files
committed
Update standard-names to #82; add version into generated 'std_names' module.
1 parent 9e968ba commit a154db7

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

docs/src/whatsnew/latest.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ This document explains the changes made to Iris for this release
4141
the data variable's ``coordinates`` attribute when saving to NetCDF.
4242
(:issue:`5206`, :pull:`5389`)
4343

44+
#. `@pp-mo`_ record the release version of the standard-names table, and provide as
45+
``iris.std_names.CF_STANDARD_NAMES_TABLE_VERSION``.
46+
(:pull:`5423`)
47+
4448

4549
🐛 Bugs Fixed
4650
=============

lib/iris/tests/test_std_names.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# import iris tests first so that some things can be initialised before importing anything else
88
import iris.tests as tests # isort:skip
99

10-
from iris.std_names import CF_STANDARD_NAME_TABLE_VERSION, STD_NAMES
10+
from iris.std_names import CF_STANDARD_NAMES_TABLE_VERSION, STD_NAMES
1111

1212

1313
class TestStandardNames(tests.IrisTest):
@@ -48,9 +48,9 @@ def test_standard_names_table(self):
4848

4949
def test_standard_names_version(self):
5050
# Check we have a dict
51-
self.assertIsInstance(CF_STANDARD_NAME_TABLE_VERSION, int)
51+
self.assertIsInstance(CF_STANDARD_NAMES_TABLE_VERSION, int)
5252
# Check the value is roughly sensible.
53-
self.assertTrue(70 < CF_STANDARD_NAME_TABLE_VERSION < 999)
53+
self.assertTrue(70 < CF_STANDARD_NAMES_TABLE_VERSION < 999)
5454

5555

5656
if __name__ == "__main__":

tools/generate_std_names.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def to_dict(infile, outfile):
9393

9494
text = STD_VALUES_FILE_TEMPLATE.format(table_version=cf_table_version_string)
9595
text += pprint.pformat(values)
96-
text += f'\n\nCF_STANDARD_NAME_TABLE_VERSION = {cf_table_version_string}\n'
96+
text += f'\n\nCF_STANDARD_NAMES_TABLE_VERSION = {cf_table_version_string}\n'
9797
outfile.write(text)
9898

9999

0 commit comments

Comments
 (0)