Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/data_sources/HAZUS_MH_4.2_HU/session.dill
/doc/build/
*.pyc
*.ipynb
/.ropeproject/
/doc/cache/
/doc/source/dl_doc/
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

---

## [2.1.0] - 2025-09-11

This release focuses on improving code quality and enhancing usability of Hazus assessments. The changes maintain backward compatibility while providing users with more flexibility in input specification and ensuring the codebase adheres to modern Python best practices.

### Changed
- **Input Validation:** Relaxed validation constraints for seismic and flood assessments to improve usability:
- Allow HeightClass attribute for seismic structural systems (W1, W2, S3, PC1, MH) that don't require it in Hazus methodology
- Remove PlanArea field from auto-populated seismic configuration as it's no longer needed
- Allow RES1 occupancy buildings to have more than 3 stories in flood assessments, aligning with FEMA technical manual interpretation
- **Code Quality:** Comprehensive code formatting and linting improvements using Ruff across the entire codebase:
- Applied consistent code formatting across 15 Python files
- Fixed docstring formatting and missing docstring issues
- Cleaned up import statements and unused code
- Standardized quote usage and line spacing

### Fixed
- Resolved spelling issues in comments

---

## [2.0.0] - 2025-08-15

This release marks a major milestone for the Damage and Loss Model Library and the beginning of a more frequent and structured release schedule. After more than two years of continuous development, `v2.0.0` introduces a significantly improved data schema, a host of new models, and a documentation system for model discovery.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A curated, open-source repository of standardized model parameters and metadata

The Damage and Loss Model Library (DLML) is a project from the NHERI SimCenter designed to address a critical gap in natural hazards engineering: the lack of a centralized, standardized, and easy-to-use repository for damage and loss models. This library provides the essential data—model parameters, descriptive metadata, and configuration files—that power natural hazard risk assessment simulations.

This `v2.0.0` release represents a significant evolution of the project, featuring an improved data schema, a host of new and updated models, and a documentation system.
This `v2.1.0` release continues the evolution of the project, building on the improved data schema, extensive model collection, and documentation system introduced in v2.0.0, with enhanced code quality and improved usability for Hazus assessments.

**Key Features:**
* **Standardized Data Schema:** A robust yet flexible schema for organizing models by hazard, asset type, and resolution, making it easy to use data and supporting new contributions.
Expand Down
12 changes: 6 additions & 6 deletions doc/source/_extensions/visuals.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# # noqa: D100
#
# Copyright (c) 2023 Leland Stanford Junior University
# Copyright (c) 2023 The Regents of the University of California
#
Expand Down Expand Up @@ -280,7 +280,7 @@ def plot_fragility(comp_db_path, output_path, create_zip='0'): # noqa: C901, D1
table_vals[1] = np.array(ds_list)

font_size = 16
if ds_i > 8: # noqa: PLR2004
if ds_i > 8:
font_size = 8.5

fig.add_trace(
Expand Down Expand Up @@ -317,7 +317,7 @@ def plot_fragility(comp_db_path, output_path, create_zip='0'): # noqa: C901, D1
ds_offset = 0.086
info_font_size = 10

if ds_i > 8: # noqa: PLR2004
if ds_i > 8:
x_loc = 0.4928
y_loc = 0.705 + 0.123
ds_offset = 0.0455
Expand Down Expand Up @@ -575,9 +575,9 @@ def plot_repair( # noqa: C901, PLR0912, PLR0915
conseq_val = float(val)
if conseq_val < 1:
table_vals[1][ds_i] = f'{conseq_val:.4g}'
elif conseq_val < 10: # noqa: PLR2004
elif conseq_val < 10:
table_vals[1][ds_i] = f'{conseq_val:.3g}'
elif conseq_val < 1e6: # noqa: PLR2004
elif conseq_val < 1e6:
table_vals[1][ds_i] = f'{conseq_val:.0f}'
else:
table_vals[1][ds_i] = f'{conseq_val:.3g}'
Expand All @@ -594,7 +594,7 @@ def plot_repair( # noqa: C901, PLR0912, PLR0915
]

# converted simultaneous damage models might have a lot of DSs
if table_vals.shape[1] > 8: # noqa: PLR2004
if table_vals.shape[1] > 8:
lots_of_ds = True
else:
lots_of_ds = False
Expand Down
3 changes: 2 additions & 1 deletion doc/source/release_notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ Release Notes
The following sections document the notable changes of each release.
The sequence of all changes is available in the `commit logs <https://github.com/NHERI-SimCenter/DamageAndLossModelLibrary/commits/>`_.

Version 1
Version 2
-----------

.. toctree::
:maxdepth: 2

v2.1.0
v2.0.0
v1.0.0
4 changes: 2 additions & 2 deletions doc/source/release_notes/v1.0.0.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _changes_v1_0:

==========================
============================
Version 1.0.0 (May 19, 2023)
==========================
============================

Initial Release.

Expand Down
4 changes: 2 additions & 2 deletions doc/source/release_notes/v2.0.0.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _changes_v2_0:

=============================
===============================
Version 2.0.0 (August 15, 2025)
=============================
===============================

This release marks a major milestone for the Damage and Loss Model Library and the beginning of a more frequent and structured release schedule. After more than two years of continuous development, ``v2.0.0`` introduces a significantly improved data schema, a host of new models, and a documentation system for model discovery.

Expand Down
28 changes: 28 additions & 0 deletions doc/source/release_notes/v2.1.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. _changes_v2_1:

==================================
Version 2.1.0 (September 11, 2025)
==================================

This release focuses on improving code quality and enhancing usability of Hazus assessments. The changes maintain backward compatibility while providing users with more flexibility in input specification and ensuring the codebase adheres to modern Python best practices.

Changed
-------

- **Input Validation:** Relaxed validation constraints for seismic and flood assessments to improve usability:

- Allow HeightClass attribute for seismic structural systems (W1, W2, S3, PC1, MH) that don't require it in Hazus methodology
- Remove PlanArea field from auto-populated seismic configuration as it's no longer needed
- Allow RES1 occupancy buildings to have more than 3 stories in flood assessments, aligning with FEMA technical manual interpretation

- **Code Quality:** Comprehensive code formatting and linting improvements using Ruff across the entire codebase:

- Applied consistent code formatting across 15 Python files
- Fixed docstring formatting and missing docstring issues
- Cleaned up import statements and unused code
- Standardized quote usage and line spacing

Fixed
-----

- Resolved spelling issues in comments
Loading