Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get filepaths to downloaded hdf5 granule files #59

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
04042fe
Return filepaths to downloaded hdf5 granule files
weiji14 Jun 4, 2020
d6067c2
Let filepaths be a property under the granules class only
weiji14 Jun 4, 2020
43ed960
Merge branch 'master' into get_granule_filepaths
weiji14 Jun 8, 2020
94acb79
Let travis test everything in icepyx
weiji14 Jun 4, 2020
74dd0e3
Fix test_granule_info
weiji14 Jun 4, 2020
929594e
Fix test_correct_granule_list_returned
weiji14 Jun 8, 2020
8026be1
Reformat CONTRIBUTORS.rst, add myself, fix typo
dshean Jun 16, 2020
58ed1ea
Test everything except behind_NSIDC_API_login.py
weiji14 Jun 16, 2020
16f83e8
add pr builds to travis
JessicaS11 Jun 16, 2020
8da8239
Merge branch 'development' into development
JessicaS11 Jun 16, 2020
f4aee1d
Merge pull request #76 from dshean/development
JessicaS11 Jun 16, 2020
fcbe215
codeblock defined as none is not compatible with pypi markup
loudTom Jun 18, 2020
823cf34
Added T Johnson to list of contributors
loudTom Jun 18, 2020
aefbf6f
Add codecov
Jun 18, 2020
e948fa6
Updated Contributers, added my name
annavalentine Jun 18, 2020
9a7eab6
Add dev requirements and specify travis install
Jun 18, 2020
b71d574
Fix codecov badge links (use icesat2py repo)
Jun 18, 2020
35444ec
Updated installation instructions
loudTom Jun 18, 2020
96bab86
Changed installation instructions on readthedocs
loudTom Jun 18, 2020
ca0b4fe
Merge pull request #84 from icesat2py/anna_dev2
JessicaS11 Jun 18, 2020
7cd1795
Merge branch 'development' into codecov
JessicaS11 Jun 18, 2020
7bf566c
Merge pull request #88 from wallinb/codecov
JessicaS11 Jun 18, 2020
9f25d59
Merge branch 'development' into tj_dev
JessicaS11 Jun 18, 2020
67619f8
Merge pull request #85 from icesat2py/tj_dev
JessicaS11 Jun 18, 2020
9809159
Update codecov badge to point to 'development' branch
wallinb Jun 18, 2020
709cbd0
Merge branch 'development' into tj_docs
JessicaS11 Jun 24, 2020
62ce481
Merge pull request #89 from icesat2py/tj_docs
JessicaS11 Jun 24, 2020
16466f8
Merge branch 'development' into readme-fix
JessicaS11 Jun 24, 2020
98e68fa
Merge pull request #90 from icesat2py/readme-fix
JessicaS11 Jun 24, 2020
9f5e8a4
Merge branch 'development' into travis_test_all
JessicaS11 Jun 26, 2020
82f4aec
Merge pull request #61 from icesat2py/travis_test_all
JessicaS11 Jun 26, 2020
f9d96d1
add try/except for gaierror to address #97 (#98)
tsutterley Jul 6, 2020
6f8103f
add Black (pre-commit hook) and flake8 (PR annotations) runs (#96)
JessicaS11 Jul 7, 2020
af07b77
Docs and travis updates and add pypi build (#95)
JessicaS11 Jul 8, 2020
a1aff67
Merge branch 'development' into get_granule_filepaths
weiji14 Jul 16, 2020
985c6ca
Get list of granule filepaths without triggering a download
weiji14 Jul 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[run]
branch = True
source = icepyx
omit =
setup.py
test/*
doc/*
17 changes: 17 additions & 0 deletions .github/workflows/flake8_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# use the flake8 linter to annotate improperly formatted code
# from: https://github.com/marketplace/actions/run-flake8-on-your-pr-with-annotations
name: Run flake8 linter on PRs

on:
pull_request:
branches:
- development
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Annotate PR after running flake8
uses: TrueBrain/actions-flake8@master
with:
max_line_length: 88
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
37 changes: 29 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,42 @@
language: python

install:
- pip install -r requirements.txt -r requirements-dev.txt
- pip install -e .

stages:
- name: basic tests
if: type = push
if: type = push OR type = pull_request
- name: behind Earthdata
if: branch = master OR commit_message =~ nsidc_tests OR type = cron

#ultimately move basic tests list into a separate script with the list of files to run (then this can be put into a matrix and paralellized as well)
#ultimately move basic tests list into a separate script with the list of files to run (then this can be put into a matrix and parallellized as well)
jobs:
include:
- stage: basic tests
script: pytest icepyx/tests/test_APIformatting.py
icepyx/tests/test_geospatial.py
icepyx/tests/test_is2ref.py
icepyx/tests/test_validate_inputs.py

script: pytest icepyx/ --ignore icepyx/tests/behind_NSIDC_API_login.py
after_success: codecov

# - stage: behind Earthdata
# script:
# script:
# - export NSIDC_LOGIN=$NSIDC_LOGIN
# - pytest icepyx/tests/behind_NSIDC_API_login.py

deploy:
- provider: pypi
server: https://test.pypi.org/legacy/
username: "__token__"
password: $test_PyPI_API_Token
on:
branch: development
condition: commit_message = test_pypi
skip_existing: true
- provider: pypi
username: "__token__"
password: $PyPI_API_Token
on:
branch: master
tags: true
skip_existing: true
# script:
# - export PyPI_API_Token=$PyPI_API_Token
25 changes: 14 additions & 11 deletions CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ Project Contributors

The following people have made contributions to the project (in alphabetical
order by last name) and are considered "The icepyx Developers":
* [Anthony Arendt](https://github.com/aaarendt/) - University of Washington
* [Shashank Bhushan](https://github.com/ShashankBice) - University of Washington
* [Raphael Hagen](https://github.com/norlandrhagen) - University of Washington
* [Scott Henderson](https://github.com/scottyhq) - University of Washington
* [Zheng Liu](https://github.com/liuzheng-arctic) - University of Washington
* [Joakim Meyer](https://github.com/jomey) - University of Utah
* [Fernando Perez](https://github.com/fperez) - University of California, Berkeley
* [Jessica Scheick](https://github.com/jessicas11) - Unaffiliated (ORCID: [0000-0002-3421-4459](https://www.orcid.org/0000-0002-3421-4459))
* [Ben Smith](https://github.com/smithb) - University of Washington
* [Amy Steiker](https://github.com/asteiker) - NSIDC, University of Colorado
* [Bidhyananda Yadav](https://github.com/bidhya) - Ohio State University

* `Anthony Arendt <https://github.com/aaarendt/>`_ - University of Washington
* `Shashank Bhushan <https://github.com/ShashankBice>`_ - University of Washington
* `Raphael Hagen <https://github.com/norlandrhagen>`_ - University of Washington
* `Scott Henderson <https://github.com/scottyhq>`_ - University of Washington
* `Thomas Johnson <https://github.com/loudTom>`_ - University College London
* `Zheng Liu <https://github.com/liuzheng-arctic>`_ - University of Washington
* `Joachim Meyer <https://github.com/jomey>`_ - University of Utah
* `Fernando Perez <https://github.com/fperez>`_ - University of California, Berkeley
* `Jessica Scheick <https://github.com/jessicas11>`_ - Unaffiliated (ORCID: `0000-0002-3421-4459 <https://www.orcid.org/0000-0002-3421-4459>`_)
* `David Shean <https://github.com/dshean>`_ - University of Washington
* `Ben Smith <https://github.com/smithb>`_ - University of Washington
* `Amy Steiker <https://github.com/asteiker>`_ - NSIDC, University of Colorado
* `Bidhyananda Yadav <https://github.com/bidhya>`_ - Ohio State University
* `Anna Valentine <https://github.com/annavalentine>`_ - Colorado School of Mines
50 changes: 37 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ icepyx

**Python tools for obtaining and working with ICESat-2 data**

|Documentation Status| |GitHub license| |Travis CI Status|
|Documentation Status| |GitHub license| |Travis CI Status| |Code Coverage|

.. |Documentation Status| image:: https://readthedocs.org/projects/icepyx/badge/?version=latest
:target: http://icepyx.readthedocs.io/?badge=latest
Expand All @@ -14,6 +14,9 @@ icepyx
.. |Travis CI Status| image:: https://travis-ci.org/icesat2py/icepyx.svg?branch=master
:target: https://travis-ci.org/icesat2py/icepyx

.. |Code Coverage| image:: https://codecov.io/gh/icesat2py/icepyx/branch/development/graph/badge.svg
:target: https://codecov.io/gh/icesat2py/icepyx

Origin and Purpose
------------------
icepyx is both a software library and a community composed of ICESat-2 data users, developers, and the scientific community. We are working together to develop a shared library of resources - including existing resources, new code, tutorials, and use-cases/examples - that simplify the process of querying, obtaining, analyzing, and manipulating ICESat-2 datasets to enable scientific discovery.
Expand All @@ -26,35 +29,56 @@ This project combines and generalizes these scripts into a unified framework, ma


.. _`zipped file`: https://github.com/icesat2py/icepyx/archive/master.zip
.. _`Fiona`: https://pypi.org/project/Fiona/

Installation
------------
Currently icepyx is only available for use as a github repository.
The contents of the repository can be download as a `zipped file`_ or cloned.
The simplest way to install icepyx is using pip.

.. code-block::

pip install icepyx


Windows users will need to first install `Fiona`_, please look at the instructions there. Windows users may consider installing Fiona using pipwin

.. code-block::

pip install pipwin
pipwin install Fiona

To use icepyx, fork this repo to your own account, then ``git clone`` the repo onto your system.
Provided the location of the repo is part of your $PYTHONPATH,
you should simply be able to add ``import icepyx`` to your Python document.

Currently, updated packages are not automatically generated with each build. This means it is possible that pip will not install the latest release of icepyx. In this case, icepyx is also available for use via the GitHub repository. The contents of the repository can be download as a `zipped file`_ or cloned.

To use icepyx this way, fork this repo to your own account, then git clone the repo onto your system.
To clone the repository:

.. code-block:: none
.. code-block::

git clone https://github.com/icesat2py/icepyx.git


Future developments of icepyx may include pip and conda as simplified installation options.
Provided the location of the repo is part of your $PYTHONPATH, you should simply be able to add import icepyx to your Python document.
Alternatively, in a command line or terminal, navigate to the folder in your cloned repository containing setup.py and run

.. code-block::

pip install -e


Future developments of icepyx may include conda as another simplified installation option.


Examples (Jupyter Notebooks)
----------------------------

.. _`ICESat-2_DAAC_DataAccess_Example`: ICESat-2_DAAC_DataAccess_Example.ipynb
Listed below are example jupyter-notebooks

`ICESat-2_DAAC_DataAccess_Example <https://github.com/icesat2py/icepyx/blob/master/examples/ICESat-2_DAAC_DataAccess_Example.ipynb>`_

Listed below are example jupyter-notebooks
`ICESat-2_DAAC_DataAccess2_Subsetting <https://github.com/icesat2py/icepyx/blob/master/examples/ICESat-2_DAAC_DataAccess2_Subsetting.ipynb>`_

ICESat-2_DAAC_DataAccess_Example_
`ICESat-2_DEM_comparison_Colombia_working <https://github.com/icesat2py/icepyx/blob/master/examples/ICESat-2_DEM_comparison_Colombia_working.ipynb>`_


Citing icepyx
Expand All @@ -72,7 +96,7 @@ Come join the conversation at: https://discourse.pangeo.io/.
Search for "icesat-2" under the "science" topic to find us.

.. _`icepyx`: https://github.com/icesat2py/icepyx
.. _`contribution guidelines`: ./doc/source/development/contribution_guidelines.rst
.. _`contribution guidelines`: ./doc/source/contributing/contribution_guidelines.rst

Contribute
----------
Expand All @@ -82,4 +106,4 @@ Check out our `contribution guidelines`_ to see how you can contribute.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. |Contributor Covenant|

.. |Contributor Covenant| image:: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg
:target: code_of_conduct.md
:target: code_of_conduct.md
56 changes: 29 additions & 27 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))

sys.path.insert(0, os.path.abspath("../.."))
import datetime

import icepyx
Expand All @@ -21,9 +22,9 @@

# -- Project information -----------------------------------------------------

project = 'icepyx'
project = "icepyx"
year = datetime.date.today().year
copyright = '2019-{}, The icepyx Developers'.format(year)
copyright = "2019-{}, The icepyx Developers".format(year)

# -- General configuration ---------------------------------------------------

Expand All @@ -35,24 +36,19 @@
"sphinx.ext.autosectionlabel",
"numpydoc",
"nbsphinx",
"recommonmark"

"recommonmark",
]
source_suffix = {
'.rst': 'restructuredtext',
'.txt': 'markdown',
'.md': 'markdown',
}
source_suffix = {".rst": "restructuredtext", ".txt": "markdown", ".md": "markdown"}
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['**.ipynb_checkpoints']
exclude_patterns = ["**.ipynb_checkpoints"]

# location of master document (by default sphinx looks for contents.rst)
master_doc = 'index'
master_doc = "index"


# -- Configuration options ---------------------------------------------------
Expand All @@ -68,24 +64,30 @@
# html_theme = 'alabaster'
html_theme = "sphinx_rtd_theme"
html_theme_options = {
'logo_only': True,
'display_version': False,
'prev_next_buttons_location': None,
'navigation_depth': 4,
'collapse_navigation': True
"logo_only": True,
"display_version": False,
"prev_next_buttons_location": None,
"navigation_depth": 4,
"collapse_navigation": True,
}
html_logo = '_static/icepyx_v2_oval_orig_nobackgr.png'
html_favicon = '_static/icepyx_v2_oval_tiny-uml_nobackgr.png'
html_static_path = ['_static']
html_logo = "_static/icepyx_v2_oval_orig_nobackgr.png"
html_favicon = "_static/icepyx_v2_oval_tiny-uml_nobackgr.png"
html_static_path = ["_static"]

html_context = {
'menu_links_name': '',
'menu_links': [
('<i class="fa fa-github fa-fw"></i> icepyx Github', 'https://github.com/icesat2py/icepyx'),
('<i class="fa fa-comments fa-fw"></i> Pangeo Discourse', 'https://discourse.pangeo.io/t/icepyx-python-tools-for-icesat-2-data/404/2')

]
"menu_links_name": "",
"menu_links": [
(
'<i class="fa fa-github fa-fw"></i> icepyx Github',
"https://github.com/icesat2py/icepyx",
),
(
'<i class="fa fa-comments fa-fw"></i> Pangeo Discourse',
"https://discourse.pangeo.io/t/icepyx-python-tools-for-icesat-2-data/404/2",
),
],
}


def setup(app):
app.add_stylesheet("style.css")
20 changes: 11 additions & 9 deletions doc/source/contributing/contribution_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,28 @@ Find the *Issues* tab at the top of GitHub repository and click *New Issue* butt
Questions and Help
------------------

Please do not create issues to ask for help. A faster way to reach the community is through our Science/ICESat-2 subcategory on the `Pangeo discourse <https://discourse.pangeo.io/c/science/icesat-2/16>`_ page. We are excited to have you join an existing conversation or start a new post! Please note that a github login is required to post on the discourse page.
Please do not create issues to ask for help. A faster way to reach the community is through our Science/ICESat-2 subcategory on the `Pangeo discourse <https://discourse.pangeo.io/c/science/icesat-2/16>`_ page. We are excited to have you join an existing conversation or start a new post! Please note that a GitHub login is required to post on the discourse page.

Other Resources
^^^^^^^^^^^^^^^
- We are currently working on compiling a list of resources for working with ICESat-2 data (in the meantime, check out the `2019 ICESat-2 Hackweek repo <https://github.com/ICESAT-2HackWeek>`_ and `consider applying for this year's Hackweek <https://icesat-2hackweek.github.io/>`_)
- Check out our :ref:`ICESat-2 Open-Source Resources Guide<resource_ref_label>` for a host of tools and code for getting and working with ICESat-2 data
- The `2019 ICESat-2 Hackweek Tutorial repo <https://github.com/ICESAT-2HackWeek/ICESat2_hackweek_tutorials>`_ and [in progress] `2020 ICESat-2 Hackweek Tutorial repo <https://github.com/ICESAT-2HackWeek/2020_ICESat-2_Hackweek_Tutorials>`_ are great resources for learning basic Python and development skills, learning about ICESat-2 data, setting up a computational environment, and finding and analyzing ICESat-2 datasets.
- A great set of `interactive tutorials <https://learngitbranching.js.org>`_ for learning and practicing using git
- Let us know about the helpful tools you've found by posting on our discourse forum as indicated above (`Questions and Help`_)!


Adding Examples
---------------
We are delighted you'd like to contribute your `icepyx <https://github.com/icesat2py/icepyx>`_ example! Examples may be in the form of executable scripts or interactive Jupyter Notebooks. Please make sure that each example has a descriptive name so someone not familiar with your project understands its general behavior. Fully working examples should be submitted using a pull request to the "examples" branch, following the steps outlined below for `Contributing Code`_.
We are delighted you'd like to contribute your `icepyx <https://github.com/icesat2py/icepyx>`_ example! Examples may be in the form of executable scripts or interactive Jupyter Notebooks. Please make sure that each example has a descriptive name so someone not familiar with your project understands its general behavior. Fully working examples should be submitted using a pull request to the "development" branch, following the steps outlined below for `Contributing Code`_.


Contributing Code
-----------------
We follow a standard git workflow for code changes and additions. All submitted code, including our own, goes through the pull request process; no changes are pushed directly to the *master* branch. This allows our continuous integration (testing) process to ensure that the code is up to our standards and passes all of our tests (i.e. doesn't break what's already there and working). It also means that the *master* branch remains stable even as new features are being developed.
We follow a standard git workflow for code changes and additions. All submitted code, including our own, goes through the pull request process; no changes are pushed directly to the *master* or *development* branches. This allows our continuous integration (testing) process to ensure that the code is up to our standards and passes all of our tests (i.e. doesn't break what's already there and working). By having a *development* branch for daily work, we enable the *master* branch to remain stable between releases even as new features are being added.

First Steps
^^^^^^^^^^^
Before you even begin writing code, please first check out our issues page. Someone may already be working on the same problem, and you may be able to contribute directly to their efforts. If not, create a new issue to describe what you plan to do.
Before you begin writing code, please first check out our issues page. Someone may already be working on the same problem, and you may be able to contribute directly to their efforts. If not, create a new issue to describe what you plan to do.

General Guidelines
^^^^^^^^^^^^^^^^^^
Expand All @@ -75,14 +76,15 @@ We encourage users to follow the `git pull request workflow <https://www.asmeure
- Clone the repository
- Fork the repo to your personal GitHub account
- Add your fork as a remote
- Add yourself to `CONTRIBUTORS.rst` (see `Attribution for Contributions`_)

(each time you make changes)
(each time you are going to make changes)

- Update the master
- Create a branch
- Update the development branch
- Create a new branch
- Make your changes and commit them to the branch
- Push your changes to your fork
- Make a pull request (on GitHub)
- Make a pull request (on GitHub; pull requests will automatically be made against the development branch)
- Push any additional, relevant changes to the same pull request (this will happen automatically if you push the changes to the same branch from which you made the pull request)

Licensing
Expand Down
3 changes: 0 additions & 3 deletions doc/source/getting_started/citation_link.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
Citing icepyx
=============

.. include:: ../../../CITATION.rst
2 changes: 1 addition & 1 deletion doc/source/getting_started/example_link.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Examples
========

.. include:: ../../examples/examples.rst
.. include:: ../../../examples/examples.rst
Loading