Skip to content

Commit

Permalink
Merge branch 'master' into ome_rust
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhekhorn committed Sep 16, 2024
2 parents b7932aa + 988366a commit b1beb83
Show file tree
Hide file tree
Showing 198 changed files with 827 additions and 1,171 deletions.
7 changes: 4 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ language, however, please read a "Please" in front of everything.
- :brain: Be reasonable and use common sense when contributing: we
added some points we would like to highlight below
- :family: Follow our [Code of
Conduct](https://github.com/N3PDF/eko/blob/master/.github/CODE_OF_CONDUCT.md)
Conduct](https://github.com/NNPDF/eko/blob/master/.github/CODE_OF_CONDUCT.md)
and use the provided [Issue
Templates](https://github.com/N3PDF/eko/issues/new/choose)
Templates](https://github.com/NNPDF/eko/issues/new/choose)
- :1234: Use the _almost_ standard [SemVer](https://semver.org/) for version numbers

## Tools

Expand All @@ -25,7 +26,7 @@ language, however, please read a "Please" in front of everything.
generated (and intended to be used)
- :parking: [`pre-commit`](https://pre-commit.com/) is used to enforce
automation and standardize the tools for all developers; if you want
to contribute to this project, install it and setup
to contribute to this project, install it and activate it

## Docs

Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/lha_bot_rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# A single CI script with github workflow.
name: LHA Benchmarks (Rust)

on:
push:
branches-ignore:
- "*"
tags:
pull_request:
types:
- closed
- ready_for_review
- review_requested
workflow_dispatch:

jobs:
lhabench:
name: LHA paper Benchmarks
runs-on: ubuntu-latest
container:
image: ghcr.io/nnpdf/bench-evol:v2
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
with:
# tags needed for dynamic versioning
fetch-depth: 0
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
installer-parallel: true
- name: Install project
run: |
poetry install --no-interaction --with test -E mark -E box
- name: Install task runner
run: pip install poethepoet
- name: Run benchmark
run: |
./rustify.sh
poe lha -m "nnlo and sv"
# TODO wait for polarized to reactivate
# poe lha -m "ffns_pol and sv"
45 changes: 17 additions & 28 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,22 @@ repos:
hooks:
- id: pycln
args: [--config=pyproject.toml]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: 1.18.0
hooks:
- id: blacken-docs
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
files: ^src/
args: ["--add-ignore=D107,D105"]
additional_dependencies:
- toml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.5
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
additional_dependencies: [tomli]
args: [--in-place, --config, ./pyproject.toml]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies: [types-PyYAML]
Expand All @@ -53,14 +42,14 @@ repos:
- repo: local
hooks:
- id: fmt
name: fmt
name: cargo fmt
description: Format Rust files with cargo fmt.
entry: cargo fmt --
language: system
files: ^crates/.*\.rs$
args: []
- id: clippy
name: clippy
name: cargo clippy
description: Check Rust files with cargo clippy.
entry: cargo clippy --all-targets --all-features -- -Dclippy::all
pass_filenames: false
Expand Down
5 changes: 2 additions & 3 deletions benchmarks/CT14_bench.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
Benchmark CT14 pdf family
"""Benchmark CT14 pdf family.
- as far as I understand, the llo family uses LO splitting functions with LO alphas evolution,
whereas the lo family uses LO splitting functions with NLO alphas evolution
Expand All @@ -25,7 +24,7 @@


class BenchmarkCT14(Runner):
"""Benchmark CT14 pdfs"""
"""Benchmark CT14 pdfs."""

external = "LHAPDF"

Expand Down
7 changes: 2 additions & 5 deletions benchmarks/CT18_bench.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
"""
Benchmark CT18 pdf family
"""
"""Benchmark CT18 pdf family."""

from banana import register

Expand All @@ -23,7 +20,7 @@


class BenchmarkCT18(Runner):
"""Benchmark CT18 pdfs"""
"""Benchmark CT18 pdfs."""

external = "LHAPDF"

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/DSSV_bench.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Benchmark DSSV pdf family.
Note that the PDF set is private, but can be obtained from the
authors upon request.
Note that the PDF set is private, but can be obtained from the authors
upon request.
"""

from banana import register
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/FF_LHAPDF_bench.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Benchmark FFs from LHAPDF"""
"""Benchmark FFs from LHAPDF."""

from banana import register

Expand Down
7 changes: 2 additions & 5 deletions benchmarks/HERA20_bench.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
"""
Benchmark HERAPDF2.0 pdf family
"""
"""Benchmark HERAPDF2.0 pdf family."""

from banana import register

Expand All @@ -27,7 +24,7 @@


class BenchmarkHERA20(Runner):
"""Benchmark HERA20 pdfs"""
"""Benchmark HERA20 pdfs."""

external = "LHAPDF"

Expand Down
16 changes: 6 additions & 10 deletions benchmarks/NNPDF_bench.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
Benchmark NNPDF pdf family
"""
"""Benchmark NNPDF pdf family."""

from banana import register

Expand All @@ -11,9 +9,7 @@


class BenchmarkNNPDF(Runner):
"""
Globally set the external program to LHAPDF
"""
"""Globally set the external program to LHAPDF."""

external = "LHAPDF"

Expand Down Expand Up @@ -49,7 +45,7 @@ def skip_pdfs(self, _theory):


class BenchmarkNNPDF31(BenchmarkNNPDF):
"""Benchmark NNPDF3.1"""
"""Benchmark NNPDF3.1."""

def benchmark_nlo(self, Q0=1.65, mugrid=(10,)):
theory_card = {
Expand All @@ -64,7 +60,7 @@ def benchmark_nlo(self, Q0=1.65, mugrid=(10,)):


class BenchmarkNNPDF31_luxqed(BenchmarkNNPDF):
"""Benchmark NNPDF3.1_luxqed"""
"""Benchmark NNPDF3.1_luxqed."""

def benchmark_nnlo(self, Q0=1.65, mugrid=(10,)):
theory_card = {
Expand All @@ -91,7 +87,7 @@ def benchmark_nnlo(self, Q0=1.65, mugrid=(10,)):


class BenchmarkNNPDF40(BenchmarkNNPDF):
"""Benchmark NNPDF4.0"""
"""Benchmark NNPDF4.0."""

def benchmark_nlo(self, Q0=1.65, mugrid=(10,)):
theory_card = {
Expand Down Expand Up @@ -119,7 +115,7 @@ def benchmark_nnlo(self, Q0=1.65, mugrid=(10,)):


class BenchmarkNNPDFpol11(BenchmarkNNPDF):
"""Benchmark NNPDFpol11"""
"""Benchmark NNPDFpol11."""

def benchmark(self, Q0=1.65, mugrid=(10,)):
theory_card = {
Expand Down
Loading

0 comments on commit b1beb83

Please sign in to comment.