Skip to content

Commit f64e7f4

Browse files
authored
Merge pull request #149 from csiro-coasts/release-0.7.0
Release 0.7.0
2 parents a47e153 + 7c747f6 commit f64e7f4

File tree

6 files changed

+23
-15
lines changed

6 files changed

+23
-15
lines changed

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cff-version: 1.2.0
22
title: emsarray
3-
version: 0.6.1
4-
date-released: 2023-09-27
3+
version: 0.7.0
4+
date-released: 2024-07-10
55
type: software
66
authors:
77
- given-names: Tim
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
=============================
2-
Next release (in development)
3-
=============================
1+
=====
2+
0.7.0
3+
=====
4+
5+
Released on 2024-07-10
46

57
* Fix a ``FutureWarning`` on accessing :attr:`xarray.Dataset.dims`
68
with xarray >= 2023.12.0

docs/releases/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Release notes
44

55
.. toctree::
66

7-
development
7+
0.7.0
88
0.6.1
99
0.6.0
1010
0.5.0

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66

77
[project]
88
name = "emsarray"
9-
version = "0.6.1"
9+
version = "0.7.0"
1010
description = "xarray extension that supports multiple geometry conventions"
1111
authors = [
1212
{name = "Coastal Environmental Modelling team, Oceans and Atmosphere, CSIRO", email = "[email protected]"},
@@ -28,7 +28,7 @@ dynamic = ["readme"]
2828

2929
[project.urls]
3030
Documentation = "https://emsarray.readthedocs.io/"
31-
"Release notes" = "https://emsarray.readthedocs.io/en/stable/releases/0.6.1/"
31+
"Release notes" = "https://emsarray.readthedocs.io/en/stable/releases/0.7.0/"
3232
Source = "https://github.com/csiro-coasts/emsarray/"
3333

3434
[project.optional-dependencies]

scripts/release.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import argparse
2-
import configparser
32
import datetime
43
import pathlib
54
import re
65
import shlex
76
import subprocess
87
import sys
8+
import tomllib
99

1010
PROJECT = pathlib.Path(__file__).parent.parent
1111

1212
# These files contain the version string that needs to be updated
1313
citation_file = pathlib.Path('CITATION.cff')
1414
version_files = [
15-
pathlib.Path('setup.cfg'),
15+
pathlib.Path('pyproject.toml'),
1616
citation_file,
1717
]
1818

@@ -201,10 +201,9 @@ def maybe_push(
201201

202202

203203
def get_current_version() -> str:
204-
parser = configparser.ConfigParser()
205-
with open(PROJECT / 'setup.cfg') as f:
206-
parser.read_file(f)
207-
return parser.get('metadata', 'version')
204+
with open(PROJECT / 'pyproject.toml', 'rb') as f:
205+
pyproject = tomllib.load(f)
206+
return pyproject['project']['version']
208207

209208

210209
def call(*args: str) -> None:

src/emsarray/plot.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# required as this module imports optional
2+
# dependencies that are used for type hints.
3+
from __future__ import annotations
4+
15
import importlib.metadata
26
from collections.abc import Callable, Iterable
37
from typing import Any, Literal
@@ -34,7 +38,10 @@
3438

3539
_requires_plot = requires_extra(extra='plot', import_error=IMPORT_EXCEPTION)
3640

37-
CARTOPY_VERSION = packaging.version.Version(importlib.metadata.version('cartopy'))
41+
if CAN_PLOT:
42+
CARTOPY_VERSION = packaging.version.Version(importlib.metadata.version('cartopy'))
43+
else:
44+
CARTOPY_VERSION = packaging.version.Version('0')
3845
CARTOPY_0_23 = CARTOPY_VERSION >= packaging.version.Version('0.23')
3946

4047

0 commit comments

Comments
 (0)