picongpu
picongpu copied to clipboard
Use other alias for `openpmd_api`
I've noticed in #4801 that it seems to be a convention to do
import openpmd_api as io
but I think this is unfortunate because io
is a python standard library module which might mislead people more familiar with the Python ecosystem than with PIConGPUs conventions. If nobody complains in the near future, I'll submit a PR changing this into something less ambiguous.
ping @PrometheusPi @steindev @ikbuibui @BrianMarre @pordyna What is you opinion?
It is sensible to change this. But it is not a PIConGPU-only convention. The root cause of this unfortunate naming is openPMD's documentation. See (https://openpmd-api.readthedocs.io/en/0.15.2/usage/firstwrite.html#python).
Well, I'll open an issue there, too.
I sometimes do import openpmd_api as api
as it used to be earlier in the openpmd
docs. Though, I don't think that this is a good option either. We should probably let the openpmd
devs discuss it first.
As you can see, I've opened the issue over at the openPMD repo. Let's wait for a few days and come back to this, then. Is there a "remind-me-later" button for GH issues?
@chillenzer Reminder ;)
I think
import openpmd_api as opmd
works for our purposes.
Yeah, I think that's the way to go. I'll do a final ping in the corresponding OpenPMD issue and set it on my to-do list for PIConGPU. Any final objections, @ComputationalRadiationPhysics/picongpu-maintainers ?
What's the status of this change @chillenzer?
If only, I'd know. =P
It's okay. I'll go ahead and fix it.