Skip to content

Commit d4d70b0

Browse files
committed
make explicity that fac can accept strings
1 parent 9998e2e commit d4d70b0

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,4 @@ cython_debug/
161161
# and can be added to the global gitignore or merged into this file. For a more nuclear
162162
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
163163
#.idea/
164+
path_to_pinecards

examples/.gitignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

pinefarm.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
[paths]
99
# paths relative to the location of this file
10-
runcards = "examples"
10+
runcards = "path_to_pinecards"
1111
results = "results"
1212
# theories = "theories"
1313
# prefix = ".prefix"

src/pinefarm/external/nnlojet/runcardgen.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from dataclasses import dataclass, field
1010
from functools import cached_property
1111
from pathlib import Path
12+
from typing import Union
1213

1314
import numpy as np
1415
from yaml import safe_load
@@ -55,7 +56,7 @@ class Histogram:
5556
bins: list
5657
extra_selectors: dict = None
5758
pineappl: bool = True
58-
fac: int = None
59+
fac: Union[float, str] = None
5960
compositions: list[dict] = field(default_factory=list)
6061

6162
def __post_init__(self):
@@ -222,7 +223,7 @@ def parse_input_yaml(yaml_path):
222223

223224

224225
def _fill_process(process):
225-
"""Fill process block given the metadata for the process"""
226+
"""Fill process block given the metadata for the process."""
226227
process_name = process["proc"]
227228
sqrts = process["sqrts"]
228229
jet = process.get("jet", "none[0]") # Can be None

0 commit comments

Comments
 (0)