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

bump minimum python versions #135

Merged
merged 7 commits into from
May 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies:
- panel
- pip
- pyproj
- python=3.8
- python=3.9
- pyyaml
- pystac
- pytest
Expand Down
27 changes: 22 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,35 @@ jobs:
strategy:
fail-fast: false
matrix:
CONDA_ENV: [3.7, 3.8, 3.9, upstream]
CONDA_ENV: ["3.8", "3.9", "3.10", "upstream"]
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3

- name: Setup Miniconda
- name: Cache Conda Packages
uses: actions/cache@v3
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: conda-${{ env.CACHE_NUMBER }}-${{hashFiles(format('ci/environment-{0}.yml',matrix.CONDA_ENV)) }}

- name: Cache Pip Packages (upstream environment)
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('ci/environment-upstream.yml') }}

- name: Setup Miniconda (Mambaforge)
uses: conda-incubator/[email protected]
with:
auto-update-conda: true
auto-activate-base: false
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
activate-environment: intake-stac
environment-file: ci/environment-${{ matrix.CONDA_ENV }}.yml
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!

- name: Development Install Intake-STAC
shell: bash -l {0}
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -10,7 +10,7 @@ repos:
- id: double-quote-string-fixer

- repo: https://github.com/ambv/black
rev: 22.1.0
rev: 22.3.0
hooks:
- id: black
args: ["--line-length", "100", "--skip-string-normalization"]
Expand All @@ -29,6 +29,6 @@ repos:
- id: isort

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
rev: v2.6.2
hooks:
- id: prettier
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,23 @@ $ pip install git+https://github.com/intake/intake-stac
## Quickstart

```python
from intake import open_stac_catalog
catalog_url = 'https://raw.githubusercontent.com/cholmes/sample-stac/master/stac/catalog.json'
cat = open_stac_catalog(catalog_url)
cat['Houston-East-20170831-103f-100d-0f4f-RGB'].metadata
da = cat['Houston-East-20170831-103f-100d-0f4f-RGB']['thumbnail'].to_dask()
import intake

catalog_url = 'https://www.planet.com/data/stac/catalog.json'
cat = intake.open_stac_catalog(catalog_url)

collection = cat['planet-disaster-data']
subset = collection['hurricane-harvey']['hurricane-harvey-0831']
item = subset['Houston-East-20170831-103f-100d-0f4f-RGB']

da = item['thumbnail'].to_dask()
da
```

The [examples/](examples/) directory contains several Jupyter Notebooks illustrating common workflows.

[STAC Index](https://stacindex.org/catalogs) is a convenient website for finding datasets with STACs

#### Versions

To install a specific version of intake-stac, specify the version in the install command
Expand All @@ -53,8 +60,7 @@ The table below shows the corresponding versions between intake-stac and STAC:
| ----------- | ----------- |
| 0.2.x | 0.6.x |
| 0.3.x | 1.0.0-betaX |
| 0.4.x | 1.0.0-betaX |
| 1.0.0 | 1.0.0 |
| 0.4.x | 1.0.0 |

## About

Expand Down
2 changes: 1 addition & 1 deletion ci/environment-3.7.yml → ci/environment-3.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: intake-stac
channels:
- conda-forge
dependencies:
- python=3.7
- python=3.10
- fsspec
- geopandas
- intake
Expand Down
18 changes: 14 additions & 4 deletions ci/environment-dev.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,53 @@
# everything except jupyterlab and plotting libraries
# Intake GUI also requires jupyterlab extensions installed
# conda env create -f ci/environment-dev.yml
# conda activate intake-stac-dev
name: intake-stac-dev
channels:
- conda-forge
dependencies:
- python=3.7
- python
- aiohttp
- autopep8
- black
- boto3
- codecov
- coverage
- dask
- datashader
- distributed
- flake8
- geopandas
- geoviews
- hvplot
- intake
- intake-geopandas
- intake-parquet
- intake-xarray
- ipykernel
- ipywidgets
- isort
- jupyterlab
- make
- matplotlib
- nbsphinx
- netcdf4
- numpy
- numpydoc
- pandoc
- panel
- pip
- pre_commit
- pystac
- pystac-client
- pytest
- pytest-cov
- pytoml
- pyyaml
- rasterio
- recommonmark
- requests
- sat-search>=0.3
- scikit-image
- sphinx-copybutton
- sphinx_rtd_theme
- sphinx>=1.6
- sphinx >=1.6
- xarray
4 changes: 2 additions & 2 deletions ci/environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python=3.9
- python
- aiohttp
- fsspec
- geopandas
Expand All @@ -16,9 +16,9 @@ dependencies:
- pillow
- pip
- pystac
- pystac-client
- pytest-cov
- rasterio
- sat-search
- scikit-image
- sphinx
- sphinx_rtd_theme
Expand Down
57 changes: 0 additions & 57 deletions ci/environment-gui.yml

This file was deleted.

9 changes: 2 additions & 7 deletions ci/environment-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@ name: intake-stac
channels:
- conda-forge
dependencies:
- python=3.8
- fsspec
- python
- geopandas
- intake
- intake-xarray
- pip
- pystac
- pytest-cov
- rasterio
- xarray
- pip:
- git+https://github.com/intake/filesystem_spec.git
- git+https://github.com/fsspec/filesystem_spec.git
- git+https://github.com/stac-utils/pystac.git
- git+https://github.com/sat-utils/sat-search.git
- git+https://github.com/intake/intake.git
- git+https://github.com/intake/intake-xarray.git
- git+https://github.com/intake/intake_geopandas.git
Expand Down
4 changes: 2 additions & 2 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ without using a local copy. This can be convenient for small fixes.

.. code:: bash

$ conda env create -f ci/environment-dev.yml
$ conda env create -f ci/environment-docs.yml
$ cd docs
$ make html

Expand Down Expand Up @@ -105,7 +105,7 @@ Preparing Pull Requests

$ conda env create -f ci/environment-dev.yml
$ conda activate intake-stac-dev
$ pip install . -e
$ pip install -e .


#. Install `pre-commit <https://pre-commit.com>`_ and its hook on the intake-stac repo::
Expand Down
Loading