Skip to content

Commit 79effcf

Browse files
authored
feat: add changes for uploading to pypi (#75)
1 parent bbd837f commit 79effcf

File tree

14 files changed

+168
-36
lines changed

14 files changed

+168
-36
lines changed

.binder/environment.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: read-GRACE-harmonics
1+
name: gravity_toolkit
22
channels:
33
- conda-forge
44
dependencies:
@@ -23,5 +23,4 @@ dependencies:
2323
- tk
2424
- pip
2525
- pip:
26-
- git+https://github.com/tsutterley/read-GRACE-geocenter.git
2726
- git+https://github.com/tsutterley/geoid-toolkit.git
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
deploy:
12+
13+
runs-on: ubuntu-20.04
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.x'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
- name: Build and publish
26+
env:
27+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29+
run: |
30+
python setup.py sdist bdist_wheel
31+
twine upload dist/*
32+

.github/workflows/python-request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
- name: Create conda Test Environment
3434
run: |
3535
conda install flake8 pytest pytest-cov cython
36+
pip install git+https://github.com/tsutterley/read-GRACE-geocenter.git
3637
- name: Lint with flake8
3738
run: |
3839
# stop the build if there are Python syntax errors or undefined names

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@
3030
.Rhistory
3131
__pycache__
3232
build/
33-
run/
33+
dist/
3434
develop-eggs/
35+
run/
3536
wheels/
37+
.eggs/
3638
*.egg-info/
3739
.installed.cfg
3840
*.egg
41+
.pytest_cache
42+
pythonenv*/
3943
# OS generated files #
4044
######################
4145
.DS_Store
@@ -77,6 +81,7 @@ Thumbs.db
7781
*.sw*
7882
*.hidden
7983
None*.png
84+
*.gfc
8085
# Jupyter Checkpoints #
8186
#######################
8287
.ipynb_checkpoints

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ RUN pip3 install --no-cache-dir --no-binary=cartopy \
3434
python-dateutil \
3535
pyyaml \
3636
scipy && \
37-
pip3 install --no-cache-dir --no-deps git+https://github.com/tsutterley/read-GRACE-geocenter.git && \
3837
pip3 install --no-cache-dir --no-deps git+https://github.com/tsutterley/geoid-toolkit.git
3938

4039
COPY . .

README.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ read-GRACE-harmonics
1515
.. |License| image:: https://img.shields.io/github/license/tsutterley/read-grace-harmonics
1616
:target: https://github.com/tsutterley/read-GRACE-harmonics/blob/main/LICENSE
1717

18+
.. |PyPI Version| image:: https://img.shields.io/pypi/v/gravity-toolkit.svg
19+
:target: https://pypi.python.org/pypi/gravity-toolkit/
20+
1821
.. |Documentation Status| image:: https://readthedocs.org/projects/read-grace-harmonics/badge/?version=latest
1922
:target: https://read-grace-harmonics.readthedocs.io/en/latest/?badge=latest
2023

@@ -53,7 +56,6 @@ Dependencies
5356
- `cartopy: Python package designed for geospatial data processing <https://scitools.org.uk/cartopy/docs/latest/>`_
5457
- `netCDF4: Python interface to the netCDF C library <https://unidata.github.io/netcdf4-python/>`_
5558
- `h5py: Python interface for Hierarchal Data Format 5 (HDF5) <https://www.h5py.org/>`_
56-
- `read-GRACE-geocenter: Python reader for GRACE/GRACE-FO geocenter data <https://github.com/tsutterley/read-GRACE-geocenter/>`_
5759
- `geoid-toolkit: Python utilities for calculating geoid heights from static gravity field coefficients <https://github.com/tsutterley/geoid-toolkit/>`_
5860

5961
References

doc/environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,5 @@ dependencies:
3333
- texlive-core
3434
- tk
3535
- pip:
36-
- git+https://github.com/tsutterley/read-GRACE-geocenter.git
3736
- git+https://github.com/tsutterley/geoid-toolkit.git
3837
- ..

doc/source/getting_started/Examples.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ Examples
77
Jupyter Notebooks providing demonstrations of the functionality within ``read-GRACE-harmonics``:
88

99
- Creating Spatial Maps |github spatial| |nbviewer spatial|
10-
Creates an animation of spatial maps on a global Equirectangular projection using data derived from the monthly GRACE/GRACE-FO Level-2 spherical harmonic product
10+
Creates an animation of spatial maps using data derived from the monthly GRACE/GRACE-FO Level-2 spherical harmonic product
11+
- Creating Spatial Error Maps |github error| |nbviewer error|
12+
Creates spatial maps of estimated GRACE/GRACE-FO errors derived from the monthly Level-2 spherical harmonic product
1113
- Creating Harmonic Plots |github harmonic| |nbviewer harmonic|
1214
Creates an animation of triangle plots that visualize the GRACE/GRACE-FO Level-2 spherical harmonic product
1315

@@ -17,6 +19,12 @@ Jupyter Notebooks providing demonstrations of the functionality within ``read-GR
1719
.. |nbviewer spatial| image:: https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg
1820
:target: https://nbviewer.jupyter.org/github/tsutterley/read-GRACE-harmonics/blob/main/notebooks/GRACE-Spatial-Maps.ipynb
1921

22+
.. |github error| image:: https://img.shields.io/badge/GitHub-view-6f42c1?style=flat&logo=Github
23+
:target: https://github.com/tsutterley/read-GRACE-harmonics/blob/main/notebooks/GRACE-Spatial-Error.ipynb
24+
25+
.. |nbviewer error| image:: https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg
26+
:target: https://nbviewer.jupyter.org/github/tsutterley/read-GRACE-harmonics/blob/main/notebooks/GRACE-Spatial-Error.ipynb
27+
2028
.. |github harmonic| image:: https://img.shields.io/badge/GitHub-view-6f42c1?style=flat&logo=Github
2129
:target: https://github.com/tsutterley/read-GRACE-harmonics/blob/main/notebooks/GRACE-Harmonic-Plots.ipynb
2230

doc/source/getting_started/Install.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
Installation
33
============
44

5-
Presently ``read-GRACE-harmonics`` is only available for use as a `GitHub repository <https://github.com/tsutterley/read-GRACE-harmonics>`_.
5+
``read-GRACE-harmonics`` is available for download from the `GitHub repository <https://github.com/tsutterley/read-GRACE-harmonics>`_,
6+
and the `Python Package Index (pypi) <https://pypi.org/project/gravity-toolkit/>`_,
67
The contents of the repository can be download as a `zipped file <https://github.com/tsutterley/read-GRACE-harmonics/archive/main.zip>`_ or cloned.
78

89
To use this repository, please fork into your own account and then clone onto your system:
@@ -29,6 +30,11 @@ Alternatively can install the ``gravity_toolkit`` utilities directly from GitHub
2930
3031
python3 -m pip install --user git+https://github.com/tsutterley/read-GRACE-harmonics.git
3132
32-
Executable versions of this repository can also be tested using
33-
`Binder <https://mybinder.org/v2/gh/tsutterley/read-GRACE-harmonics/main>`_ or
34-
`Pangeo <https://aws-uswest2-binder.pangeo.io/v2/gh/tsutterley/read-GRACE-harmonics/main?urlpath=lab>`_.
33+
| This repository can be also tested using `BinderHub <https://github.com/jupyterhub/binderhub>`_ platforms:
34+
| |Binder| |Pangeo|
35+
36+
.. |Binder| image:: https://mybinder.org/badge_logo.svg
37+
:target: https://mybinder.org/v2/gh/tsutterley/read-GRACE-harmonics/main
38+
39+
.. |Pangeo| image:: https://img.shields.io/static/v1.svg?logo=Jupyter&label=PangeoBinderAWS&message=us-west-2&color=orange
40+
:target: https://aws-uswest2-binder.pangeo.io/v2/gh/tsutterley/read-GRACE-harmonics/main?urlpath=lab

doc/source/getting_started/NASA-Earthdata.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ The `Physical Oceanography Distributed Active Archive Center (PO.DAAC) <https://
2020
provides data and related information pertaining to the physical processes and conditions of the global oceans,
2121
including measurements of ocean winds, temperature, topography, salinity, circulation and currents, and sea ice.
2222
PO.DAAC hosts
23+
24+
PO.DAAC is `migrating its data archive to the Earthdata Cloud <https://podaac.jpl.nasa.gov/cloud-datasets/migration>`_,
25+
which is hosted in Amazon Web Services (AWS).
26+
GRACE/GRACE-FO spherical harmonic data is currently scheduled to be "cloud enabled"
27+
during Phase 4 and Phase 5 of the transition, slated for April and July 2022 respectively.
28+
2329
If any problems contact JPL PO.DAAC support at `podaac@podaac.jpl.nasa.gov <mailto:podaac@podaac.jpl.nasa.gov>`_
2430
or the NASA EOSDIS support team `support@earthdata.nasa.gov <mailto:support@earthdata.nasa.gov>`_.
2531

0 commit comments

Comments
 (0)