diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc5e6ccb..1e028659 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,16 +16,16 @@ repos: - id: check-case-conflict - id: check-ast - repo: https://github.com/hadialqattan/pycln - rev: v2.1.6 + rev: v2.2.2 hooks: - id: pycln args: [--config=pyproject.toml] - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.9.1 hooks: - id: black - repo: https://github.com/asottile/blacken-docs - rev: 1.15.0 + rev: 1.16.0 hooks: - id: blacken-docs - repo: https://github.com/pycqa/isort @@ -34,7 +34,7 @@ repos: - id: isort args: ["--profile", "black"] - repo: https://github.com/asottile/pyupgrade - rev: v3.9.0 + rev: v3.11.0 hooks: - id: pyupgrade - repo: https://github.com/pycqa/pydocstyle @@ -45,6 +45,6 @@ repos: additional_dependencies: - toml - repo: https://github.com/pre-commit/pre-commit - rev: v3.3.3 + rev: v3.4.0 hooks: - id: validate_manifest diff --git a/src/pineko/theory.py b/src/pineko/theory.py index 8d85be43..849cd32a 100644 --- a/src/pineko/theory.py +++ b/src/pineko/theory.py @@ -396,8 +396,11 @@ def fk(self, name, grid_path, tcard, pdf): if sv_method is None: if not np.isclose(xif, 1.0): check_scvar_evolve(grid, max_as, max_al, check.Scale.FACT) - # loading ekos - with eko.EKO.edit(eko_filename) as operators: + # loading ekos to produce a tmp copy + with eko.EKO.read(eko_filename) as operators: + eko_tmp_path = operators.paths.root.parent / "eko-tmp.tar" + operators.deepcopy(eko_tmp_path) + with eko.EKO.edit(eko_tmp_path) as operators: # Obtain the assumptions hash assumptions = theory_card.construct_assumptions(tcard) # do it! @@ -431,6 +434,9 @@ def fk(self, name, grid_path, tcard, pdf): assumptions=assumptions, comparison_pdf=pdf, ) + # Remove tmp ekos + eko_tmp_path.unlink() + logger.info( "Finished computation of %s - took %f s", name,