-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into reimplement-HERA-datasets
- Loading branch information
Showing
1,417 changed files
with
426,436 additions
and
357,971 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# A CI script with github workflow to test the new commondata | ||
name: Test new commondata | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test-commondata: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-tags: true | ||
fetch-depth: 0 | ||
- name: Install NNPDF data package 🐍 | ||
run: pip install ./nnpdf_data/'[filter]' | ||
- name: Run the filters 📦 | ||
shell: bash -l {0} | ||
run: | | ||
here=$PWD | ||
readarray -d '' array < <(find ./nnpdf_data/nnpdf_data/commondata -name "filter.py" -print0) | ||
for datname in "${array[@]}"; do dirpath=${datname%/*}; cd $dirpath; python filter.py || exit $?; cd $here; done | ||
- name: Check for modified files 🛎️ | ||
uses: tj-actions/verify-changed-files@v20 | ||
id: verify-changed-files | ||
- name: List all changed files and fail if any 🛎️ | ||
if: steps.verify-changed-files.outputs.files_changed == 'true' | ||
env: | ||
CHANGED_FILES: ${{ steps.verify-changed-files.outputs.changed_files }} | ||
run: | | ||
echo "Changed files: $CHANGED_FILES" | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Test pytorch | ||
|
||
on: [push] | ||
|
||
jobs: | ||
run_pytorch: | ||
runs-on: ubuntu-latest | ||
env: | ||
KERAS_BACKEND: torch | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: Install nnpdf without LHAPDF | ||
shell: bash -l {0} | ||
run: | | ||
pip install .[nolha,torch] | ||
# Since there is no LHAPDF in the system, initialize the folder and download pdfsets.index | ||
lhapdf-management update --init | ||
- name: Test we can run one runcard | ||
shell: bash -l {0} | ||
run: | | ||
cd n3fit/runcards/examples | ||
n3fit Basic_runcard.yml 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# CI script with github workflow to regenerate the data | ||
name: Regenerate Commondata | ||
|
||
on: | ||
pull_request: | ||
types: [labeled] | ||
|
||
jobs: | ||
build: | ||
if: contains(github.event.pull_request.labels.*.name, 'regenerate-data') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- name: Install NNPDF data package 🐍 | ||
run: pip install ./nnpdf_data/'[filter]' | ||
- name: Run the filters 📦 | ||
shell: bash -l {0} | ||
run: | | ||
here=$PWD | ||
readarray -d '' array < <(find ./nnpdf_data/nnpdf_data/commondata -name "filter.py" -print0) | ||
for datname in "${array[@]}"; do dirpath=${datname%/*}; cd $dirpath; python filter.py || exit $?; cd $here; done | ||
- name: Check for modified files 🛎️ | ||
uses: tj-actions/verify-changed-files@v20 | ||
id: verify-changed-files | ||
- name: Commit the changed files 🛎️ | ||
if: steps.verify-changed-files.outputs.files_changed == 'true' | ||
shell: bash -l {0} | ||
run: | | ||
git config user.name "Regenerate Commondata" | ||
git config user.email "<>" | ||
git add nnpdf_data/nnpdf_data/commondata/* | ||
git status | ||
git commit -m "Automatically regenerated commondata from PR ${{ github.event.number }}, branch ${{ github.event.pull_request.head.ref }}." | ||
git push origin "${{ github.event.pull_request.head.ref }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,10 +12,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-14] | ||
python-version: ["3.12"] # Test only the latest python in all system | ||
include: | ||
- os: ubuntu-latest # Test also the oldest python supported in ubuntu | ||
python-version: "3.9" | ||
python-version: ["3.12"] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
|
@@ -45,7 +42,7 @@ jobs: | |
run: | | ||
conda build -q conda-recipe | ||
- name: Upload noarch conda package to NNPDF server | ||
if: ${{ (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && startsWith(matrix.os, 'ubuntu') && matrix.python-version == '3.9' }} | ||
if: ${{ (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && startsWith(matrix.os, 'ubuntu') }} | ||
shell: bash -l {0} | ||
run: | | ||
KEY=$( mktemp ) | ||
|
@@ -54,7 +51,7 @@ jobs: | |
$CONDA_PREFIX/conda-bld/noarch/*.tar.bz2 \ | ||
[email protected]:~/packages/conda/noarch | ||
- name: Build and upload sphinx documentation to NNPDF server | ||
if: startsWith(matrix.os, 'ubuntu') && github.ref == 'refs/heads/master' && matrix.python-version == '3.9' | ||
if: startsWith(matrix.os, 'ubuntu') && github.ref == 'refs/heads/master' | ||
shell: bash -l {0} | ||
run: | | ||
KEY=$( mktemp ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: 'v4.5.0' | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: 'v5.0.0' | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: '24.3.0' | ||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: '24.10.0' | ||
hooks: | ||
- id: black | ||
- id: black | ||
args: ['--config=./pyproject.toml'] | ||
|
||
- repo: https://github.com/pycqa/isort | ||
- repo: https://github.com/pycqa/isort | ||
rev: '5.13.2' | ||
hooks: | ||
- id: isort | ||
- id: isort | ||
args: ['--settings-path=./pyproject.toml'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#For some reason the resolver decides to use an old version of numpy | ||
#without this | ||
numpy: | ||
- 1.24 | ||
- 1.26 | ||
|
||
pin_run_as_build: | ||
lhapdf: x.x.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.