Skip to content

Commit

Permalink
Merge pull request #82 from nsidc/0.3
Browse files Browse the repository at this point in the history
0.3 pre-release
  • Loading branch information
betolink authored Apr 27, 2022
2 parents 32dfc95 + 0186b19 commit 2f2d666
Show file tree
Hide file tree
Showing 30 changed files with 3,347 additions and 481 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Documentation

on:
push:

jobs:
documentation:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.9
channels: conda-forge
mamba-version: "*"
activate-environment: earthdata-dev
environment-file: binder/environment.yml
- name: Get full python version
id: full-python-version
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
- name: Install poetry
run: |
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
python get-poetry.py -y
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Configure poetry
run: poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v1
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
- name: Install Dependencies
run: poetry install
- name: Build docs
run: poetry run bash scripts/build-docs.sh

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
python_version: "3.8"
python_version: "3.9"
pypi_token: ${{ secrets.PYPI_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.8, 3.9, '3.10']
fail-fast: false

steps:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea
.ipynb_checkpoints
.python-version
.mypy_cache
__pycache__
.pytest_cache
Expand All @@ -15,6 +16,7 @@ Pipfile
Pipfile.lock
build/
*.egg-info/
docs/tutorials/data

# OS X
.DS_Store
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog

## [Unreleased]

- Fixed bug with CMR tokens
- dropped python 3.7 support
- updated python-cmr to NASA fork
- added documentation for readthedocs and github
- Auth can refresh CMR tokens
- Dropped unused `pydantic` dependency
- Added missing `python-datutil` dependency

Expand Down
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,14 @@ help:
# adds anything that has a double # comment to the phony help list
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ".:*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

python-three-seven:
python-three-seven: ## setup python3.7 virtual environment using poetry
poetry env use python3.7
poetry install

python-three-eight:
python-three-eight: ## setup python3.6 virtual environment using poetry
python-three-eight: ## setup python3.8 virtual environment using poetry
poetry env use python3.8
poetry install

python-three-nine:
python-three-nine: ## setup python3.6 virtual environment using poetry
python-three-nine: ## setup python3.9 virtual environment using poetry
poetry env use python3.9
poetry install

Expand Down
18 changes: 12 additions & 6 deletions binder/environment.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: earthdata-dev
channels:
- conda-forge
- nodefaults
dependencies:
- python=3.9
- jupyterlab=3
- xarray>=0.19
- rioxarray>=0.3
- matplotlib-base>=3.3
Expand All @@ -14,10 +14,16 @@ dependencies:
- h5py>=3.2
- geopandas>=0.9
- zarr>=2.9.5
- s3fs
- dask
- earthdata
# documentation
- jupyterlab>=3
- mkdocs>=1.2
- mkdocs-material>=7.1, <9.0
- markdown-include>=0.6
- mkdocstrings>=0.18
- mkdocs-jupyter=0.18.0
- pymdown-extensions=9.2
- pygments=2.11.1
- pip
- pip:
- pqdm
- zarr-eosdis-store
- earthdata
- zarr-eosdis-store
Binary file added docs/earth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
hide:
- toc
---


# earthdata 🌍

<p align="center">
Expand All @@ -21,7 +27,9 @@
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black">
</a>

</p>

---

## Overview

Expand Down Expand Up @@ -52,7 +60,7 @@ poetry install

## Example Usage

```python
```py
from earthdata import Auth, DataGranules, DataCollections, Store

auth = Auth().login() # if we want to access NASA DATA in the cloud
Expand Down Expand Up @@ -104,7 +112,7 @@ See [Code of Conduct](CODE_OF_CONDUCT.md)

* This repository is not actively supported by NSIDC but we welcome issue submissions and pull requests in order to foster community contribution.

<img src="docs/nsidc-logo.png" width="84px" />
<img src="nsidc-logo.png" width="84px" />

## Contributing Guide

Expand Down
Empty file.
Loading

0 comments on commit 2f2d666

Please sign in to comment.