Skip to content

Commit

Permalink
Merge branch 'num_fonll' into optimize_number_theories
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomomagni committed Sep 21, 2023
2 parents 56ec7d9 + 6de60e0 commit b59b268
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
10 changes: 8 additions & 2 deletions src/pineko/theory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit b59b268

Please sign in to comment.