Skip to content

Commit 839342f

Browse files
committed
Release of version 0.8.3
Included missing module name Avoid crash if cmap option is not provided improvements to build for release
1 parent 65aea85 commit 839342f

File tree

6 files changed

+27
-6
lines changed

6 files changed

+27
-6
lines changed

.github/workflows/release-pip.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- name: Install Dependencies
1616
run: |
1717
python -m pip install --upgrade pip
18-
pip install setuptools wheel twine setuptools_scm build
18+
pip install setuptools wheel twine setuptools-git-versioning build
1919
- name: Build Package
2020
run: |
21-
python -m build --sdist
21+
build_s_dist.sh
2222
- name: Publish to PyPi
2323
uses: pypa/gh-action-pypi-publish@release/v1.5
2424
with:

_version.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Generated by wrfplot build file. Do not edit it manually...
2+
__version__ = version = '0.8.1.post1+git.65aea851.dirty'

build_s_dist.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
if [ -d "build" ]; then
4+
echo "Cleaning previousally generated build files..."
5+
rm -rfv build
6+
rm -rfv wrfplot.egg-info
7+
fi
8+
9+
echo "Generating version information..."
10+
echo -e "# Generated by wrfplot build file. Do not edit it manually...\n__version__ = version = '$(setuptools-git-versioning)'" > _version.py
11+
12+
python -m build --sdist
13+
14+
echo "Cleaning build time egg info directory..."
15+
rm -rfv wrfplot.egg-info

wrfplot/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Generated by wrfplot build file. Do not edit it manually...
2-
__version__ = version = "0.8.1.post0+git.2b855e8d.dirty"
2+
__version__ = version = "0.8.1.post1+git.65aea851.dirty"

wrfplot/plot.py

+1
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ def get_cmap(self):
203203
"""Get cmap from variable.ini file"""
204204
cmap_name = "None"
205205
if self.cmap is not False:
206+
206207
self.cmap = utils.get_cmap(self.cmap)
207208
return True
208209
else:

wrfplot/wrfplot.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@
6060
warnings.filterwarnings("ignore", module="datetime")
6161

6262
try:
63-
__version__ = version("wrfplot")
64-
except PackageNotFoundError:
6563
import _version
64+
__version__ = _version.__version__
65+
66+
except:
67+
__version__ = version("wrfplot")
6668
# package is not installed
6769
# Get the version from local file
68-
__version__ = _version.__version__
70+
finally:
6971
pass
7072

7173

@@ -446,6 +448,7 @@ def _praser():
446448
"--cmap",
447449
metavar="<cmap-name>",
448450
type=arguments.validate_cmap,
451+
default=False,
449452
help="Valid colormap name to fill colors. Use '--list-cmaps' option to see list of supported colormaps. Must have minimum 11 colors, else will lead to error.",
450453
)
451454
parser.add_argument(

0 commit comments

Comments
 (0)