picongpu icon indicating copy to clipboard operation
picongpu copied to clipboard

Use other alias for `openpmd_api`

Open chillenzer opened this issue 1 year ago • 9 comments

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.

chillenzer avatar Jan 31 '24 11:01 chillenzer

ping @PrometheusPi @steindev @ikbuibui @BrianMarre @pordyna What is you opinion?

psychocoderHPC avatar Feb 01 '24 10:02 psychocoderHPC

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).

steindev avatar Feb 01 '24 14:02 steindev

Well, I'll open an issue there, too.

chillenzer avatar Feb 01 '24 14:02 chillenzer

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.

pordyna avatar Feb 02 '24 09:02 pordyna

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 avatar Feb 05 '24 12:02 chillenzer

@chillenzer Reminder ;)

I think

import openpmd_api as opmd

works for our purposes.

BrianMarre avatar Apr 16 '24 13:04 BrianMarre

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 ?

chillenzer avatar Apr 23 '24 07:04 chillenzer

What's the status of this change @chillenzer?

PrometheusPi avatar Jul 31 '24 08:07 PrometheusPi

If only, I'd know. =P

It's okay. I'll go ahead and fix it.

chillenzer avatar Jul 31 '24 11:07 chillenzer