Skip to content

Commit

Permalink
should fix mac
Browse files Browse the repository at this point in the history
  • Loading branch information
tdixon97 committed Jan 28, 2025
1 parent 6456c5d commit a9b7265
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install non-python (homebrew) dependencies
if: ${{ matrix.os == 'macOS-latest' }}
run: |
brew install opencascade cgal gmp mpfr boost
- name: Get dependencies and install reboost
run: |
python -m pip install --upgrade pip wheel setuptools
Expand Down
7 changes: 3 additions & 4 deletions src/reboost/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,9 @@ def get_detectors_mapping(

# if no package was imported its just a name
try:
out_names.extend(
evaluate_object(output_detector_expression, local_dict={"OBJECTS": objects})
)
except NameError:
objs = evaluate_object(output_detector_expression, local_dict={"OBJECTS": objects})
out_names.extend(objs)
except Exception:
out_names.append(output_detector_expression)

# simple one to one mapping
Expand Down
8 changes: 7 additions & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ def test_detector_mapping():
"2": ["2"],
}

assert reboost.core.get_detectors_mapping("0") == {"0": ["0"]}

# with input name
assert reboost.core.get_detectors_mapping(
"[str(i) for i in range(3)]", input_detector_name="dets"
Expand All @@ -159,4 +161,8 @@ def test_detector_mapping():


def test_remove_columns():
pass
tab = Table({"a": Array([1, 2, 3]), "b": Array([1, 2, 3])})

tab = reboost.core.remove_columns(tab, ["a"])

assert next(iter(tab.keys())) == "a"

0 comments on commit a9b7265

Please sign in to comment.