Skip to content

Commit ac51900

Browse files
Add a separate action to set the NEOPDF_DATA_PATH
1 parent 220dd39 commit ac51900

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

‎.github/actions/install_conda_pip/action.yml‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,4 @@ runs:
4444
shell: bash -l {0}
4545
run: |
4646
pip install -e .${{ inputs.nnpdf-extras }}
47-
- name: Point NeoPDF at the LHAPDF data directory
48-
shell: bash -l {0}
49-
run: |
50-
echo "NEOPDF_DATA_PATH=$(python -c 'import lhapdf; print(lhapdf.paths()[0])')" >> $GITHUB_ENV
47+
- uses: ./.github/actions/set_neopdf_datapath
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Set NEOPDF_DATA_PATH
2+
3+
# Point NeoPDF at the directory where lhapdf-management stores PDF sets,
4+
# so it reads local files instead of downloading from the LHAPDF servers.
5+
6+
runs:
7+
using: "composite"
8+
steps:
9+
- name: Point NeoPDF at the LHAPDF data directory
10+
shell: bash -l {0}
11+
run: |
12+
echo "NEOPDF_DATA_PATH=$(python -c 'from lhapdf_management.configuration import environment; print(environment.datapath)')" >> $GITHUB_ENV

‎.github/workflows/all_tests_nnpdf.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ jobs:
133133
pip install ".[neopdf,torch]" "torch<2.12"
134134
# Since there is no LHAPDF in the system, initialize the folder and download pdfsets.index
135135
lhapdf-management update --init
136+
- uses: ./.github/actions/set_neopdf_datapath
136137
- name: Test we can run one runcard
137138
shell: bash -l {0}
138139
run: |
@@ -164,6 +165,7 @@ jobs:
164165
pip install .[neopdf,jax]
165166
# Since there is no LHAPDF in the system, initialize the folder and download pdfsets.index
166167
lhapdf-management update --init
168+
- uses: ./.github/actions/set_neopdf_datapath
167169
- name: Test we can run one runcard
168170
shell: bash -l {0}
169171
run: |

0 commit comments

Comments
 (0)