From f7b18dd5044349f0041461e478b28d5d8b01eb97 Mon Sep 17 00:00:00 2001 From: "Brent R. Yates" Date: Mon, 22 Apr 2024 12:18:49 -0400 Subject: [PATCH 01/10] Fix typo in path for `test_make_1d_quad_plots.py` The CI script `test_make_1d_quad_plots.py` has been failing due to broken root file path. --- tests/test_make_1d_quad_plots.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_make_1d_quad_plots.py b/tests/test_make_1d_quad_plots.py index edd5d202d..49f007c96 100644 --- a/tests/test_make_1d_quad_plots.py +++ b/tests/test_make_1d_quad_plots.py @@ -6,12 +6,12 @@ def test_make_1d_quad_plots(): "python", "analysis/topeft_run2/make_1d_quad_plots.py", "-i", - "ttHJet_UL17_R1B14_NAOD-00000_10194.root", + "ttHJet_UL17_R1B14_NAOD-00000_10194_NDSkim.root", "-r", "./" ] # Run make_1d_quad - subprocess.run(args) + assert subprocess.run(args) glob.glob('tmp_quad_plos*') From 94b7c0bc4e2559a5f140ab73de3b6aca91f7b81d Mon Sep 17 00:00:00 2001 From: "Brent R. Yates" Date: Mon, 22 Apr 2024 12:49:33 -0400 Subject: [PATCH 02/10] Save artifacts (just quad plots for now) --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da41c43ae..35bd1949c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -144,3 +144,9 @@ jobs: flags: unittests name: codecov-umbrella verbose: true + + - name: Archive production artifacts + uses: actions/upload-artifact@v4 + with: + name: plots + path: tmp_quad_plos*/ From e2bd2ee3bca28dc3be57a6ca209562fe18c5c1d2 Mon Sep 17 00:00:00 2001 From: "Brent R. Yates" Date: Tue, 23 Apr 2024 12:35:36 -0400 Subject: [PATCH 03/10] Save more artifacts --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 35bd1949c..f7b72e364 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -149,4 +149,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: plots - path: tmp_quad_plos*/ + path: | + tmp_quad_plos*/ + histo + analysis/topeft_run2/histos From a47399a0065f495cce1092fd29f253cea7ca29c6 Mon Sep 17 00:00:00 2001 From: "Brent R. Yates" Date: Tue, 23 Apr 2024 12:37:32 -0400 Subject: [PATCH 04/10] `histos` -> `cards` for datacard CI --- .github/workflows/main.yml | 2 +- tests/test_futures.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f7b72e364..aa50fab69 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -151,5 +151,5 @@ jobs: name: plots path: | tmp_quad_plos*/ - histo + cards analysis/topeft_run2/histos diff --git a/tests/test_futures.py b/tests/test_futures.py index d87a77d52..fa7a7aecb 100644 --- a/tests/test_futures.py +++ b/tests/test_futures.py @@ -36,7 +36,7 @@ def test_datacardmaker(): "analysis/topeft_run2/make_cards.py", "analysis/topeft_run2/histos/output_check_yields_nonprompt.pkl.gz", "-d", - "histos", + "cards", "--var-lst", "lj0pt", "--do-nuisance", From 94f5942c5090ae150166c11a64ba6ae3165b0962 Mon Sep 17 00:00:00 2001 From: "Brent R. Yates" Date: Tue, 23 Apr 2024 12:45:50 -0400 Subject: [PATCH 05/10] Fix typos --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aa50fab69..12f6c01df 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -110,7 +110,7 @@ jobs: - name: Pytest setup run: | conda install -y -n coffea-env -c conda-forge pytest pytest-cov root_base - mkdir histos + mkdir cards - name: Test make 1d quad plots run: | @@ -148,7 +148,7 @@ jobs: - name: Archive production artifacts uses: actions/upload-artifact@v4 with: - name: plots + name: results path: | tmp_quad_plos*/ cards From 2de916860af2c86dc0c4f79fe608dd986de2f417 Mon Sep 17 00:00:00 2001 From: "Brent R. Yates" Date: Tue, 23 Apr 2024 12:52:16 -0400 Subject: [PATCH 06/10] Fix wrong directory --- tests/test_futures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_futures.py b/tests/test_futures.py index fa7a7aecb..b2113a972 100644 --- a/tests/test_futures.py +++ b/tests/test_futures.py @@ -48,4 +48,4 @@ def test_datacardmaker(): # Run datacard maker subprocess.run(args, check=True) - assert (comp_datacard('histos/ttx_multileptons-2lss_p_4j_lj0pt.txt','analysis/topeft_run2/test/ttx_multileptons-2lss_p_4j_lj0pt.txt')) + assert (comp_datacard('cards/ttx_multileptons-2lss_p_4j_lj0pt.txt','analysis/topeft_run2/test/ttx_multileptons-2lss_p_4j_lj0pt.txt')) From 0e80b840427d78230e186ca53716495ca21381f3 Mon Sep 17 00:00:00 2001 From: "Brent R. Yates" Date: Tue, 23 Apr 2024 13:17:04 -0400 Subject: [PATCH 07/10] Update actions --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 12f6c01df..9b3b4a090 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: name: Lint steps: - name: Check out source repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python environment uses: actions/setup-python@v4 - name: flake8 Lint @@ -65,7 +65,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Add conda to system path run: | @@ -134,7 +134,7 @@ jobs: - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} directory: ./coverage/reports/ From 805384a322f7890d6e652a12cbda571dbee33861 Mon Sep 17 00:00:00 2001 From: "Brent R. Yates" Date: Tue, 23 Apr 2024 13:21:19 -0400 Subject: [PATCH 08/10] Update lint python version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9b3b4a090..575c1c162 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: - name: Check out source repository uses: actions/checkout@v4 - name: Set up Python environment - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 - name: flake8 Lint uses: py-actions/flake8@v2 with: From 3b9d46665c344f12aea0990029a8b517c1d7587d Mon Sep 17 00:00:00 2001 From: "Brent R. Yates" Date: Tue, 23 Apr 2024 13:29:27 -0400 Subject: [PATCH 09/10] Change back codecov version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 575c1c162..2d0454e26 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -134,7 +134,7 @@ jobs: - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v2 with: token: ${{ secrets.CODECOV_TOKEN }} directory: ./coverage/reports/ From f6dd373c7dd88fb5ddb6a422fb235307ce73991b Mon Sep 17 00:00:00 2001 From: "Brent R. Yates" Date: Tue, 23 Apr 2024 13:44:16 -0400 Subject: [PATCH 10/10] Rolling back changes --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d0454e26..12f6c01df 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,9 +13,9 @@ jobs: name: Lint steps: - name: Check out source repository - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Set up Python environment - uses: actions/setup-python@v5 + uses: actions/setup-python@v4 - name: flake8 Lint uses: py-actions/flake8@v2 with: @@ -65,7 +65,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v2 - name: Add conda to system path run: |