Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aazuspan/sankee
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.4
Choose a base ref
...
head repository: aazuspan/sankee
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.2.5
Choose a head ref
  • 8 commits
  • 24 files changed
  • 2 contributors

Commits on Jun 29, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1242246 View commit details

Commits on Jul 1, 2023

  1. Migrate to ruff (#50)

    aazuspan authored Jul 1, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    21e1f68 View commit details
  2. Copy the full SHA
    a320ec0 View commit details

Commits on Mar 8, 2024

  1. Empty collection testing (#53)

    * Swap black for ruff format
    
    * Redefine ruff line length
    
    * Modify error handling for empty collections
    
    It looks like Earth Engine no longer raises a specific error for
    sampling random points within a single point, so the error handling
    and testing were modified for the more specific case of an empty
    sampling region, e.g. a FeatureCollection with zero features.
    
    In the process, the sampling error handling was refactored and a
    new SamplingError class was added. SamplingError inherits from
    ValueError which was the previous error type, so this shouldn't
    affect any downstream error handling.
    
    * Fix pandas deprecation warning
    
    * Update auth mode
    
    * Update auth mode
    
    * Reset auth mode
    
    * Update CI
    aazuspan authored Mar 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    800ce4f View commit details
  2. Update README.md

    aazuspan authored Mar 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    eaa871f View commit details
  3. Update README.md

    aazuspan authored Mar 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ea46b21 View commit details

Commits on Mar 12, 2024

  1. Docstring and typing fixes (#54)

    aazuspan authored Mar 12, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    75d61a1 View commit details

Commits on Mar 13, 2024

  1. Fix bug when all classes are hidden (#55)

    * Docstring and typing fixes
    
    * Deprecations and private methods
    
    * Fix bug when all classes are interactively hidden
    
    Hiding all classes would throw an exception related to mismatched
    data types during some internal update of the widget state. I traced
    that back to the `SankeyPlot.plot.data[0].link` update and found it
    broke if you used the link data from a `go.Sankey` that was
    initialized with `link_kwargs`. Instead, intitializing with an empty
    `go.Sankey` seems to solve the issue. That only arises if all classes
    are hidden, so I just threw in an early return of an empty `go.Sankey`
    in that case.
    aazuspan authored Mar 13, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    61ef35e View commit details
9 changes: 0 additions & 9 deletions .bumpversion.cfg

This file was deleted.

9 changes: 0 additions & 9 deletions .git-hooks/pre-commit

This file was deleted.

9 changes: 0 additions & 9 deletions .github/scripts/make_ee_token.py

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: tests

on: push

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
- name: Write persistent EE credentials
env:
EE_TOKEN: ${{ secrets.EE_TOKEN }}
run: |
mkdir -p /home/runner/.config/earthengine
echo $EE_TOKEN > /home/runner/.config/earthengine/credentials
- name: Test with pytest
run: |
hatch run test:all
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
- name: Run pre-commit hooks
uses: pre-commit/action@v3.0.0
42 changes: 0 additions & 42 deletions .github/workflows/coverage.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/test.yml

This file was deleted.

21 changes: 4 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 21.7b0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.4
hooks:
- id: black
args: [--line-length=100]

- repo: https://github.com/pycqa/isort
rev: 5.8.0
hooks:
- id: isort
args: [--profile, black]

- repo: https://github.com/pycqa/flake8
rev: 4.0.0
hooks:
- id: flake8
args: [--max-line-length=100]
exclude: docs|tests|setup.py
- id: ruff
- id: ruff-format
54 changes: 0 additions & 54 deletions Makefile

This file was deleted.

21 changes: 0 additions & 21 deletions Pipfile

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/aazuspan/sankee/HEAD?filepath=docs%2Fexamples%2Fmodis_snow_and_ice.ipynb)
[![conda-forge link](https://img.shields.io/conda/vn/conda-forge/sankee)](https://anaconda.org/conda-forge/sankee)
[![conda-forge link](https://img.shields.io/pypi/v/sankee)](https://pypi.org/project/sankee)
[![Testing workflow](https://github.com/aazuspan/sankee/actions/workflows/test.yml/badge.svg)](https://github.com/aazuspan/sankee/actions/workflows/test.yml)
[![Testing workflow](https://github.com/aazuspan/sankee/actions/workflows/ci.yml/badge.svg)](https://github.com/aazuspan/sankee/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/aazuspan/sankee/branch/main/graph/badge.svg?token=39REP2HZQC)](https://codecov.io/gh/aazuspan/sankee)
[![Read the Docs](https://readthedocs.org/projects/sankee/badge/?version=latest&style=flat)](https://sankee.readthedocs.io/en/latest/?badge=latest)
[![Downloads](https://pepy.tech/badge/sankee)](https://pepy.tech/project/sankee)
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -15,13 +15,14 @@

sys.path.insert(0, os.path.abspath(".."))

from sankee import __version__

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

project = "sankee"
copyright = "2021, Aaron Zuspan"
author = "Aaron Zuspan"
version = "v0.2.4"
version = __version__


# -- General configuration ---------------------------------------------------
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sphinx<7
nbsphinx
sphinx_rtd_theme
86 changes: 86 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "sankee"
dynamic = ["version"]
description = "Visualize classified time series data with interactive Sankey plots in Google Earth Engine."
readme = "README.md"
license = "MIT"
requires-python = ">=3.8"
authors = [
{ name = "Aaron Zuspan", email = "aazuspan@gmail.com" },
]
keywords = [
"earth-engine",
"sankey",
"land-cover",
"visualization",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: GIS",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"earthengine-api>=0.1.230",
"numpy",
"pandas",
"plotly>=5.2.2",
"ipywidgets"
]

[project.urls]
Homepage = "https://github.com/aazuspan/sankee"
Source = "https://github.com/aazuspan/sankee"

[tool.hatch.version]
path = "sankee/__init__.py"

[tool.hatch.build.targets.sdist]
include = ["sankee"]

[tool.hatch.envs.default]
dependencies = [
"pre-commit"
]

[tool.hatch.envs.docs]
dependences = [
"nbsphinx",
"sphinx",
"sphinx_rtd_theme",
]

[tool.hatch.envs.docs.scripts]
build = "sphinx-build -b html docs docs/_build/html"
view = "python -m webbrowser -t docs/_build/html/index.html"


[tool.hatch.envs.test]
dependencies = [
"pytest",
"pytest-cov",
]

[tool.hatch.envs.test.scripts]
all = "pytest . {args}"
coverage = "pytest . --cov=sankee {args}"
view-coverage = "python -m webbrowser -t htmlcov/index.html"

[tool.ruff]
select = ["E", "F", "I", "UP", "B", "PT", "NPY", "PERF", "RUF"]
exclude = ["docs/"]
fix = true
show-fixes = true
line-length = 100

[tool.ruff.isort]
known-first-party = ["sankee"]
3 changes: 1 addition & 2 deletions readthedocs.yml
Original file line number Diff line number Diff line change
@@ -4,8 +4,7 @@ python:
install:
- method: pip
path: .
extra_requirements:
- doc
- requirements: docs/requirements.txt
build:
os: ubuntu-22.04
tools:
Loading