Skip to content

Commit

Permalink
fix: make tests passing again (#269)
Browse files Browse the repository at this point in the history
* Get rid of ak.zip

* double constituents for softdrop multi test

* gcc is not needed in macos - we use clang

* upgrade boost to 1.84

* update cgal to 5.6
  • Loading branch information
chrispap95 authored Feb 14, 2024
1 parent 58403db commit 7b114a1
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 37 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Install compiler tools on macOS
if: runner.os == 'macOS'
run: |
brew install make gcc automake swig gmp mpfr boost
brew install make automake swig gmp mpfr boost
export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"
- name: Install extra deps on Linux
Expand Down Expand Up @@ -81,12 +81,12 @@ jobs:
- uses: docker/setup-qemu-action@v3
if: matrix.arch != 'auto64'
with:
platforms: all
platforms: all

- name: Install compiler tools on macOS
if: runner.os == 'macOS'
run: |
brew install make gcc automake swig gmp mpfr boost
brew install make automake swig gmp mpfr boost
export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"
- uses: pypa/cibuildwheel@v2.16
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: docker/setup-qemu-action@v3
if: matrix.arch != 'auto64'
with:
platforms: arm64
platforms: arm64

- uses: actions/checkout@v4
with:
Expand All @@ -58,7 +58,7 @@ jobs:
- name: Install compiler tools on macOS
if: runner.os == 'macOS'
run: |
brew install make gcc automake swig gmp mpfr boost
brew install make automake swig gmp mpfr boost
export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"
- uses: pypa/cibuildwheel@v2.16
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ manylinux-i686-image = "manylinux2014"
before-all = [
"yum update -y",
"yum install -y mpfr-devel",
"curl -L https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2 -o boost_1_80_0.tar.bz2",
"tar --bzip2 -xf boost_1_80_0.tar.bz2",
"mv boost_1_80_0/boost /usr/include/boost",
"curl -L https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.bz2 -o boost_1_84_0.tar.bz2",
"tar --bzip2 -xf boost_1_84_0.tar.bz2",
"mv boost_1_84_0/boost /usr/include/boost",
]
# Skip musllinux builds for the moment
skip = "*-musllinux_*"
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
import setuptools.command.build_ext
import setuptools.command.install

CGAL_ZIP = (
"https://github.com/CGAL/cgal/releases/download/v5.5.1/CGAL-5.5.1-library.zip"
)
CGAL_ZIP = "https://github.com/CGAL/cgal/releases/download/v5.6/CGAL-5.6-library.zip"

DIR = pathlib.Path(__file__).parent.resolve()
FASTJET = DIR / "fastjet-core"
Expand Down
34 changes: 17 additions & 17 deletions tests/test_002-exclusive_jets.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,12 @@ def test_exclusive_jets_softdrop_grooming():
cluster = fastjet._pyjet.AwkwardClusterSequence(array, jetdef)
softdrop = cluster.exclusive_jets_softdrop_grooming()

softdrop_output = ak.zip(
softdrop_output = ak.from_iter(
{
"constituents": ak.Record(
{
"px": [32.2, 32.45],
"py": [64.21, 63.21],
"pz": [543.34, 543.14],
"E": [600.12, 599.56],
}
),
"constituents": [
{"px": 32.2, "py": 64.21, "pz": 543.34, "E": 600.12},
{"px": 32.45, "py": 63.21, "pz": 543.14, "E": 599.56},
],
"msoftdrop": 488.2395243115817,
"ptsoftdrop": 142.88274528437645,
"etasoftdrop": 2.726117171791057,
Expand Down Expand Up @@ -341,15 +337,19 @@ def test_exclusive_jets_softdrop_grooming_multi():
cluster = fastjet._pyjet.AwkwardClusterSequence(array, jetdef)
softdrop = cluster.exclusive_jets_softdrop_grooming()

softdrop_output = ak.zip(
softdrop_output = ak.from_iter(
{
"constituents": ak.Record(
{
"px": [32.2, 32.45],
"py": [64.21, 63.21],
"pz": [543.34, 543.14],
"E": [600.12, 599.56],
}
"constituents": ak.Array(
[
[
{"px": 32.2, "py": 64.21, "pz": 543.34, "E": 600.12},
{"px": 32.45, "py": 63.21, "pz": 543.14, "E": 599.56},
],
[
{"px": 32.2, "py": 64.21, "pz": 543.34, "E": 600.12},
{"px": 32.45, "py": 63.21, "pz": 543.14, "E": 599.56},
],
],
),
"msoftdrop": ak.Array([488.2395243115817, 488.2395243115817]),
"ptsoftdrop": ak.Array([142.88274528437645, 142.88274528437645]),
Expand Down
14 changes: 5 additions & 9 deletions tests/test_008-dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,12 @@ def dask_multi_test_exclusive_jets_softdrop_grooming():
cluster = fastjet._pyjet.DaskAwkwardClusterSequence(darray, jetdef)
softdrop = cluster.exclusive_jets_softdrop_grooming().compute()

softdrop_output = ak.zip(
softdrop_output = ak.from_iter(
{
"constituents": ak.Record(
{
"px": [32.2, 32.45],
"py": [64.21, 63.21],
"pz": [543.34, 543.14],
"E": [600.12, 599.56],
}
),
"constituents": [
{"px": 32.2, "py": 64.21, "pz": 543.34, "E": 600.12},
{"px": 32.45, "py": 63.21, "pz": 543.14, "E": 599.56},
],
"msoftdrop": ak.Array([488.2395243115817, 488.2395243115817]),
"ptsoftdrop": ak.Array([142.88274528437645, 142.88274528437645]),
"etasoftdrop": ak.Array([2.726117171791057, 2.726117171791057]),
Expand Down

0 comments on commit 7b114a1

Please sign in to comment.