-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
- Loading branch information
Showing
9 changed files
with
87 additions
and
99 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
args: [--line-length=100] | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.0.275 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --line-length=100] | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.1.4 | ||
hooks: | ||
- id: ruff | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters