-
Notifications
You must be signed in to change notification settings - Fork 0
Write down the versions for both eko and pineko #109
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
Changes from all commits
7d08b40
182a72d
3e6d5de
11501be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| """pineko = PineAPPL + EKO.""" | ||
| from .cli import command | ||
| from .version import __version__ |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |||||
| import logging | ||||||
| import os | ||||||
| import pathlib | ||||||
| from importlib import metadata | ||||||
|
|
||||||
| import eko | ||||||
| import eko.basis_rotation as br | ||||||
|
|
@@ -136,6 +137,11 @@ def write_operator_card(pineappl_grid, default_card, card_path, tcard): | |||||
| operators_card["configs"]["interpolation_polynomial_degree"] = 1 | ||||||
| operators_card["xgrid"] = x_grid.tolist() | ||||||
|
|
||||||
| # Add the version of eko and pineko to the operator card | ||||||
| # using importlib.metadata.version to get the correct tag in editable mode | ||||||
| operators_card["eko_version"] = metadata.version("eko") | ||||||
| pineko_version = metadata.version("pineko") | ||||||
|
|
||||||
| # Some safety checks | ||||||
| if ( | ||||||
| operators_card["configs"]["evolution_method"] == "truncated" | ||||||
|
|
@@ -147,6 +153,8 @@ def write_operator_card(pineappl_grid, default_card, card_path, tcard): | |||||
|
|
||||||
| with open(card_path, "w", encoding="UTF-8") as f: | ||||||
| yaml.safe_dump(operators_card, f) | ||||||
| f.write(f"# {pineko_version=}") | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this was not what you wanted to write, but:
Suggested change
(mainly because of the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
But I can do
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, great. I forgot about this option. The reference to the It is fine as it is.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Btw, it was new in py3.8, that by now it is perfectly fine (py3.7 officially died one month ago). |
||||||
|
|
||||||
| return operators_card["xgrid"], q2_grid | ||||||
|
|
||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I actually lost that there was also a back-end support. Thanks @scarlehoff!