Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invert ekomark-ekobox dependency #226

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/source/overview/tutorials/pdf.ipynb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion doc/source/theory/DGLAP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ any longer and hence, they have to be rejoined with their evolution basis elemen
part in the ordinary collinear evolution.

Mixed |QCD| :math:`\otimes` |QED| evolution
-----------------------------------------
-------------------------------------------
alecandido marked this conversation as resolved.
Show resolved Hide resolved

For the moment in this case only the `exact` evolution is implemented.

Expand Down
2 changes: 1 addition & 1 deletion extras/matching/check-matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import eko
from eko.interpolation import lambertgrid
from ekomark.apply import apply_pdf
from ekobox.apply import apply_pdf

t = {
"ID": 0,
Expand Down
11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ classifiers = [
"Topic :: Scientific/Engineering :: Physics",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
]
repository = "https://github.com/N3PDF/eko"
include = ["src/ekomark/benchmark/external/LHA.yaml", "doc/source/img/Logo.png"]
repository = "https://github.com/NNPDF/eko"
include = [
"doc/source/img/Logo.png",
"src/ekobox/genpdf/templatePDF.info",
"src/ekobox/genpdf/Toy.info",
"src/ekomark/benchmark/external/LHA.yaml",
]
packages = [
{ include = "eko", from = "src" },
{ include = "ekomark", from = "src" },
Expand Down Expand Up @@ -82,7 +87,7 @@ devtools = "^0.10.0"
[tool.poetry.extras]
docs = ["sphinx", "sphinx-rtd-theme", "sphinxcontrib-bibtex", "nbsphinx"]
mark = ["banana-hep", "sqlalchemy", "pandas", "matplotlib"]
box = ["banana-hep", "sqlalchemy", "pandas", "matplotlib", "rich"]
box = ["rich"]

[tool.poetry-dynamic-versioning]
enable = true
Expand Down
3 changes: 1 addition & 2 deletions src/ekobox/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"""EKO user interface package."""
from ekomark import apply

from . import cards, evol_pdf, info_file
from . import apply, cards, evol_pdf, info_file
File renamed without changes.
3 changes: 1 addition & 2 deletions src/ekobox/evol_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
import eko
from eko import basis_rotation as br
from eko.io import EKO
from ekomark import apply

from . import genpdf, info_file
from . import apply, genpdf, info_file

DEFAULT_NAME = "eko.tar"

Expand Down
4 changes: 3 additions & 1 deletion src/ekobox/genpdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import shutil

import numpy as np
from banana import toy

from eko import basis_rotation as br

Expand Down Expand Up @@ -55,6 +54,9 @@ def take_data(parent_pdf_set=None, members=False, xgrid=None, Q2grid=None):
}
if isinstance(parent_pdf_set, str):
if parent_pdf_set in ["toy_pol", "toy"]:
# delay import to ease nnpdf integration
from banana import toy # pylint: disable=import-outside-toplevel

info = copy.deepcopy(load.Toy_info)
if "pol" in parent_pdf_set:
toylh = toy.mkPDF("ToyLH_polarized", 0)
Expand Down
6 changes: 2 additions & 4 deletions src/ekomark/benchmark/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
from eko import EKO
from eko import basis_rotation as br
from eko.io import manipulate
from ekobox import apply

from .. import apply, pdfname
from .. import pdfname
from ..data import db, operators


Expand Down Expand Up @@ -104,7 +105,6 @@ def run_me(self, theory, ocard, _pdf):
print(f"Using cached eko data: {os.path.relpath(path,os.getcwd())}")

if self.plot_operator:

from ekomark.plots import ( # pylint:disable=import-error,import-outside-toplevel
save_operators_to_pdf,
)
Expand Down Expand Up @@ -245,15 +245,13 @@ def log(self, theory, _, pdf, me, ext):
qed=qed,
)
for q2 in q2s:

log_tab = dfdict.DFdict()
ref_pdfs = ext["values"][q2]
res = pdf_grid[q2]
my_pdfs = res["pdfs"]
my_pdf_errs = res["errors"]

for key in my_pdfs:

if key in self.skip_pdfs(theory):
continue

Expand Down
2 changes: 1 addition & 1 deletion tests/ekomark/test_apply.py → tests/ekobox/test_apply.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np

from ekomark import apply
from ekobox import apply
from tests.conftest import EKOFactory


Expand Down