-
Notifications
You must be signed in to change notification settings - Fork 37
Description
I am doing some post-release tests.
I have upgraded 1,00,00 to 1,00,01 in init.py. This fails.
There are several issues:
-
- the error from bin/mg5aMC is very unfriendly, it is difficult to understand what goes on
-
- the actual problem is that the import of the plugin fails because of the 1,00,01 format
Now, one could say that I should not have used 1,00,00 to start with, true. But I liked having more digits, and this worked ok. I will try to fix it.
(1) More details on point 1.
This is not user friendly
[avalassi@itscrd90 gcc11/usr] /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo> PYTHONPATH=../MG5aMC_PLUGIN ./bin/mg5_aMC -m CUDACPP_OUTPUT
Running MG5 in debug mode
ERROR: CUDACPP_OUTPUT is not present in the PLUGIN directory. Please install it first
Is it possible to expose the error message from import, at least in some cases?
This would be a small patch in bin/mg5amc
(2) More details on point 2
The real issue is here
[avalassi@itscrd90 gcc11/usr] /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo> PYTHONPATH=../MG5aMC_PLUGIN/ python3
Python 3.9.18 (main, Jan 24 2024, 00:00:00)
[GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> __import__('CUDACPP_OUTPUT')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/MG5aMC_PLUGIN/CUDACPP_OUTPUT/__init__.py", line 69
__version__ = (1,00,01) # NB the release infrastructure expects 1-digit major and 2-digit minor and patch versions (n,nn,nn)
^
SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers
I guess that there is no way out here. That statement in __init__py is not good python
__version__ = (1,00,01)
The only way is to change this into
__version__ = (1,0,1)
and the delegate to the release scripts the fact that this should be called 1.00.01 and not 1.0.1.
So this second issue is a fix in gitTag.sh probably (no need to touch the archiver.sh/py/yml)