Skip to content

Commit

Permalink
Merge pull request #64 from N3PDF/benchmark/QCDNUM
Browse files Browse the repository at this point in the history
QCDNUM benchmark
  • Loading branch information
felixhekhorn authored Jul 1, 2020
2 parents f44fa0e + 5c759d1 commit e72ff55
Show file tree
Hide file tree
Showing 29 changed files with 2,286 additions and 424 deletions.
38 changes: 2 additions & 36 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,15 @@ on:
- master
- "feature/*"
- "release/*"
- "benchmarks/*"
- "tests/*"
- "benchmark/*"
- "test/*"
pull_request:
# TODO: https://github.saobby.my.eu.orgmunity/t5/GitHub-Actions/Triggering-workflow-on-merge/td-p/40930
types:
- closed
branches:
- master

env:
UPLOAD_NON_MASTER: false

jobs:
# build is the <job_id>
build:
Expand All @@ -35,14 +32,6 @@ jobs:
steps:
# checkout the repo on the github runner
- uses: actions/checkout@v2
with:
token: ${{ secrets.ALE_DIS_PAT }}
submodules: "true"
# fetch all tags & stuffs
# in order to make GIT_DESCRIBE_* available (from git describe --tags)
# --> needed only for the conda-recipe
- name: Fetch tags
run: git fetch --unshallow --no-recurse-submodules
# use an external action to setup miniconda
# - also setup a conda virtual environment named 'yadism'
#
Expand All @@ -63,23 +52,6 @@ jobs:
conda config --add channels https://packages.nnpdf.science/conda
conda install -y lhapdf
conda install -y apfel
# install eko
# - @ the correct commit (no official suitable tag currently available)
# - providing the C dependencies
- name: Install eko
shell: bash -l {0}
run: |
conda activate yadism
#
cd eko
# git fetch --unshallow
# git checkout 8b4f1c44664ed699d455c52c80f2bd1f9c0c642d
cd ..
# install Gnu Scientific Library (GSL)
# sudo works passwordless on github-workflow
sudo apt-get install libgsl-dev
# install eko (trailing '/' needed!)
pip install eko/
# install the actual python package 'yadism'
- name: Install yadism
shell: bash -l {0}
Expand Down Expand Up @@ -109,12 +81,6 @@ jobs:
conda activate yadism
# run tests
pytest -m quick_check benchmarks
#pytest
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: htmlcov
path: htmlcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/pub_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
deploy-ghpages:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
# max-parallel: 2
matrix:
python-version: [3.7]
fail-fast: false
Expand All @@ -29,11 +29,6 @@ jobs:
run: |
# install pip
python -m pip install --upgrade pip
# install eko
sudo apt-get install libgsl-dev # eko dependency
cd eko
pip install .
cd ..
# install yadism
pip install .
- name: Build 🔨
Expand Down
48 changes: 6 additions & 42 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,30 @@
name: yadism-regression

on:
- push

env:
UPLOAD_NON_MASTER: false
push:
branches-ignore:
- "*docs*"

jobs:
# build is the <job_id>
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
# max-parallel: 2
matrix:
python-version: [3.8]
include:
- python-version: 3.8
python-version: [3.7, 3.8]
fail-fast: false

steps:
# checkout the repo on the github runner
- uses: actions/checkout@v2
# checkout submodules
- name: Checkout submodules
uses: actions/checkout@v2
with:
repository: N3PDF/eko
token: ${{ secrets.ALE_DIS_PAT }}
path: eko
- name: Set up Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
# fetch all tags & stuffs
# in order to make GIT_DESCRIBE_* available (from git describe --tags)
# --> needed only for the conda-recipe
- name: Fetch tags
run: git fetch --unshallow --no-recurse-submodules
# install eko
# - @ the correct commit (no official suitable tag currently available)
# - providing the C dependencies
- name: Install eko
run: |
#
cd eko
# git fetch --unshallow
# git checkout 8b4f1c44664ed699d455c52c80f2bd1f9c0c642d
cd ..
# install Gnu Scientific Library (GSL)
# sudo works passwordless on github-workflow
sudo apt-get install libgsl-dev
# install eko (trailing '/' needed!)
pip install eko/
# install the actual python package 'yadism'
- name: Install yadism
run: |
#
pip install .
- name: Prepare Test environment
run: |
Expand All @@ -68,12 +38,6 @@ jobs:
run: |
# run tests
pytest -m regression
#pytest
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: htmlcov
path: htmlcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
Expand Down
83 changes: 8 additions & 75 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,86 +5,29 @@ on:
branches-ignore:
- "*docs*"

defaults:
run:
shell: bash -l {0}

env:
UPLOAD_NON_MASTER: false

jobs:
# build is the <job_id>
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
# max-parallel: 2
matrix:
python-version: [3.8]
include:
- python-version: 3.8
conda-py: 38
env:
CONDA_PY: ${{ matrix.conda-py }} # strange way to manage env vars inclusion

python-version: [3.7, 3.8]
fail-fast: false

steps:
# checkout the repo on the github runner
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v1
with:
token: ${{ secrets.ALE_DIS_PAT }}
submodules: "true"
# fetch all tags & stuffs
# in order to make GIT_DESCRIBE_* available (from git describe --tags)
# --> needed only for the conda-recipe
- name: Fetch tags
run: git fetch --unshallow --no-recurse-submodules
# use an external action to setup miniconda
# - also setup a conda virtual environment named 'yadism'
#
# (in order to use the conda venv at each step you need to login with
# 'bash -l {0}' in the 'shell' field, and to activate the environment)
- uses: goanpeca/setup-miniconda@v1
with:
auto-update-conda: true
miniconda-version: "latest"
activate-environment: yadism
python-version: ${{ matrix.python-version }}
# install lhapdf and apfel from the nnpdf conda repo
- name: Install lhapdf and apfel with conda
run: |
conda activate yadism
#
conda config --add channels https://packages.nnpdf.science/conda
conda install -y lhapdf
conda install -y apfel
# install eko
# - @ the correct commit (no official suitable tag currently available)
# - providing the C dependencies
- name: Install eko
run: |
conda activate yadism
#
cd eko
# git fetch --unshallow
# git checkout 8b4f1c44664ed699d455c52c80f2bd1f9c0c642d
cd ..
# install Gnu Scientific Library (GSL)
# sudo works passwordless on github-workflow
sudo apt-get install libgsl-dev
# install eko (trailing '/' needed!)
pip install eko/
# install the actual python package 'yadism'
- name: Install yadism
run: |
conda activate yadism
#
python -m pip install --upgrade pip
pip install .
- name: Prepare Test environment
run: |
conda activate yadism
# download required data:
# - install needed lhapdf PDFSets
#lhapdf update
#lhapdf get CT14llo_NF3
# install packages needed for testing
pip install -r test_requirements.txt
# generate input db
Expand All @@ -96,27 +39,17 @@ jobs:
# - only for 'dis', 'eko' is a dependency (supposed to be delivered
# already checked)
- name: Lint with pylint
shell: bash -l {0}
run: |
conda activate yadism
#
conda install -y pylint toml
pip install pylint
# Search for actual errors
pylint src/*/*.py -E
# For warnings instead return always zero
pylint src/*/*.py --exit-zero
# run the test with 'pytest'
- name: Test yadism
run: |
conda activate yadism
# run tests
pytest -m quick_check tests
#pytest
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: htmlcov
path: htmlcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ ignored-classes=optparse.Values,thread._local,_thread._local
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=matplotlib.cm,eko
ignored-modules=matplotlib.cm,eko,QCDNUM

# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
Expand Down
1 change: 1 addition & 0 deletions benchmarks/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.wgt
Loading

0 comments on commit e72ff55

Please sign in to comment.