Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
166269b
refine
mfangaritav Jun 26, 2026
8700bba
switch to scidev
mfangaritav Jun 26, 2026
e9e69aa
ruff
mfangaritav Jun 26, 2026
6330e6b
Merge branch 'refine' of https://github.com/ASFHyP3/hyp3-fire-trackin…
mfangaritav Jun 26, 2026
4f2421d
mypy
mfangaritav Jun 26, 2026
4dc4efc
update python version
mfangaritav Jun 26, 2026
eb0bf6e
copy in dockerfile
mfangaritav Jun 26, 2026
8291d62
Merge branch 'refine' of https://github.com/ASFHyP3/hyp3-fire-trackin…
mfangaritav Jun 26, 2026
d82d23e
fix path yaml
mfangaritav Jun 26, 2026
2c58ea6
fix path yaml
mfangaritav Jun 26, 2026
06ff86d
fix docker
mfangaritav Jun 26, 2026
1c94358
Merge pull request #3 from ASFHyP3/refine
mfangaritav Jun 26, 2026
d92a74a
make entrypoint script executable
jhkennedy Jun 29, 2026
a21b374
Merge pull request #4 from ASFHyP3/entrypoint-execute
jhkennedy Jun 29, 2026
3804420
fix output path issue
mfangaritav Jun 29, 2026
5b242be
Merge pull request #5 from ASFHyP3/fix-output-path
mfangaritav Jun 29, 2026
1516a8f
fix hydra conf path
mfangaritav Jun 29, 2026
3bfa203
Merge pull request #6 from ASFHyP3/fix-docker
mfangaritav Jun 29, 2026
7522ae6
Bump the github-actions-deps group across 1 directory with 5 updates
dependabot[bot] Jul 4, 2026
529b800
Bump the pip-deps group across 1 directory with 3 updates
dependabot[bot] Jul 4, 2026
bf06916
uncomment download_data
mfangaritav Jul 17, 2026
9a9b2e4
ruff
mfangaritav Jul 17, 2026
3a010f6
filter filename
mfangaritav Jul 17, 2026
00030f8
ruff
mfangaritav Jul 17, 2026
d7df74e
fix paths
mfangaritav Jul 17, 2026
1724604
Merge branch 'develop' into dependabot/pip/pip-deps-c83a8b7f6e
mfangaritav Jul 18, 2026
e51d1a6
Merge pull request #1 from ASFHyP3/dependabot/pip/pip-deps-c83a8b7f6e
mfangaritav Jul 18, 2026
7fc1643
Merge branch 'develop' into dependabot/github_actions/github-actions-…
mfangaritav Jul 18, 2026
8a4f569
Merge pull request #2 from ASFHyP3/dependabot/github_actions/github-a…
mfangaritav Jul 18, 2026
e3251fc
readme
mfangaritav Jul 18, 2026
32ac194
fix typos in doc
mfangaritav Jul 18, 2026
63c1f2c
changelog
mfangaritav Jul 18, 2026
a1e3d9c
Add token for tag release
mfangaritav Jul 18, 2026
26142df
Add token for release
mfangaritav Jul 18, 2026
92e1b6b
Merge pull request #8 from ASFHyP3/tokens
mfangaritav Jul 18, 2026
19bbf5a
Bump the pip-deps group with 2 updates
dependabot[bot] Jul 18, 2026
10be90b
Merge pull request #9 from ASFHyP3/dependabot/pip/pip-deps-5945b2e8b2
mfangaritav Jul 20, 2026
64e14ff
add opencv
mfangaritav Jul 24, 2026
775929d
Bump the github-actions-deps group with 10 updates
dependabot[bot] Sep 26, 2026
7ad3742
Merge pull request #12 from ASFHyP3/dependabot/github_actions/github-…
mfangaritav Oct 9, 2026
4e773de
update auth
mfangaritav Oct 9, 2026
3a19d1b
Configure AWS credentials in build workflow
jhkennedy Oct 9, 2026
43e6666
Remove AWS Credentials configuration step
jhkennedy Oct 9, 2026
c41a0b7
Merge pull request #13 from ASFHyP3/update-action
mfangaritav Oct 9, 2026
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 .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# These owners will be requested for review when someone opens a pull request.
* @ASFHyP3/Tools @ASFHyP3/SciDev @ASFHyP3/Services
* @ASFHyP3/SciDev
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,29 @@ on:
env:
HYP3_REGISTRY: 761639967505.dkr.ecr.us-west-2.amazonaws.com
AWS_REGION: us-west-2
AWS_ACCESS_KEY_ID: ${{ secrets.AKFIRE_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AKFIRE_AWS_SECRET_ACCESS_KEY }}

jobs:
call-version-info-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.21.1
uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.22.0
permissions:
contents: read
with:
python_version: '3.10'

dockerize:
needs: call-version-info-workflow
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
concurrency:
group: ${{ needs.call-version-info-workflow.outputs.version_tag }}
cancel-in-progress: true
env:
SDIST_VERSION: ${{ needs.call-version-info-workflow.outputs.version_tag }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7
with:
fetch-depth: 0

Expand All @@ -45,24 +46,23 @@ jobs:
echo "CI_JOB_TIMESTAMP=$(date --utc --rfc-3339=seconds)" >> $GITHUB_ENV

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- uses: aws-actions/configure-aws-credentials@v5
- uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
role-to-assume: ${{ vars.OIDC_ROLE_ARN }}
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2

- name: Fetch GAMMA
- name: Fetch AK-fire
run: |
aws s3 cp s3://fire-tracking/AK_fire-main.zip .
unzip AK_fire-main.zip

- name: Build, tag, and push image to Amazon ECR
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
no-cache: true
Expand All @@ -76,14 +76,14 @@ jobs:

- name: Add test tag
if: ${{ github.event_name != 'pull_request' && contains(env.SDIST_VERSION, '.dev') }}
uses: akhilerm/tag-push-action@v2.2.0
uses: akhilerm/tag-push-action@v2.3.0
with:
src: ${{ env.HYP3_REGISTRY }}/${{ github.event.repository.name }}:${{ env.SDIST_VERSION }}
dst: ${{ env.HYP3_REGISTRY }}/${{ github.event.repository.name }}:test

- name: Add latest tag
if: ${{ github.event_name != 'pull_request' && ! contains(env.SDIST_VERSION, '.dev') }}
uses: akhilerm/tag-push-action@v2.2.0
uses: akhilerm/tag-push-action@v2.3.0
with:
src: ${{ env.HYP3_REGISTRY }}/${{ github.event.repository.name }}:${{ env.SDIST_VERSION }}
dst: ${{ env.HYP3_REGISTRY }}/${{ github.event.repository.name }}:latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ on:
jobs:
call-changelog-check-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.21.1
uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.22.0
permissions:
contents: read
2 changes: 1 addition & 1 deletion .github/workflows/labeled-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ on:
jobs:
call-labeled-pr-check-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.21.1
uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.22.0
permissions:
pull-requests: read
2 changes: 1 addition & 1 deletion .github/workflows/release-checklist-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
call-release-checklist-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.21.1
uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.22.0
permissions:
pull-requests: write
secrets:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
jobs:
call-release-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.21.1
uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.22.0
permissions: {}
with:
release_prefix: HyP3 fire-tracking
release_branch: main
develop_branch: develop
secrets:
USER_TOKEN: ${{ secrets.USERNAME_FOR_GITHUB_ACTIONS_PAK }}
USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}
6 changes: 3 additions & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ on: push
jobs:
call-secrets-analysis-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.21.1
uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.22.0
permissions:
contents: read

call-ruff-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-ruff.yml@v0.21.1
uses: ASFHyP3/actions/.github/workflows/reusable-ruff.yml@v0.22.0
permissions:
contents: read

call-mypy-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-mypy.yml@v0.21.1
uses: ASFHyP3/actions/.github/workflows/reusable-mypy.yml@v0.22.0
permissions:
contents: read
4 changes: 2 additions & 2 deletions .github/workflows/tag-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
call-bump-version-workflow:
# For first-time setup, create a v0.0.0 tag as shown here:
# https://github.com/ASFHyP3/actions#reusable-bump-versionyml
uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.21.1
uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.22.0
permissions: {}
with:
user: username_for_github_actions
email: email_for@github_actions.com
secrets:
USER_TOKEN: ${{ secrets.USERNAME_FOR_GITHUB_ACTIONS_PAK }}
USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
call-pytest-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.21.1
uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.22.0
permissions:
contents: read
with:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.1.0]

### Added
- hyp3-fire-tracking plugin created with the [HyP3 Cookiecutter](https://github.com/ASFHyP3/hyp3-cookiecutter)
- hyp3-fire-tracking plugin initial version.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,10 @@ RUN mamba env create -f /hyp3-fire-tracking/environment.yml && \
sed -i 's/conda activate base/conda activate hyp3-fire-tracking/g' /home/conda/.profile && \
python -m pip install --no-cache-dir /hyp3-fire-tracking

COPY AK_fire-main /hyp3-fire-tracking/
COPY ./src/hyp3_fire_tracking/data/alaska_2025.yaml /hyp3-fire-tracking/AK_fire-main/fire-tracking/conf/paths/

ENV PROC_HOME=/hyp3-fire-tracking/AK_fire-main/fire-tracking

ENTRYPOINT ["/hyp3-fire-tracking/src/hyp3_fire_tracking/etc/entrypoint.sh"]
CMD ["-h"]
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
# HyP3 fire-tracking

Plugin to draw fire polygon from fire detections

## Usage

The HyP3-fire-tracking plugin provides a workflow (accessible directly in Python or via a CLI) that can be used to draw fire perimeters from VIIRS fire detections.

The command line tool can be run using the following structure:
```bash
python -m hyp3_fire_tracking \
--input-bucket bucket \
--input-prefix prefix \
```
Where:

* `--input-bucket` is the bucket with the VIIRS fire detection netcdf files
* `--input-prefix` is the folder in the bucket with the netcdf files

### Credentials

Generally, credentials are provided via environment variables, but some may be provided by command-line arguments or via a `.netrc` file.

#### AWS Credentials

You must provide AWS credentials because the data is hosted by USGS in a "requester pays" bucket. To provide AWS credentials, you can either use an AWS profile specified in your `~/.aws/credentials` by exporting:
```
export AWS_PROFILE=your-profile
```
or by exporting credential environment variables:
```
export AWS_ACCESS_KEY_ID=your-id
export AWS_SECRET_ACCESS_KEY=your-key
export AWS_SESSION_TOKEN=your-token # optional; for when using temporary credentials
```

For more information, please see: <https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html>

## Developer Setup
1. Ensure that conda is installed on your system (we recommend using [mambaforge](https://github.com/conda-forge/miniforge#mambaforge) to reduce setup times).
2. Download a local version of the `hyp3-fire-tracking` repository (`git clone https://github.com/ASFHyP3/hyp3-fire-tracking.git`)
3. In the base directory for this project call `mamba env create -f environment.yml` to create your Python environment, then activate it (`mamba activate hyp3-fire-tracking`)
4. Finally, install a development version of the package (`python -m pip install -e .`)

To run all commands in sequence use:
```bash
git clone https://github.com/ASFHyP3/hyp3-fire-tracking.git
cd hyp3-fire-tracking
mamba env create -f environment.yml
mamba activate hyp3-fire-tracking
python -m pip install -e .
```

## Contributing
Contributions to the HyP3 fire-tracking plugin are welcome! If you would like to contribute, please submit a pull request on the GitHub repository.

## Contact Us
Want to talk about HyP3 fire-tracking? We would love to hear from you!

Found a bug? Want to request a feature?
[open an issue](https://github.com/ASFHyP3/hyp3-fire-tracking/issues/new)
20 changes: 19 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,33 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python>=3.10
- python>=3.10,<=3.13
- pip
# For packaging, and testing
- setuptools_scm
- pytest
- pytest-console-scripts
- pytest-cov
# For running
- gdal
- geopandas
- hydra-core
- hyp3lib>=3,<4
- matplotlib
- netCDF4
- numpy
- omegaconf
- opencv
- pandas
- plotly
- pyarrow
- pyproj
- pyresample
- rasterio
- scikit-learn
- shapely
- tqdm
- xarray
# TODO: insert conda-forge dependencies as list here
- pip:
- -r requirements-static.txt
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers=[
"Programming Language :: Python :: 3.13",
]
dependencies = [
"hyp3lib>=3,<4",
"hyp3lib>=3,<5",
# TODO: insert Python dependencies as list here
]
dynamic = ["version"]
Expand Down
4 changes: 2 additions & 2 deletions requirements-static.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ruff==0.14.7
mypy==1.19.0
ruff==0.15.22
mypy==2.3.0
2 changes: 1 addition & 1 deletion src/hyp3_fire_tracking/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Plugin to draw fire polygon from fire detections"""
"""Plugin to draw fire polygon from fire detections."""

from importlib.metadata import version

Expand Down
2 changes: 1 addition & 1 deletion src/hyp3_fire_tracking/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def main() -> None:

# TODO: Your arguments here
parser.add_argument('--input-bucket', default='ak-fire-safe-data', help='Input bucket')
parser.add_argument('--input-prefix', default='nc', help='Input prefix')
parser.add_argument('--input-prefix', default='netcdf', help='Input prefix')

args = parser.parse_args()

Expand Down
33 changes: 33 additions & 0 deletions src/hyp3_fire_tracking/data/alaska_2025.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ============================================================================
# Paths: Alaska 2025 fire season
# ============================================================================
# All inputs come from the VIIRS download structure.
# All outputs go to a separate out_root — never mixed with source data.
#
# To port to a new machine, only change raw_root and output_root below.
# Every other path is derived automatically.
# ============================================================================

# --- Root variables (only these two need changing per machine) ---
raw_root: ../output
output_root: ../output

# --- Input ---
# Source root: all VIIRS inputs live under this tree
# L2/{YYYY_MM_DD}/ — EFIRE hotspot NC files
# L1/{YYYY_MM_DD}/ — L1B H5 files
# false_color/{sat}/{YYYYMMDD}/{HHMM}/ — pre-composed false-color TIFs
# gridded/{sat}/{YYYYMMDD}/{HHMM}/ — individual band TIFs
data_root: ${paths.raw_root}/data_sat/large/viirs/aws/alaska
flat_dir: ${paths.data_root}/L2/2025_07_04

# --- Output root (separate from inputs) ---
out_root: ${paths.output_root}/alaska_fire

# --- Derived output paths (all under out_root) ---
tracks_dir: ${paths.out_root}/tracks
persistent_tracks_dir: ${paths.out_root}/persistent_tracks
state_dir: ${paths.out_root}/state
plots_dir: ${paths.out_root}/plots
grids_dir: ${paths.out_root}/grids
analysis_dir: ${paths.out_root}/analysis
Empty file modified src/hyp3_fire_tracking/etc/entrypoint.sh
100644 → 100755
Empty file.
Loading
Loading