Literature list fails to get version of AMUSE
Describe the bug At the end of running a code, the literature list will report: "AMUSE (unknown version)" in stead of showing the version in use (2025.9.0)
To Reproduce Install AMUSE 2025.9.0 and run any code (eg an example). At the end the output reads:
In this session you have used the AMUSE modules below. Please cite any relevant articles:
"AMUSE (unknown version)"
DOI:10.5281/zenodo.1435860
ADS:2018araa.book.....P (Portegies Zwart, S. & McMillan, S.L.W., 2018)
ADS:2013CoPhC.183..456P ** (Portegies Zwart, S. et al., 2013)
ADS:2013A&A...557A..84P ** (Pelupessy, F. I. et al., 2013)
ADS:2009NewA...14..369P (Portegies Zwart, S. et al., 2009)
Expected behavior Same output, but with the actual version number displayed.
Logs If applicable, add logfiles to help explain your problem.
Environment (please complete the following information):
- AMUSE 2025.9.0
- OS and version: Linux, RHEL 9
- Compiler: gcc 13, from anaconda
Additional context src/amuse/support/literature.py contains:
try: from amuse._version import version as amuse_version except ImportError: amuse_version = "unknown version"
which fails, whereas obtaining the version as amuse.version reports correctly. The failure is of course hidden by the "try ... except" construction.
The content of the installed src/amuse/_version.py is: version = "2025.9.0"
So either this is incorrect, or the reference in literature.py needs to be changed to match.
Correction: what ended up as amuse.version should have been amuse.__version__ (to avoid markup)
I may have messed this up when I made the new build system, we're using a different package builder so the version management had to be rewritten. The __version__ name is kind of standard in Python, so I'd like to keep that. Maybe we'll have both to make sure we don't break anything, it won't hurt any.
Thanks for the report, we'll go fix it.