Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into hayes-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Hayes committed Nov 8, 2024
2 parents f786a49 + 478116f commit fa66db4
Show file tree
Hide file tree
Showing 39 changed files with 4,498 additions and 4,851 deletions.
12 changes: 0 additions & 12 deletions .copier-answers.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .git_archival.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .gitattributes

This file was deleted.

12 changes: 5 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ jobs:
- uses: pre-commit/[email protected]
with:
extra_args: --hook-stage manual --all-files
- name: Run PyLint
continue-on-error: true
run: pipx run nox -s pylint -- --output-format=github

checks:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
Expand Down Expand Up @@ -68,7 +65,8 @@ jobs:
python -m pytest -ra --cov --cov-report=xml --cov-report=term
--durations=20
- name: Upload coverage report
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
# NOTE: need an account for this...
# - name: Upload coverage report
# uses: codecov/[email protected]
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
14 changes: 11 additions & 3 deletions .github/workflows/pixi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,24 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.34.0
environments: dev
cache: true
cache-write:
${{ github.event_name == 'push' && github.ref_name == 'main' }}
manifest-path: pyproject.toml
cache: false
locked: false
#cache-write:
# ${{ github.event_name == 'push' && github.ref_name == 'main' }}

# NOTE: https://github.com/prefix-dev/setup-pixi/issues/136
- name: Ensure Dynamic version
run: |
pip install -e .
- name: Run Pylint
continue-on-error: true
run: |
pixi run lint
- name: Run Pytest
env:
MAXAR_API_KEY: ${{ secrets.MAXAR_API_KEY}}
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Test against the latest versions of Python and other libraries
name: Upstream versions

on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# Many color libraries just need this to be set to any value, but at least
# one distinguishes color depth, where "3" -> "256-bit color".
FORCE_COLOR: 3

jobs:
checks:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
python-version: ["3.13", "3.14"]
# windows-latest,
runs-on: [ubuntu-latest, macos-14]
#include:
# - python-version: "pypy-3.10"
# runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Install package
run: python -m pip install .[dev]

- name: Test package
env:
MAXAR_API_KEY: ${{ secrets.MAXAR_API_KEY}}
run: >-
python -m pytest -ra --cov --cov-report=xml --cov-report=term
--durations=20
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,13 @@ repos:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs

# https://pylint.pycqa.org/en/latest/user_guide/installation/pre-commit-integration.html#pre-commit-integration
# - repo: local
# hooks:
# - id: pylint
# name: pylint
# entry: pylint
# language: system
# types: [python]
# require_serial: true
40 changes: 8 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Actions Status][actions-badge]][actions-link]
[![Documentation Status][rtd-badge]][rtd-link]

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/uw-cryo/coincident)

<!-- SPHINX-START -->
Expand All @@ -27,39 +28,14 @@ Such datasets are intended to be used by the NASA STV community for
calibration/validation, fusion algorithm development, and discipline-specific
scientific analysis.

**This tool is under active development, there are no stable releases yet!**
https://science.nasa.gov/earth-science/decadal-surveys/decadal-stv/coincident-datasets/

## Development

Use [pixi](https://pixi.sh) for environment management

```bash
git clone https://github.com/uw-cryo/coincident.git
cd coincident
git checkout -b newfeature
pixi shell --environment dev # type `exit` to deactivate
pre-commit install
See here for more information:
<https://science.nasa.gov/earth-science/decadal-surveys/decadal-stv/coincident-datasets>

# Or run pre-configured environments and commands
pixi run test
pixi run lint
pixi run docs
```

## Authentication

Some datasets require authentication to _search_ (Maxar) others only require
authentication to _download_ data (NASA). `coincident` assumes you have the
following Environment Variables defined:

```bash
export EARTHDATA_USERNAME=xxxxx
export EARTHDATA_PASSWORD=yyyyy
export MAXAR_API_KEY=zzzzz
```
**This tool is under active development, there are no stable releases yet!**

### Acknowledgements
## Acknowledgements

- Python packaging template provided by
https://github.com/scientific-python/cookie
<https://github.com/scientific-python/cookie>

- Funding for this effort was provided by NASA Grant 80NSSC22K1094
4 changes: 4 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* Make default pandas table font smaller */
div.cell_output table {
font-size: 0.8em;
}
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Search
wesm.get_swath_polygons



Overlaps
--------

Expand All @@ -29,6 +28,7 @@ Overlaps
:toctree: generated/

geographic_area
subset_by_minimum_area
subset_by_temporal_overlap


Expand Down
39 changes: 26 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import importlib.metadata
from typing import Any

project = "coincident"
copyright = "2024, Scott Henderson"
Expand Down Expand Up @@ -34,25 +33,39 @@
".venv",
]

html_theme = "furo"
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme_options: dict[str, Any] = {
"footer_icons": [
html_theme = "pydata_sphinx_theme"
html_theme_options = {
"use_edit_page_button": True,
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/uw-cryo/coincident",
"html": """
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
</svg>
""",
"class": "",
"icon": "fa-brands fa-github",
"type": "fontawesome",
},
],
"source_repository": "https://github.com/uw-cryo/coincident",
"source_branch": "main",
"source_directory": "docs/",
}
html_title = "Coincident"
html_context = {
"github_user": "uw-cryo",
"github_repo": "coincident",
"github_version": "main",
"doc_path": "docs",
}

# remove sidebar, see GH issue #82
html_css_files = [
"custom.css",
]

html_static_path = ["_static"]

# NOTE: consider adding back in once for distinct sections (user guide, examples, API reference)
# https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/layout.html#primary-sidebar-left
# html_sidebars = {"**": []}

myst_enable_extensions = [
"colon_fence",
Expand Down
Loading

0 comments on commit fa66db4

Please sign in to comment.