Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
fb16936
Merge branch 'main' into dev-metrics
Aurel31 Aug 16, 2025
1c92cfb
add fill value attribute requirement for std file
Aurel31 Aug 28, 2025
f933e80
add check-consistency-namespace in makefile
Aurel31 Sep 8, 2025
007f6fb
add missing variables in namespace docs
Aurel31 Sep 9, 2025
ef67682
add standardization of mtbs data
Aurel31 Sep 9, 2025
116001e
add mtbs global analysis
Aurel31 Sep 19, 2025
525548b
add caldor benchamrk building damaged
Aurel31 Nov 13, 2025
3401312
improve MTBS workflow
Aurel31 Nov 13, 2025
9b7cf05
Merge branch 'dev-metrics' of https://github.com/wirc-sjsu/firebench …
Aurel31 Nov 13, 2025
616e4ec
add caldor fire content
Aurel31 Nov 19, 2025
6c313ae
add is_iso8601 and validate_h5_std functions
Aurel31 Nov 20, 2025
5f5bde9
fix logging default level to allow for debug and above
Aurel31 Nov 20, 2025
3819086
fix regex for ISO8601 check and add validate_h5_requirement
Aurel31 Nov 20, 2025
0a5bd9b
add validate_h5_requirement to tools
Aurel31 Nov 20, 2025
737c1b3
improve return string of missing items for validate_h5_requirement
Aurel31 Nov 20, 2025
dd7427b
add binary_confusion_matrix construction
Aurel31 Nov 20, 2025
33d5cde
add binary_accuracy for binary confusion matrix
Aurel31 Nov 20, 2025
e0ef786
add performance mertrics for binary confusion matrix
Aurel31 Nov 20, 2025
fd5b06e
update caldor case docs
Aurel31 Nov 20, 2025
c39f8e0
minor code formatting
Aurel31 Nov 20, 2025
ad88121
caldor docs update
Aurel31 Nov 21, 2025
1a30c3b
add KPI
Aurel31 Nov 21, 2025
d4ebf9d
add signing method for dict
Aurel31 Nov 23, 2025
a6d6864
add MTBS map to Caldor benchmarks
Aurel31 Nov 24, 2025
812ffa8
refactoring: move time utils for std in standardize package
Aurel31 Nov 24, 2025
1db8f90
refactoring standardize_mtbs_from_geotiff
Aurel31 Nov 25, 2025
9c4ba1e
update std file format for polygons
Aurel31 Nov 25, 2025
e85fdb2
add mandatory separator for authors lists
Aurel31 Nov 25, 2025
14438c6
add collect conflicts function for merging two std files
Aurel31 Nov 25, 2025
b4d2dc0
add merge_trees function and add it to merge_two_std_files
Aurel31 Nov 25, 2025
1a82eb4
add burn severity benchmarks for Caldor
Aurel31 Nov 25, 2025
4ced0dc
improve signing process
Aurel31 Nov 26, 2025
853044b
add scores and normalization docs
Aurel31 Nov 27, 2025
ce0b3b0
fix typo
Aurel31 Nov 27, 2025
7935ff2
fix equation spacing
Aurel31 Nov 27, 2025
9f6bf5b
add kpi normalization functions
Aurel31 Nov 27, 2025
187be30
add normalization and aggregation in Caldor
Aurel31 Nov 27, 2025
9804e26
add score card pdf export
Aurel31 Nov 29, 2025
55c84a3
update scorr card pdf with KPI values
Aurel31 Nov 29, 2025
f050537
handle import exception for signing functions
Aurel31 Dec 2, 2025
f6eb399
organize dependencies in docs and pyproject
Aurel31 Dec 2, 2025
2faab14
fix spaces before formulas
Aurel31 Dec 3, 2025
d005b38
fix title numbering
Aurel31 Dec 3, 2025
dcd720b
Merge branch 'dev-metrics' of github.com:wirc-sjsu/firebench into dev…
Aurel31 Dec 3, 2025
1a7e8b9
code formatting
Aurel31 Dec 4, 2025
11a9dbf
add scheme B and S for Caldor
Aurel31 Dec 4, 2025
05ec1c3
add benchmark in KPI links diagram
Aurel31 Dec 8, 2025
b5c54f1
add merge_std_files
Aurel31 Dec 8, 2025
8bfbfa7
refactor score and metric docs into mutliple pages
Aurel31 Dec 9, 2025
8872f23
add sanitize_iso8601 to make iso date compliant with XML std
Aurel31 Dec 10, 2025
60094ee
change _merge_from_source to allow for merge of group at root level
Aurel31 Dec 10, 2025
0d4183b
add processing of landfire tif
Aurel31 Dec 10, 2025
645804a
add import_tif_with_rect_box function
Aurel31 Dec 10, 2025
b66e2d9
add ravg std function
Aurel31 Dec 11, 2025
5383718
refactoring of tif import data
Aurel31 Dec 12, 2025
26fd4b0
change standard file format
Aurel31 Dec 12, 2025
db48917
add synoptic data standardization
Aurel31 Dec 12, 2025
6b186c6
add compression for ravg
Aurel31 Dec 13, 2025
048c3bb
refactor std file merge to enable compression
Aurel31 Dec 13, 2025
911f7ba
change logging lvl for synoptic variable processing
Aurel31 Dec 13, 2025
21a4775
add Acknowledgment section to Caldor benchmark
Aurel31 Dec 14, 2025
69d8686
add fire perimeter dataset info
Aurel31 Dec 14, 2025
137ea92
update changlog
Aurel31 Dec 14, 2025
1634652
add kpi normalizations
Aurel31 Dec 14, 2025
85bec9f
add benchmarks for fire perimeter to Caldor doc
Aurel31 Dec 14, 2025
87f8c33
add FP requirements for Caldor doc
Aurel31 Dec 14, 2025
929429c
refactor scheme description section
Aurel31 Dec 14, 2025
96a395d
add KML file check for req validation
Aurel31 Dec 15, 2025
200eebe
fix score card pdf with 0 agg
Aurel31 Dec 15, 2025
d1e4a61
add safeguard kpi normalization
Aurel31 Dec 15, 2025
53de760
add safe guard area indices
Aurel31 Dec 15, 2025
ee6e188
convert to float for json dump compliance
Aurel31 Dec 15, 2025
0553425
add projection info for Caldor
Aurel31 Dec 15, 2025
301f3f8
fix headers caldor docs
Aurel31 Dec 15, 2025
4c14f3e
add fill value for ravg processing
Aurel31 Dec 19, 2025
32cd102
add context dict tools for benchmarks
Aurel31 Dec 21, 2025
b7cdf7c
add sensor height to synoptic processing
Aurel31 Dec 22, 2025
a0b417a
add RAVG CC docs
Aurel31 Dec 22, 2025
8ce06bc
code formatting
Aurel31 Dec 22, 2025
90800e6
fix quote error validate_h5_requirement
Aurel31 Dec 27, 2025
6ce16d6
fix quote error standardize_synoptic_raws_from_json
Aurel31 Dec 27, 2025
523690e
use relative time instead of iso str for synoptic wx
Aurel31 Dec 27, 2025
25cd2ea
use sensor height source at dataset level and not station group lvl
Aurel31 Dec 28, 2025
85c3df3
fix synoptic provider import
Aurel31 Dec 29, 2025
73cff54
v1.0 prerelease of std file
Aurel31 Jan 2, 2026
5d30311
refactor standardize_synoptic_raws_from_json
Aurel31 Jan 3, 2026
367aa7d
refactor standardize_synoptic_raws_from_json
Aurel31 Jan 3, 2026
611c278
add confidence lvl for sensor height in synoptic
Aurel31 Jan 4, 2026
47e42a7
add read_quantity_from_fb_attribute
Aurel31 Jan 6, 2026
f8c7bec
add read_quantity_from_fb_attribute to package standardize
Aurel31 Jan 6, 2026
1721934
fix quote in f string
Aurel31 Jan 7, 2026
d326277
refactor read_quantity_from_fb_attribute to accept numerics
Aurel31 Jan 7, 2026
17906bb
add safeguard for binary cm metrics
Aurel31 Jan 10, 2026
4fbead0
add certificates in std definition
Aurel31 Jan 11, 2026
ed4210c
add certificates for std files
Aurel31 Jan 11, 2026
2b6b3bc
add certificate verification std file
Aurel31 Jan 11, 2026
ee2facf
add better exception handling for certificates
Aurel31 Jan 11, 2026
9924ba7
add retrieve_h5_certificates function
Aurel31 Jan 11, 2026
b0c6e97
add certification for json
Aurel31 Jan 11, 2026
49b983a
add VL in score card
Aurel31 Jan 11, 2026
3f93539
change order or certificate to descending
Aurel31 Jan 12, 2026
3aa9677
add validate_h5_weather_stations_structure
Aurel31 Jan 14, 2026
76b46e7
add SH_TRUST_HIGHEST to firebench.standardize
Aurel31 Jan 14, 2026
9b274ed
add weather data docs for Caldor
Aurel31 Jan 14, 2026
2533289
fix canopy cover loss docs for Caldor
Aurel31 Jan 14, 2026
c4680f5
add MAE to metrics
Aurel31 Jan 14, 2026
b3092fc
add MAE to package metrics
Aurel31 Jan 14, 2026
3817eb9
add circular_bias_deg
Aurel31 Jan 14, 2026
f013017
add air temperature benchmarks docs
Aurel31 Jan 14, 2026
4207e57
add final weather bench Caldor doc
Aurel31 Jan 14, 2026
4ff98c3
fix typos
Aurel31 Jan 14, 2026
b012c85
fix tests with new function paths
Aurel31 Jan 15, 2026
60609df
update documentation
Aurel31 Jan 15, 2026
f781021
Merge branch 'dev-metrics' into develop
Aurel31 Jan 15, 2026
1c019ea
update changelog
Aurel31 Jan 15, 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
67 changes: 67 additions & 0 deletions .github/actions/check_namespace_file_consistency.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
"""
Dev-only namespace consistency checker.

- Reads a fixed Markdown file to get the list of standard variable names.
- Imports `svn` from `firebench` to get the authoritative list from code.
- Compares both lists and prints differences.
- No argparse, no unit/type checks, no JSON.

Usage:
in root directory: make check-consistency-namespace
"""

import re
from pathlib import Path

# Docs path
NAMESPACE_DOCS = Path("docs/namespace.md")
_MD_NAME_RE = re.compile(r"-\s*`([^`]+)`")


def get_md_variables(md_path: Path) -> list[str]:
"""Return the list of variable names listed in the Markdown spec."""
text = md_path.read_text(encoding="utf-8")
return _MD_NAME_RE.findall(text)


def get_svn_variables() -> list[str]:
"""Return the list of variable names from `firebench.svn`.

Supports several shapes:
- Enum class (uses __members__)
- dict of names
- list/tuple/set of names
- module / object with UPPERCASE attributes
"""
from firebench import svn

# Enum class (most common)
members = getattr(svn, "__members__", None)
if isinstance(members, dict):
return sorted(members.keys())

# collect UPPERCASE attribute names on the object/module
names = [n for n in dir(svn) if n.isupper() and not n.startswith("_")]
return sorted(set(names))


def check_consistency() -> None:
md_vars = set(get_md_variables(NAMESPACE_DOCS))
svn_vars = set(get_svn_variables())

only_in_docs = sorted(md_vars - svn_vars)
only_in_svn = sorted(svn_vars - md_vars)
common = sorted(md_vars & svn_vars)

print("== Namespace Consistency Check ==")
print(f"Common: {len(common)}")
print(f"Only in docs (missing from svn): {len(only_in_docs)}")
for name in only_in_docs:
print(f" - {name}")
print(f"Only in svn (missing from docs): {len(only_in_svn)}")
for name in only_in_svn:
print(f" - {name}")


if __name__ == "__main__":
check_consistency()
2 changes: 1 addition & 1 deletion .github/actions/update_changelog_in_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def update_changelog_in_docs():
changelog_content = root_file.read()

# Front matter for the docs/changelog.md file
front_matter = """# 11. """
front_matter = """# 12. """

# Combine front matter and changelog content
full_changelog_content = front_matter + changelog_content[2:]
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/).

## [0.8.0] - 2026 / 01 / 14
### Added
- 2021 Caldor case FB001 documentation and benchmarks (See Zenodo FireBench for release)
- package `metrics`: contains kpi functions, metrics functions for perimeters, 1D datasets, confusion matrix.
- package `standardize`: contains standardization functions for landfire, mtbs, ravg, synoptic, geotiff.
- package `signing`: contains functions for certification (hardware encryption) and verification of certificates (`verify_certificate_in_dict`, `verify_certificates_in_h5`). Verification functions require `gpg` (not needed for benchmarking functions).
- Public Key for certificates verification

### Documentation
- FireBench Standard file format
- Add Key Performance Indicators, Metrics, Score and Normalization information

## [0.7.0] - 2025 / 08 / 09
### Added
- `anderson_2015_stats`: Plot statistics from the Anderson 2015 dataset.
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Declare these targets as phony to avoid conflicts with files of the same name
.PHONY: test test-cov lint update-lint-score code-formatting bandit update-docs-changelog generate-api-doc docs clean
.PHONY: test test-cov lint update-lint-score code-formatting bandit update-docs-changelog check-consistency-namespace generate-api-doc docs clean

# Run all tests without coverage report
test:
Expand Down Expand Up @@ -32,6 +32,10 @@ bandit:
update-docs-changelog:
python .github/actions/update_changelog_in_docs.py

# Check consistency between namespace in package and in docs
check-consistency-namespace:
python .github/actions/check_namespace_file_consistency.py

# Update API documentation
generate-api-doc:
python .github/actions/generate_api_docs.py
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[![pages-build-deployment](https://github.com/wirc-sjsu/firebench/actions/workflows/pages/pages-build-deployment/badge.svg?branch=main)](https://github.com/wirc-sjsu/firebench/actions/workflows/pages/pages-build-deployment)
[![codecov](https://codecov.io/github/wirc-sjsu/firebench/graph/badge.svg?token=8F44OX12EW)](https://codecov.io/github/wirc-sjsu/firebench)
[![Security Analysis](https://github.com/wirc-sjsu/firebench/actions/workflows/security.yml/badge.svg?branch=main)](https://github.com/wirc-sjsu/firebench/actions/workflows/security.yml)
![Pylint Score](https://img.shields.io/badge/Pylint-10.00-brightgreen.svg)
![Pylint Score](https://img.shields.io/badge/Pylint-9.44-brightgreen.svg)
[![Check linting with Pylint](https://github.com/wirc-sjsu/firebench/actions/workflows/pylint.yml/badge.svg?branch=main)](https://github.com/wirc-sjsu/firebench/actions/workflows/pylint.yml)
[![Black Code Formatting Check](https://github.com/wirc-sjsu/firebench/actions/workflows/black.yml/badge.svg?branch=main)](https://github.com/wirc-sjsu/firebench/actions/workflows/black.yml)
![GitHub License](https://img.shields.io/github/license/wirc-sjsu/firebench)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/benchmarks/FB001/Caldor_bd_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/benchmarks/FB001/mtbs_map.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/images/Metrics_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/images/Score_card_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/images/Scoring_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions docs/api/metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,17 @@ Perimeters
:undoc-members:
:show-inheritance:

Confusion Matrix
----------------

.. automodule:: firebench.metrics.confusion_matrix.binary_performance
:members:
:undoc-members:
:show-inheritance:

.. automodule:: firebench.metrics.confusion_matrix.utils
:members:
:undoc-members:
:show-inheritance:


Loading