Skip to content

Commit

Permalink
Fix typing and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Radonirinaunimi committed Nov 21, 2024
1 parent 9457aa0 commit 01ee312
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ jobs:
with:
virtualenvs-create: false
installer-parallel: true
# Temporary fix to get unreleased version of pineappl
- uses: moonrepo/setup-rust@v1
- name: Install dependencies
run: poetry install --no-interaction --no-root --with test
run: poetry install --no-interaction --no-root --with test -E nnpdf
- name: Install project
# it is required to repeat extras, otherwise they will be removed from
# the environment
run: poetry install --no-interaction
run: poetry install --no-interaction -E nnpdf
- name: Install task runner
run: pip install poethepoet
- name: Lint with pylint
Expand Down
7 changes: 4 additions & 3 deletions src/pineko/evolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import os
import pathlib
from importlib import metadata
from typing import Union

import eko
import eko.basis_rotation as br
Expand Down Expand Up @@ -110,7 +111,7 @@ def write_operator_card_from_file(


def dump_card(
card_path: str | os.PathLike,
card_path: Union[str, os.PathLike],
operators_card: dict,
convolution: pineappl.convolutions.Conv,
) -> None:
Expand Down Expand Up @@ -147,7 +148,7 @@ def dump_card(
def write_operator_card(
pineappl_grid: pineappl.grid.Grid,
default_card: dict,
card_path: str | os.PathLike,
card_path: Union[str, os.PathLike],
tcard: dict,
):
"""Generate operator card for this grid.
Expand Down Expand Up @@ -285,7 +286,7 @@ def evolve_grid(
xif: int,
xia: int,
assumptions="Nf6Ind",
comparison_pdfs=list[str] | None,
comparison_pdfs=Union[list[str], None],
meta_data=None,
min_as=None,
):
Expand Down
2 changes: 1 addition & 1 deletion src/pineko/scale_variations.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def create_grids(gridpath, max_as, nf):
"""Create all the necessary scale variations grids for a certain starting grid."""
grid = pineappl.grid.Grid.read(gridpath)
grid_orders = orders_as_tuple(grid)
order_mask = pineappl.grid.Order.create_mask(grid.orders(), max_as, 0, True)
order_mask = pineappl.boc.Order.create_mask(grid.orders(), max_as, 0, True)
grid_orders_filtered = list(np.array(grid_orders)[order_mask])
grid_orders_filtered.sort(key=qcd)
first_nonzero_order = grid_orders_filtered[0]
Expand Down

0 comments on commit 01ee312

Please sign in to comment.