Skip to content

Commit 0266be9

Browse files
eduardo-rodriguesAPN-Puckypre-commit-ci[bot]
authored
chore: Add support for Python 3.14, minor modernisations, more citations of pylhe (#332)
* Add support for Python 3.14 & minor modernisations * Remove .coveragerc * Update codecov.yml * Modernise .pre-commit-config.yaml as per repo-review suggestions * Update pyproject.toml for codecov * Improve coverage a bit * Remove pytest.ini since options are now in pyproject.toml * Update .github/workflows/ci.yml Co-authored-by: Alexander Puck Neuwirth <[email protected]> * Add more citations of pylhe, please blacken-docs * Remove unnecessary pytest.ini_options * Update filterwarnings option in pyproject.toml * Syntax fix in pyproject.toml * [ci skip] remove test * Add pytest.ini back! * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Alexander Puck Neuwirth <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 1e1c079 commit 0266be9

File tree

8 files changed

+39
-28
lines changed

8 files changed

+39
-28
lines changed

.coveragerc

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
matrix:
2626
os: [ubuntu-latest]
27-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
27+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
2828

2929
steps:
3030
- uses: actions/checkout@v5

.pre-commit-config.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ repos:
2727
- tomli
2828

2929
- repo: https://github.com/astral-sh/ruff-pre-commit
30-
rev: "v0.13.3"
30+
rev: "v0.14.2"
3131
hooks:
32-
- id: ruff
32+
- id: ruff-check
3333
args: ["--fix", "--show-fixes"]
3434
- id: ruff-format
3535

@@ -40,3 +40,16 @@ repos:
4040
files: src
4141
args: [--show-error-codes]
4242
additional_dependencies: [particle, awkward, vector, graphviz]
43+
44+
- repo: https://github.com/pre-commit/pygrep-hooks
45+
rev: v1.10.0
46+
hooks:
47+
- id: rst-backticks
48+
- id: rst-directive-colons
49+
- id: rst-inline-touching-normal
50+
51+
- repo: https://github.com/adamchainz/blacken-docs
52+
rev: "1.19.1"
53+
hooks:
54+
- id: blacken-docs
55+
additional_dependencies: [black==23.*]

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ For a full example see [write](examples/03_write_monte_carlo_example.ipynb) or [
8585
The values in the sketch below are intentionally left empty since they depend on the use-case.
8686
The data structure of `pylhe` is:
8787

88-
```python
88+
```
8989
import pylhe
9090
9191
file=pylhe.LHEFile(
@@ -147,7 +147,6 @@ file=pylhe.LHEFile(
147147
148148
# write to file, compressed if gz/gzip suffix
149149
write_lhe_file(file.init, file.events, "myevents.lhe.gz", rwgt=True, weights=False)
150-
151150
```
152151

153152

@@ -167,6 +166,11 @@ The preferred BibTeX entry for citation of `pylhe` is
167166

168167
`pylhe` has been referenced in:
169168

169+
* [Flow Annealed Importance Sampling Bootstrap meets Differentiable Particle Physics](https://inspirehep.net/literature/2851739) (2024)
170+
* [Interference effects in resonant di-Higgs production at the LHC in the Higgs singlet extension](https://inspirehep.net/literature/2826958) (2024)
171+
* [Search for nearly degenerate higgsinos via photon fusion with the semileptonic channel at the LHC](https://inspirehep.net/literature/2788228) (2024)
172+
* [Strategy to measure tau via photon fusion in LHC proton collisions](https://inspirehep.net/literature/2767190) (2024)
173+
* [Probing dark photons from a light scalar at Belle II](https://inspirehep.net/literature/2744442) (2024)
170174
* [Constraints on the trilinear and quartic Higgs couplings from triple Higgs production at the LHC and beyond](https://inspirehep.net/literature/2734125) (2023)
171175
* [BSM reach of four-top production at the LHC](https://inspirehep.net/literature/2633019) (2023)
172176
* [Probing compressed higgsinos with forward protons at the LHC](https://inspirehep.net/literature/2140007) (2023)

codecov.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
coverage:
2-
status:
3-
project:
4-
default:
5-
threshold: 0.2%
1+
codecov:
2+
require_ci_to_pass: true

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. pylhe documentation master file, created by
22
sphinx-quickstart on Thu Jul 31 09:01:00 2025.
33
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
4+
contain the root ``toctree`` directive.
55
66
|project| |version| documentation
77
=================================

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ classifiers = [
3535
"Programming Language :: Python :: 3.11",
3636
"Programming Language :: Python :: 3.12",
3737
"Programming Language :: Python :: 3.13",
38+
"Programming Language :: Python :: 3.14",
3839
"Topic :: Scientific/Engineering",
3940
"Topic :: Scientific/Engineering :: Physics",
4041
]
@@ -117,6 +118,17 @@ enable_error_code = [
117118
"truthy-bool",
118119
]
119120

121+
[tool.pytest.ini_options]
122+
minversion = "6.0"
123+
testpaths = ["tests"]
124+
log_cli_level = "INFO"
125+
xfail_strict = true
126+
addopts = [
127+
"-ra",
128+
"--strict-markers",
129+
"--strict-config",
130+
]
131+
120132
[tool.ruff.lint]
121133
extend-select = [
122134
"B", # flake8-bugbear

src/pylhe/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Writeable(Protocol):
6666
A protocol for writeable objects.
6767
"""
6868

69-
def write(self, s: str) -> Any:
69+
def write(self, s: str) -> Any: # pragma: no cover
7070
"""Write a string to the object."""
7171
...
7272

@@ -1049,7 +1049,7 @@ def read_num_events(filepath: PathLike) -> int:
10491049

10501050
def write_lhe_file_string(
10511051
lhefile: LHEFile, rwgt: bool = True, weights: bool = False
1052-
) -> str:
1052+
) -> str: # pragma: no cover
10531053
"""
10541054
Return the LHE file as a string.
10551055

0 commit comments

Comments
 (0)