Skip to content

Commit 12961df

Browse files
committed
add github action
1 parent a2e769a commit 12961df

File tree

6 files changed

+32
-12
lines changed

6 files changed

+32
-12
lines changed

.github/workflows/release.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-20.04
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-python@v2
14+
- name: Install dependencies
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install setuptools wheel twine
18+
- name: Build and publish
19+
env:
20+
TWINE_USERNAME: __token__
21+
TWINE_PASSWORD: ${{ secrets.PYE3SM_PYPI }}
22+
run: |
23+
python setup.py sdist bdist_wheel
24+
twine upload dist/*

pye3sm/elm/general/halfdegree/save/elm_save_variable_halfdegree.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
from netCDF4 import Dataset #read netcdf
66
from osgeo import gdal, osr #the default operator
77

8-
sProj = os.environ['PROJ_LIB']
9-
if sProj is None:
10-
print("The proj library is missing.")
11-
os.environ['PROJ_LIB'] = '/qfs/people/liao313/.conda/envs/gdalenv/share/proj'
8+
129

1310
from pyearth.system.define_global_variables import *
1411

pye3sm/mosart/preprocess/mosart_create_flow_accumulation_map.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from osgeo import ogr
77
from osgeo import gdal, osr
88
#workspace_data = "/people/liao313/data/hexwatershed/columbia_river_basin/vector/mosart/"
9-
os.environ['PROJ_LIB'] = '/qfs/people/liao313/.conda/envs/gdalenv/share/proj'
9+
1010
aResolution = ['2th', '4th', '8th', '16th']
1111

1212

pye3sm/mosart/preprocess/mosart_create_flow_direction_map.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
import numpy
33
import numpy as np
44
from netCDF4 import Dataset
5-
#import shapefile
5+
66
from osgeo import ogr
77
from osgeo import gdal, osr
8-
#workspace_data = "/people/liao313/data/hexwatershed/columbia_river_basin/vector/mosart/"
9-
os.environ['PROJ_LIB'] = '/qfs/people/liao313/.conda/envs/gdalenv/share/proj'
8+
9+
1010
aResolution = ['2th', '4th', '8th', '16th']
1111

1212

@@ -109,7 +109,7 @@
109109
else:
110110
pass
111111

112-
# Save and close everything
112+
#Save and close everything
113113

114114
pDataset = pLayer = pFeature = None
115115

setup.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@
1212
AUTHOR = "Chang Liao"
1313
AUTHOR_EMAIL = "[email protected]"
1414
URL = "https://github.com/changliao1025/pye3sm"
15-
VERSION = "0.0.1"
15+
VERSION = "20210415"
1616
REQUIRES_PYTHON = ">=3.6.0"
1717
KEYWORDS = "Earth Science"
1818

1919
REQUIRED = [
2020
"numpy",
2121
"matplotlib",
22-
"pyearth",
23-
"cartopy"
22+
"pyearth"
2423
]
2524

2625
CLASSIFY = [

tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)