ENH: load particle definitions from pdg package - #371
Conversation
|
|
||
| class _UnsupportedParticleError(ValueError): | ||
| """Raised when a PDG entry cannot be represented by QRules.""" | ||
|
|
There was a problem hiding this comment.
Don't know if this is really needed 🤔
| "rho": R"\rho", | ||
| "tau": R"\tau", | ||
| } | ||
|
|
There was a problem hiding this comment.
I don't like, that there is another dictionary defined, like in in _labels.py.
There was a problem hiding this comment.
pdg package doesn't come with its own LaTeX names for particles. When we want to migrate to pdg we need an own conversion of particle names to its LaTeX variant. This is the task of this module...
There was a problem hiding this comment.
Oh okay, that's bad... Does make me wonder where PDG Live gets its LaTeX names 🤔 Maybe @mmikhasenko knows?
|
When replacing the load_pdg() function all tests have to be edited because of the new naming convention. |
…add caching for PDG particle loading and remove unused dependencies
| return f"{pytestconfig.rootpath}/tests/output/" | ||
|
|
||
|
|
||
| @pytest.fixture(scope="session") |
There was a problem hiding this comment.
This seemed to be used for version checks of the particle package, right?
Should we also implement version tests for pdg package?
redeboer
left a comment
There was a problem hiding this comment.
General feedback without reading the code to closely: this PR should not switch to the pdg package as input, but should offer that as an additional source. For instance, with a flag in the load_pdg() function.
| "frozendict", | ||
| "jsonschema", | ||
| "particle", | ||
| "pdg >=2026.0,<2027", |
There was a problem hiding this comment.
Maybe better to avoid an upper limit here. But not sure.
There was a problem hiding this comment.
Ohhh, okay...
Then I will revert most changes and implement this as an additional source. Sorry!

Closes #332