diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 789a05a9b8..0f503f09a7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,18 +1,18 @@ # Automatically request reviews from maintainers # Package -/pybamm/discretisations/ @martinjrobins @rtimms @valentinsulzer -/pybamm/experiment/ @brosaplanella @martinjrobins @rtimms @valentinsulzer @TomTranter -/pybamm/expression_tree/ @martinjrobins @rtimms @valentinsulzer -/pybamm/geometry/ @martinjrobins @rtimms @valentinsulzer -/pybamm/input/ @brosaplanella @DrSOKane @rtimms @valentinsulzer @TomTranter @kratman -/pybamm/meshes/ @martinjrobins @rtimms @valentinsulzer @rtimms -/pybamm/models/ @brosaplanella @DrSOKane @rtimms @valentinsulzer @TomTranter @rtimms -/pybamm/parameters/ @brosaplanella @DrSOKane @rtimms @valentinsulzer @TomTranter @rtimms @kratman -/pybamm/plotting/ @martinjrobins @rtimms @Saransh-cpp @valentinsulzer @rtimms @kratman @agriyakhetarpal -/pybamm/solvers/ @martinjrobins @rtimms @valentinsulzer @TomTranter @rtimms -/pybamm/spatial_methods/ @martinjrobins @rtimms @valentinsulzer @rtimms -/pybamm/* @pybamm-team/maintainers # the files directly under /pybamm/, will not recurse +src/pybamm/discretisations/ @martinjrobins @rtimms @valentinsulzer +src/pybamm/experiment/ @brosaplanella @martinjrobins @rtimms @valentinsulzer @TomTranter +src/pybamm/expression_tree/ @martinjrobins @rtimms @valentinsulzer +src/pybamm/geometry/ @martinjrobins @rtimms @valentinsulzer +src/pybamm/input/ @brosaplanella @DrSOKane @rtimms @valentinsulzer @TomTranter @kratman +src/pybamm/meshes/ @martinjrobins @rtimms @valentinsulzer @rtimms +src/pybamm/models/ @brosaplanella @DrSOKane @rtimms @valentinsulzer @TomTranter @rtimms +src/pybamm/parameters/ @brosaplanella @DrSOKane @rtimms @valentinsulzer @TomTranter @rtimms @kratman +src/pybamm/plotting/ @martinjrobins @rtimms @Saransh-cpp @valentinsulzer @rtimms @kratman @agriyakhetarpal +src/pybamm/solvers/ @martinjrobins @rtimms @valentinsulzer @TomTranter @rtimms +src/pybamm/spatial_methods/ @martinjrobins @rtimms @valentinsulzer @rtimms +src/pybamm/* @pybamm-team/maintainers # the files directly under /pybamm/, will not recurse # CI/CD workflows /.github/ @martinjrobins @Saransh-cpp @agriyakhetarpal @kratman @arjxn-py diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 2f4bcbc33a..a3537cc010 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -68,6 +68,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard (optional). # Commenting out will disable upload of results to your repo's Code Scanning dashboard - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0 + uses: github/codeql-action/upload-sarif@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3 with: sarif_file: results.sarif diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4f1b0162a4..ddbdb6350e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.5.7" + rev: "v0.6.1" hooks: - id: ruff args: [--fix, --show-fixes] diff --git a/src/pybamm/parameters/bpx.py b/src/pybamm/parameters/bpx.py index 2f259a8f52..7485e805b9 100644 --- a/src/pybamm/parameters/bpx.py +++ b/src/pybamm/parameters/bpx.py @@ -214,9 +214,7 @@ def _bpx_to_param_dict(bpx: BPX) -> dict: pybamm_dict[domain.pre_name + "conductivity [S.m-1]"] = 4e7 # add a default heat transfer coefficient - pybamm_dict.update( - {"Total heat transfer coefficient [W.m-2.K-1]": 0}, check_already_exists=False - ) + pybamm_dict.update({"Total heat transfer coefficient [W.m-2.K-1]": 0}) # transport efficiency for domain in [negative_electrode, separator, positive_electrode]: diff --git a/tests/unit/test_parameters/test_bpx.py b/tests/unit/test_parameters/test_bpx.py index f57fe8f7fa..ab4c25f97a 100644 --- a/tests/unit/test_parameters/test_bpx.py +++ b/tests/unit/test_parameters/test_bpx.py @@ -1,8 +1,3 @@ -# -# Tests for the create_from_bpx function -# - - import tempfile import unittest import json @@ -155,6 +150,15 @@ def test_bpx(self): sols[0]["Voltage [V]"].data, sols[1]["Voltage [V]"].data, atol=1e-7 ) + def test_no_already_exists_in_BPX(self): + with tempfile.NamedTemporaryFile( + suffix="test.json", delete=False, mode="w" + ) as test_file: + json.dump(copy.copy(self.base), test_file) + test_file.flush() + params = pybamm.ParameterValues.create_from_bpx(test_file.name) + assert "check_already_exists" not in params.keys() + def test_constant_functions(self): bpx_obj = copy.copy(self.base) bpx_obj["Parameterisation"]["Electrolyte"].update( @@ -234,7 +238,7 @@ def test_table_data(self): with tempfile.NamedTemporaryFile( suffix=filename, delete=False, mode="w" ) as tmp: - # write to a tempory file so we can + # write to a temporary file so we can # get the source later on using inspect.getsource # (as long as the file still exists) json.dump(bpx_obj, tmp)