From d40c92fbe2f559183cf07ad6180b6e5786e95b73 Mon Sep 17 00:00:00 2001 From: Chen Wang Date: Mon, 21 Jul 2025 13:40:51 -0600 Subject: [PATCH 1/2] release branch --- CHANGELOG.md | 2 +- docs/source/conf.py | 4 ++-- pyincore/globals.py | 2 +- setup.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a4db031..2ba1530c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [Unreleased] +## [1.22.0] - 2025-07-31 ### Added - ML Enabled Galveston CGE [#641](https://github.com/IN-CORE/pyincore/issues/641) diff --git a/docs/source/conf.py b/docs/source/conf.py index 1d85f679..de38f97e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -33,9 +33,9 @@ author = "" # The short X.Y version -version = "1.21" +version = "1.22" # The full version, including alpha/beta/rc tags -release = "1.21.0" +release = "1.22.0" # -- General configuration --------------------------------------------------- diff --git a/pyincore/globals.py b/pyincore/globals.py index 726641f4..ffb865a8 100644 --- a/pyincore/globals.py +++ b/pyincore/globals.py @@ -10,7 +10,7 @@ import os import shutil -PACKAGE_VERSION = "1.21.0" +PACKAGE_VERSION = "1.22.0" INCORE_API_PROD_URL = "https://tools.in-core.org" INCORE_API_DEV_URL = "https://dev.in-core.org" diff --git a/setup.py b/setup.py index 28fdd031..75021d99 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import setup, find_packages # version number of pyincore -version = "1.21.0" +version = "1.22.0" with open("README.rst", encoding="utf-8") as f: readme = f.read() From be90b857f5fc7b18ebea295e128a5818f062f46d Mon Sep 17 00:00:00 2001 From: Chen Wang Date: Wed, 30 Jul 2025 23:37:02 -0500 Subject: [PATCH 2/2] Fix bugs (#674) * fix nci * fix when eq payload is empty list --- pyincore/analyses/ncifunctionality/ncifunctionality.py | 4 ++-- pyincore/hazardservice.py | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pyincore/analyses/ncifunctionality/ncifunctionality.py b/pyincore/analyses/ncifunctionality/ncifunctionality.py index 8f356e8e..a673be46 100644 --- a/pyincore/analyses/ncifunctionality/ncifunctionality.py +++ b/pyincore/analyses/ncifunctionality/ncifunctionality.py @@ -51,10 +51,10 @@ def run(self): discretized_days = self.get_parameter("discretized_days") # Load all dataset-related entities for EPF - epf_network_dataset = self.get_input_dataset("epn_network") + epf_network_dataset = self.get_input_dataset("epf_network") if not isinstance(epf_network_dataset, NetworkDataset): epf_network_dataset = NetworkDataset.from_dataset( - self.get_input_dataset("epn_network") + self.get_input_dataset("epf_network") ) epf_network_nodes = epf_network_dataset.nodes.get_dataframe_from_shapefile() diff --git a/pyincore/hazardservice.py b/pyincore/hazardservice.py index ae132452..b6bc5b15 100644 --- a/pyincore/hazardservice.py +++ b/pyincore/hazardservice.py @@ -209,10 +209,12 @@ def post_earthquake_hazard_values( """ url = urljoin(self.base_earthquake_url, hazard_id + "/values") site_class_dataset_id = "" - value = payload[len(payload) - 1] - if "siteClassId" in value: - payload = payload[:-1] - site_class_dataset_id = value["siteClassId"] + + if len(payload) > 0: + value = payload[len(payload) - 1] + if "siteClassId" in value: + payload = payload[:-1] + site_class_dataset_id = value["siteClassId"] kwargs = { "files": {