Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unfortunate convention io #1593

Open
chillenzer opened this issue Feb 5, 2024 · 4 comments
Open

Unfortunate convention io #1593

chillenzer opened this issue Feb 5, 2024 · 4 comments

Comments

@chillenzer
Copy link

chillenzer commented Feb 5, 2024

What do you want to achieve, please describe.

In PIConGPU, I've stumbled across the fact that your documentation suggests to use

import openpmd_api as io

which coincidentally is also the name of a standard library module in the Python language.

This is an unfortunate ambiguity. We are in the process of coming up with a different convention for PIConGPU ourselves but if you feel the same about this, we would be inclined to wait for the openPMD community to come up with a less ambiguous convention to adopt. Any thoughts?

@ax3l
Copy link
Member

ax3l commented Feb 6, 2024

Ouch, I thought I was smart when introducing this short-hand :D Yes, colliding with a std module name is not ideal.

Agreed, great idea to come up with a new documented/uniform short-hand. I am not a big fan of pmd as abbreviation, because there is only openPMD. I also do not want people to abbreviate openPMD as PMD, to keep the name recognition clear.

Ideas welcome! :)

import openpmd_api as pmd  # hm

or

import openpmd_api as oio  # lol

or

import openpmd_api as api  # too generic

or

import openpmd_api as opmd  # okish?

or

import openpmd_api as data

or
...?

@ax3l ax3l self-assigned this Feb 6, 2024
@chillenzer
Copy link
Author

The pythonic idiom

Explicit is better than implicit.

could be interpreted as not actually needing a shorthand at all. Given that I'm currently sitting in front of a 4K monitor with an IDE doing autocompletion, I could totally spare the additional 7-8 characters.

That said,

import openpmd_api as opmd  # okish?

was what came to my mind, too.

@chillenzer
Copy link
Author

@ax3l, there's a push in PIConGPU to start implementing this. We'd go with opmd unless there is a consensus here soon.

@franzpoeschel
Copy link
Contributor

I think that opmd is the most obvious solution and you can go forward with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants