Skip to content

Commit 842da22

Browse files
authored
Merge pull request #15 from SWxTREC/new-release
Preparing for a new release v0.2.0
2 parents bd6f4be + 6d10a0a commit 842da22

File tree

12 files changed

+99
-133
lines changed

12 files changed

+99
-133
lines changed

.github/workflows/tests.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: tests
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
4+
cancel-in-progress: true
5+
6+
on:
7+
push:
8+
branches: [ '*' ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [windows-latest, ubuntu-latest, macos-latest]
18+
python-version: ['3.8', '3.9', '3.10', '3.11']
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install enlilviz
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install -v .[test]
32+
33+
- name: Run tests
34+
run: |
35+
pytest --color=yes

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
History
33
=======
44

5+
0.2.0 (2022-11-27)
6+
------------------
7+
8+
* Fix handling of missing data variables from more recent suball files that NOAA uses.
9+
510
0.0.1 (2020-02-17)
611
------------------
712

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
napoleon_google_docstring = False
4848

4949
intersphinx_mapping = {
50-
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
50+
'numpy': ('https://numpy.org/doc/stable/', None),
5151
'xarray': ('https://xarray.pydata.org/en/stable/', None)
5252
}
5353

enlilviz/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
__author__ = """Greg Lucas"""
44
__email__ = 'greg.lucas@lasp.colorado.edu'
5-
__version__ = '0.1.0'
5+
__version__ = '0.2.0'
66

77
from .io import read_enlil2d, read_evo
88
__all__ = ['read_enlil2d', 'read_evo']

enlilviz/io.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,13 @@ def read_enlil2d(filename):
213213
da = xr.concat([_unstack_fieldline(ds[sat + '_FLD_' + var])
214214
for sat in _satellites],
215215
dim='satellite')
216-
ds = ds.drop([sat + '_FLD_' + var for sat in _satellites])
216+
ds = ds.drop_vars([sat + '_FLD_' + var for sat in _satellites])
217217
name += 'fld_'
218218
else:
219219
try:
220220
da = xr.concat([ds[sat + '_' + var] for sat in _satellites],
221221
dim='satellite')
222-
ds = ds.drop([sat + '_' + var for sat in _satellites])
222+
ds = ds.drop_vars([sat + '_' + var for sat in _satellites])
223223
except KeyError:
224224
# If the variable isn't here, continue the loop
225225
continue
@@ -257,7 +257,7 @@ def read_evo(filename):
257257
t0 = np.datetime64(ds.attrs['refdate_cal'], 's')
258258
time = t0 + np.array(ds['TIME'], np.timedelta64)
259259
ds = ds.rename({'nevo': 'earth_t'}).assign_coords({'earth_t': time})
260-
ds = ds.drop(['TIME', 'DT', 'NSTEP'])
260+
ds = ds.drop_vars(['TIME', 'DT', 'NSTEP'])
261261

262262
for var in _variables_evo:
263263
if var not in ds:
@@ -271,7 +271,7 @@ def read_evo(filename):
271271
# Unit conversions
272272
da = _transform_variable(da)
273273
ds[name] = da
274-
ds = ds.drop(var)
274+
ds = ds.drop_vars(var)
275275
ds.attrs['name'] = ds.label
276276

277277
return Evolution(ds)
@@ -359,7 +359,7 @@ def _calibrate_variable(ds, var):
359359
# Update the name of the data array
360360
da.name = name
361361
ds[name] = da
362-
ds = ds.drop(var)
362+
ds = ds.drop_vars(var)
363363
return ds
364364

365365

@@ -380,8 +380,8 @@ def _transform_dimensions(ds):
380380
't': t,
381381
'earth_t': earth_t,
382382
'satellite': _satellites,
383-
}).drop(['x_coord', 'y_coord', 'z_coord',
384-
'time', 'Earth_TIME'])
383+
}).drop_vars(['x_coord', 'y_coord', 'z_coord',
384+
'time', 'Earth_TIME'])
385385

386386
ds['x'] = ds['x'] / _unit_conversion['AU']
387387
ds['x'].attrs = {'long_name': 'radial cell positions',

pyproject.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[build-system]
2+
requires = [
3+
"setuptools >= 48.0.0",
4+
]
5+
build-backend = "setuptools.build_meta"
6+
7+
[project]
8+
name = "enlilviz"
9+
version = "0.2.0"
10+
description = "A Python package for visualizing output from the Enlil code."
11+
authors = [
12+
{name = "Greg Lucas", email="greg.lucas@lasp.colorado.edu"},
13+
]
14+
license = {file = "LICENSE"}
15+
readme = "README.rst"
16+
requires-python = ">=3.8"
17+
18+
keywords = ["Enlil", "Visualization"]
19+
20+
classifiers = [
21+
'Development Status :: 2 - Pre-Alpha',
22+
'Intended Audience :: Developers',
23+
'License :: OSI Approved :: MIT License',
24+
'Natural Language :: English',
25+
'Programming Language :: Python :: 3',
26+
'Programming Language :: Python :: 3.8',
27+
'Programming Language :: Python :: 3.9',
28+
'Programming Language :: Python :: 3.10',
29+
'Programming Language :: Python :: 3.11',
30+
31+
]
32+
33+
dependencies = [
34+
"numpy", "matplotlib", "xarray", "netcdf4"
35+
]
36+
37+
[project.optional-dependencies]
38+
test = [
39+
"pytest>=3",
40+
]
41+
42+
[project.urls]
43+
homepage = "https://github.com/SWxTREC/enlilviz"
44+
documentation = "https://enlilviz.readthedocs.io"
45+
repository = "https://github.com/SWxTREC/enlilviz"

requirements_dev.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

setup.cfg

Lines changed: 0 additions & 24 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)