celeritas-project / celeritas

Celeritas is a new Monte Carlo transport code designed to accelerate scientific discovery in high energy physics by improving detector simulation throughput and energy efficiency using GPUs.
https://celeritas-project.github.io/celeritas/user/index.html
Other
58 stars 32 forks source link

Require JSON #1254

Closed sethrj closed 3 weeks ago

sethrj commented 1 month ago

Follow-on to #1253 : we're using JSON increasingly and will require it for the python front end (https://github.com/celeritas-project/celerpy/) and now have the ability to automatically provide it if it's not on the system. Requiring JSON simplifies a lot of the code, and other packages in the typical HEP pipeline (viz., ROOT) require nlohmann-json.

The only downside I see is the increased chance of causing a conflict in a multi-library toolchain (in which case nljson is hopefully already found, since e.g. ROOT is loaded before the initial decision to use JSON as an external?) or for G4VG where JSON isn't ever used in practice but this would require it.

drbenmorgan commented 3 weeks ago

I think requiring nlohmann-json is fine for the reasons you've outlined. Noted that this is still in Draft and has some CI failures, so will approve once these are fixed.