From e857b01ae94875b445f4980e993a561eedf32f63 Mon Sep 17 00:00:00 2001 From: Ludwig Neste <31670556+The-Ludwig@users.noreply.github.com> Date: Mon, 18 Nov 2024 21:54:04 +0100 Subject: [PATCH] Fix pdgid (#104) * fix #103 * add tests for bug #103 * update corsika version * update corsika version in tests * update corsika compare files --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- panama/read.py | 6 ++++++ pdm.lock | 37 ++++++++++++++++++++++++++++++++-- tests/files/compare/DAT000000 | Bin 137640 -> 137640 bytes tests/files/noEHIST/DAT101001 | Bin 0 -> 22940 bytes tests/test_cli.py | 4 ++-- tests/test_read.py | 8 ++++++++ tests/test_run.py | 4 ++-- 9 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 tests/files/noEHIST/DAT101001 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 559e1b9..84ae294 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: python-version: ["3.8"] - corsika-version: ["77500"] + corsika-version: ["77550"] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4766d9a..b1a394d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: matrix: python-version: ["3.11"] poetry-version: ["1.3"] - corsika-version: ["77500"] + corsika-version: ["77550"] os: [ubuntu-latest] runs-on: ${{ matrix.os }} permissions: diff --git a/panama/read.py b/panama/read.py index 3ab62eb..16fb5d1 100644 --- a/panama/read.py +++ b/panama/read.py @@ -386,6 +386,8 @@ def add_mother_columns( else False for pdgid in pdgids } + # explicitly force an invalid PDGID to not be charm + has_charm[PDGID_ERROR_VAL] = False # this follows the MCEq definition lifetimes = { @@ -395,6 +397,8 @@ def add_mother_columns( for pdgid in lifetimes: if lifetimes[pdgid] is None: lifetimes[pdgid] = 0 + # explicitly force invalid PDGID to have infinite lifetime + lifetimes[PDGID_ERROR_VAL] = inf is_resonance = { pdgid: "*" in Particle.from_pdgid(pdgid).name @@ -402,6 +406,8 @@ def add_mother_columns( else False for pdgid in pdgids } + # explicitly force an invalid PDGID to not be a resonance + is_resonance[PDGID_ERROR_VAL] = False df_particles["mother_lifetimes"] = df_particles["mother_pdgid"].map( lifetimes, na_action=None diff --git a/pdm.lock b/pdm.lock index feb87e0..0e10def 100644 --- a/pdm.lock +++ b/pdm.lock @@ -4,8 +4,11 @@ [metadata] groups = ["default", "dev", "hdf"] strategy = ["cross_platform"] -lock_version = "4.4.1" -content_hash = "sha256:841616f19ebdf6cfc93ad4b8292b98d3747ecd22d145988992325f2b0321245a" +lock_version = "4.5.0" +content_hash = "sha256:e2bcaec8f930c4c515ce93e885c5b0128ee92cb8db45f7272db99c43c742ac96" + +[[metadata.targets]] +requires_python = ">=3.8,<3.12" [[package]] name = "accessible-pygments" @@ -61,6 +64,7 @@ requires_python = ">=3.7" summary = "Argon2 for Python" dependencies = [ "argon2-cffi-bindings", + "typing-extensions; python_version < \"3.8\"", ] files = [ {file = "argon2_cffi-23.1.0-py3-none-any.whl", hash = "sha256:c670642b78ba29641818ab2e68bd4e6a78ba53b7eff7b4c3815ae16abf91c7ea"}, @@ -119,6 +123,7 @@ version = "2.4.1" summary = "Annotate AST trees with source code positions" dependencies = [ "six>=1.12.0", + "typing; python_version < \"3.5\"", ] files = [ {file = "asttokens-2.4.1-py2.py3-none-any.whl", hash = "sha256:051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24"}, @@ -143,6 +148,9 @@ name = "attrs" version = "23.1.0" requires_python = ">=3.7" summary = "Classes Without Boilerplate" +dependencies = [ + "importlib-metadata; python_version < \"3.8\"", +] files = [ {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, @@ -155,6 +163,7 @@ requires_python = ">=3.7" summary = "Internationalization utilities" dependencies = [ "pytz>=2015.7; python_version < \"3.9\"", + "setuptools; python_version >= \"3.12\"", ] files = [ {file = "Babel-2.13.1-py3-none-any.whl", hash = "sha256:7077a4984b02b6727ac10f1f7294484f737443d7e2e66c5e4380e41a3ae0b4ed"}, @@ -194,6 +203,7 @@ dependencies = [ "pathspec>=0.9.0", "platformdirs>=2", "tomli>=1.1.0; python_full_version < \"3.11.0a7\"", + "typed-ast>=1.4.2; python_version < \"3.8\" and implementation_name == \"cpython\"", "typing-extensions>=3.10.0.0; python_version < \"3.10\"", ] files = [ @@ -405,6 +415,7 @@ requires_python = ">=3.7" summary = "Composable command line interface toolkit" dependencies = [ "colorama; platform_system == \"Windows\"", + "importlib-metadata; python_version < \"3.8\"", ] files = [ {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, @@ -451,6 +462,7 @@ requires_python = ">=3.8" summary = "Python library for calculating contours of 2D quadrilateral grids" dependencies = [ "numpy<2.0,>=1.16; python_version <= \"3.11\"", + "numpy<2.0,>=1.26.0rc1; python_version >= \"3.12\"", ] files = [ {file = "contourpy-1.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:46e24f5412c948d81736509377e255f6040e94216bf1a9b5ea1eaa9d29f6ec1b"}, @@ -790,6 +802,9 @@ name = "fqdn" version = "1.5.1" requires_python = ">=2.7, !=3.0, !=3.1, !=3.2, !=3.3, !=3.4, <4" summary = "Validates fully-qualified domain names against RFC 1123, so that they are acceptable to modern bowsers" +dependencies = [ + "cached-property>=1.3.0; python_version < \"3.8\"", +] files = [ {file = "fqdn-1.5.1-py3-none-any.whl", hash = "sha256:3a179af3761e4df6eb2e026ff9e1a3033d3587bf980a0b1b2e1e5d08d7358014"}, {file = "fqdn-1.5.1.tar.gz", hash = "sha256:105ed3677e767fb5ca086a0c1f4bb66ebc3c100be518f0e0d755d9eae164d89f"}, @@ -841,6 +856,7 @@ version = "6.8.0" requires_python = ">=3.8" summary = "Read metadata from Python packages" dependencies = [ + "typing-extensions>=3.6.4; python_version < \"3.8\"", "zipp>=0.5", ] files = [ @@ -1205,6 +1221,9 @@ name = "kiwisolver" version = "1.4.5" requires_python = ">=3.7" summary = "A fast implementation of the Cassowary constraint solver" +dependencies = [ + "typing-extensions; python_version < \"3.8\"", +] files = [ {file = "kiwisolver-1.4.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:05703cf211d585109fcd72207a31bb170a0f22144d68298dc5e61b3c946518af"}, {file = "kiwisolver-1.4.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:146d14bebb7f1dc4d5fbf74f8a6cb15ac42baadee8912eb84ac0b3b2a3dc6ac3"}, @@ -1777,6 +1796,9 @@ name = "overrides" version = "7.4.0" requires_python = ">=3.6" summary = "A decorator to automatically detect mismatch when overriding a method." +dependencies = [ + "typing; python_version < \"3.5\"", +] files = [ {file = "overrides-7.4.0-py3-none-any.whl", hash = "sha256:3ad24583f86d6d7a49049695efe9933e67ba62f0c7625d53c59fa832ce4b8b7d"}, {file = "overrides-7.4.0.tar.gz", hash = "sha256:9502a3cca51f4fac40b5feca985b6703a5c1f6ad815588a7ca9e285b9dca6757"}, @@ -1895,6 +1917,9 @@ files = [ name = "pickleshare" version = "0.7.5" summary = "Tiny 'shelve'-like database with concurrency support" +dependencies = [ + "pathlib2; python_version in \"2.6 2.7 3.2 3.3\"", +] files = [ {file = "pickleshare-0.7.5-py2.py3-none-any.whl", hash = "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56"}, {file = "pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"}, @@ -1968,6 +1993,9 @@ name = "platformdirs" version = "3.11.0" requires_python = ">=3.7" summary = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +dependencies = [ + "typing-extensions>=4.7.1; python_version < \"3.8\"", +] files = [ {file = "platformdirs-3.11.0-py3-none-any.whl", hash = "sha256:e9d171d00af68be50e9202731309c4e658fd8bc76f55c11c7dd760d023bda68e"}, {file = "platformdirs-3.11.0.tar.gz", hash = "sha256:cf8ee52a3afdb965072dcc652433e0c7e3e40cf5ea1477cd4b3b1d2eb75495b3"}, @@ -2123,6 +2151,7 @@ summary = "pytest: simple powerful testing with Python" dependencies = [ "colorama; sys_platform == \"win32\"", "exceptiongroup>=1.0.0rc8; python_version < \"3.11\"", + "importlib-metadata>=0.12; python_version < \"3.8\"", "iniconfig", "packaging", "pluggy<2.0,>=0.12", @@ -2980,6 +3009,7 @@ summary = "Virtual Python Environment builder" dependencies = [ "distlib<1,>=0.3.7", "filelock<4,>=3.12.2", + "importlib-metadata>=6.6; python_version < \"3.8\"", "platformdirs<4,>=3.9.1", ] files = [ @@ -2991,6 +3021,9 @@ files = [ name = "wcwidth" version = "0.2.9" summary = "Measures the displayed width of unicode strings in a terminal" +dependencies = [ + "backports-functools-lru-cache>=1.2.1; python_version < \"3.2\"", +] files = [ {file = "wcwidth-0.2.9-py2.py3-none-any.whl", hash = "sha256:9a929bd8380f6cd9571a968a9c8f4353ca58d7cd812a4822bba831f8d685b223"}, {file = "wcwidth-0.2.9.tar.gz", hash = "sha256:a675d1a4a2d24ef67096a04b85b02deeecd8e226f57b5e3a72dbb9ed99d27da8"}, diff --git a/tests/files/compare/DAT000000 b/tests/files/compare/DAT000000 index 7a968c97bd466e213812b187fbca7ddc5c219404..60e74b4bad3f8382854a7c2de977e81a659f0551 100644 GIT binary patch delta 75 zcmZ3nnPbIf4xuTL3=Bb`ejW@!&`_T3@l9j$KNg#feydqn!Mx4?SdR0+nSIQgBSag| QLio-19&Nw(i1Cye03=c$C;$Ke delta 75 zcmZ3nnPbIf4xuTL3=Bb`ejW@!(6Av9NKgL9Vzbe2H47`4xA`B-aUM9ck9l*1XyaK3 Pzxm#y?e`uro-zXfufH2? diff --git a/tests/files/noEHIST/DAT101001 b/tests/files/noEHIST/DAT101001 new file mode 100644 index 0000000000000000000000000000000000000000..9dff7a0fecaa8df51f677f5ca75cf6e27a2e0e16 GIT binary patch literal 22940 zcmeIa2UOHt+cruSQ0Xe7GzAeA5J4c>$xxGwfT-B9V8MnRdqJs+A}Sz7sVbnTAc)9J zGT2~}L9AdeD4+<~uz>}XKV#za^ZI@7`#)!`bIv;7Sx?rQHQD>R?t9<+-h1D>WG0FJ z3JMdaj2oliwgpqzxNMAq!dEv1g)mozg^FGZf8)A-&H9ppLZt`yVdYra>(|B#dfqoj z4McvB{Ik5tV4OmTo|l5f=f8AnWFZ2@Qa#tw1=9rz3TAHgTU6W}9F*O!U%SSpxl79G zGT35*Dze{NvVP!q{`G79JT6MiV5x0C_f>kzNZqVw6XfN(`SoElH7f!}H%u{9i@ne&Vj~_5Gd4*2RUr zXE|=a{3*X@ed_YVYK7~8`u(n{hx&TTKkg%gT~2GE|_ATOh!aJqD`>!azT zTobO&an;MUakZav%VpbaBR7KsL4TF|zsr)}vGz=;5dLePg2J`gS6!MqU{|rpde`r7 zmjQVj{mJQ}XW=TaR{0mbOX6)@n>zkoS$}HyC;k712kHzpudr=AM!{koI}X=*hb8y- z3ET%NqVJtApY_t{SNnB6hERpO2QgLS{g{SBHa4%98Yb@>$HZ&A4lS7K^;C`QoBtbP-Jdb; z-x$osw6pG;TTWj3-@cLi=aSpM^4oON-~aRd{{s)O<8nmgZ8GR(PfFr&3_h(p#B)`ssxV&3R48AcIBk3YIzlZW{X69# zaYgSj0Hnw^x0?OJ+^V07hPxEOvbGN3UVM=rG`E3{`abX%wzw-6C{&CFHqSR9Rp&n8 z`T6a{ioQm_u=)f`%4~Hm_=;Jh*0?|BTG&Nw(dV$k=glc&Q!V7tfuqRmJs;@#yC(_@ zzHwNZ@ig&FWQ2IZs&~-LKo!|}>tI>tE6$c_Pa$gT!sq0N!>onRWklbQeA!!Dt`2t# z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O|Zy-C>pov3YUb z^5wiY-O_1nx$Z2_j?GK$mM`ah?3O;vmg~v#e za(!7|ZXt9B zM^(4<1-9JjEN?WM*WGS8Pn)&<_f^4`JD25QEbnMHc{#4sjaSL?7PGwREGO{~o+F`k&(>o#%agZTX}5g2KGkmep0Ivd$nq>$ zPTn89@7>b%EN>ReQ(*H}cgvUS6L(9$WXttnd6n##lH1t*is_bq&D!9^^4_yNxv#rl z@|gSkde7>!VtMkIG@)C*9M9~QZe#sCkhgDVw|qH|>6ZS^>g&UoE015@ukQABvGwiA z^5k(^XufI#%aQ7Sm@r$5?I$tJ98^J<008d7Wd}?{jQ=9Gh>% z>U_rX=Cb^JRxXg$d6(6*lhwI})j5T|Ph)kCWU(gJ&PbNq$m%p>Wed9L^k#LEY}%jA zw_UqfO{K4u>V(+_HovT>PlI5IZxyq~z#Oow@JB93bF{^V7 zo8OnkZ?n7!EI*Bv6S6uhSUq!Co&Qt%#QzjKgI}n7wAQzHi1NBTdY;JeSgh5{!)^R^ zcE0-8%S80mCF|xCSB>?tu9yBRPD+@AQPYyfa3Icb#9*c@}UE&<& zI@fd$ue*|+H|6^ucKxituGtj6dsbXy=ifiBWj|zIHE-g*G#wUrJ-OlFHGf8LumA3S zq*omldWue#dsa>vg5k?!u|?7Eu()JzypK*ku5GSI3_~~lAKoSRN5TIwDWChh#e@IA lW#6ZY%YR$KuF?OCPyd71KhQrO_{RhPc;J@@6501M|1T-7v6cV; literal 0 HcmV?d00001 diff --git a/tests/test_cli.py b/tests/test_cli.py index 8e0af46..f0bf483 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -5,8 +5,8 @@ from panama import read_DAT import pytest -CORSIKA_VERSION = "corsika-77500" -CORSIKA_EXECUTABLE = "corsika77500Linux_SIBYLL_urqmd" +CORSIKA_VERSION = "corsika-77550" +CORSIKA_EXECUTABLE = "corsika77550Linux_SIBYLL_urqmd" def test_cli_missing_executable( test_file_path=Path(__file__).parent / "files" / "example_corsika.template", diff --git a/tests/test_read.py b/tests/test_read.py index aa9bb1e..7a75f6f 100644 --- a/tests/test_read.py +++ b/tests/test_read.py @@ -15,6 +15,7 @@ SINGLE_TEST_FILE = Path(__file__).parent / "files" / "DAT000000" GLOB_TEST_FILE = Path(__file__).parent / "files" / "DAT*" +NOEHIST_TEST_FILE = Path(__file__).parent / "files" / "noEHIST" / "DAT101001" def test_noparse(test_file_path=SINGLE_TEST_FILE): @@ -61,6 +62,13 @@ def check_eq(file, df_run, df_event, particles, skip_mother=False): num += 1 +def test_noehist(test_file_path=NOEHIST_TEST_FILE): + # This used to fail (see issue #103) + df_run, df_event, df = panama.read_DAT(glob=test_file_path, mother_columns=True) + + check_eq(test_file_path, df_run, df_event, df, skip_mother=False) + + def test_noadd(test_file_path=SINGLE_TEST_FILE): with pytest.raises(ValueError, match="requires"): df_run, df_event, particles = panama.read_DAT( diff --git a/tests/test_run.py b/tests/test_run.py index 2ac234d..2680a8d 100644 --- a/tests/test_run.py +++ b/tests/test_run.py @@ -9,8 +9,8 @@ import pytest import numpy as np -CORSIKA_VERSION = "corsika-77500" -CORSIKA_EXECUTABLE = "corsika77500Linux_SIBYLL_urqmd" +CORSIKA_VERSION = "corsika-77550" +CORSIKA_EXECUTABLE = "corsika77550Linux_SIBYLL_urqmd" def test_corsika_runner_cleanup(