From b3e9833d043a0b627f82e1da7c0b09152ec40325 Mon Sep 17 00:00:00 2001 From: bocklund Date: Sat, 13 Jan 2024 16:58:40 -0800 Subject: [PATCH 1/2] Add python 3.11 to test CI --- .github/workflows/tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 301c0dab..adde20d3 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -33,7 +33,7 @@ jobs: fail-fast: false max-parallel: 100 matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v2 with: @@ -52,7 +52,7 @@ jobs: fail-fast: false max-parallel: 100 matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v2 with: From 7af5012560dbfbe28f5bde3ff9ed48e2bd2ba81f Mon Sep 17 00:00:00 2001 From: bocklund Date: Sat, 13 Jan 2024 17:07:30 -0800 Subject: [PATCH 2/2] Fix Residual protocol and callers --- espei/error_functions/activity_error.py | 2 +- espei/error_functions/equilibrium_thermochemical_error.py | 2 +- espei/error_functions/non_equilibrium_thermochemical_error.py | 2 +- espei/error_functions/residual_base.py | 4 ++-- espei/error_functions/zpf_error.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/espei/error_functions/activity_error.py b/espei/error_functions/activity_error.py index e790b031..0db807b8 100644 --- a/espei/error_functions/activity_error.py +++ b/espei/error_functions/activity_error.py @@ -190,7 +190,7 @@ def __init__( symbols_to_fit: Optional[List[SymbolName]] = None, weight: Optional[Dict[str, float]] = None, ): - super().__init__(database, datasets, phase_models, symbols_to_fit) + super().__init__(database, datasets, phase_models, symbols_to_fit, weight) if weight is not None: self.weight = weight.get("ACR", 1.0) diff --git a/espei/error_functions/equilibrium_thermochemical_error.py b/espei/error_functions/equilibrium_thermochemical_error.py index 1660540a..d6ec3eaa 100644 --- a/espei/error_functions/equilibrium_thermochemical_error.py +++ b/espei/error_functions/equilibrium_thermochemical_error.py @@ -291,7 +291,7 @@ def __init__( symbols_to_fit: Optional[List[SymbolName]] = None, weight: Optional[Dict[str, float]] = None, ): - super().__init__(database, datasets, phase_models, symbols_to_fit) + super().__init__(database, datasets, phase_models, symbols_to_fit, weight) if weight is not None: self.weight = weight diff --git a/espei/error_functions/non_equilibrium_thermochemical_error.py b/espei/error_functions/non_equilibrium_thermochemical_error.py index 8d689e38..ca775ba3 100644 --- a/espei/error_functions/non_equilibrium_thermochemical_error.py +++ b/espei/error_functions/non_equilibrium_thermochemical_error.py @@ -332,7 +332,7 @@ def __init__( symbols_to_fit: Optional[List[SymbolName]] = None, weight: Optional[Dict[str, float]] = None, ): - super().__init__(database, datasets, phase_models, symbols_to_fit) + super().__init__(database, datasets, phase_models, symbols_to_fit, weight) if weight is not None: self.weight = weight diff --git a/espei/error_functions/residual_base.py b/espei/error_functions/residual_base.py index d4670f73..40b31424 100644 --- a/espei/error_functions/residual_base.py +++ b/espei/error_functions/residual_base.py @@ -50,8 +50,8 @@ def __init__( database: Database, datasets: PickleableTinyDB, phase_models: PhaseModelSpecification, - symbols_to_fit: Optional[List[SymbolName]], - weight: Optional[Dict[str, float]], + symbols_to_fit: Optional[List[SymbolName]] = None, + weight: Optional[Dict[str, float]] = None, ): ... diff --git a/espei/error_functions/zpf_error.py b/espei/error_functions/zpf_error.py index 93ba2333..c6db37a1 100644 --- a/espei/error_functions/zpf_error.py +++ b/espei/error_functions/zpf_error.py @@ -439,7 +439,7 @@ def __init__( symbols_to_fit: Optional[List[SymbolName]] = None, weight: Optional[Dict[str, float]] = None, ): - super().__init__(database, datasets, phase_models, symbols_to_fit) + super().__init__(database, datasets, phase_models, symbols_to_fit, weight) if weight is not None: self.weight = weight.get("ZPF", 1.0) else: