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

Naming conventions #46

Open
justinlaughlin opened this issue Jun 25, 2024 · 1 comment
Open

Naming conventions #46

justinlaughlin opened this issue Jun 25, 2024 · 1 comment

Comments

@justinlaughlin
Copy link
Contributor

Currently, our naming is:

  • repo: pyglvis
  • pypi: we have two registered packages, glvis and pyglvis, although glvis is more up-to-date
  • module: glvis
  • main class: glvis

Which means the commands to install are either

git clone [email protected]:GLVis/pyglvis.git
cd pyglvis
pip install .

or

pip install glvis

However, because of the two registered packages on pypi, pip install pyglvis will work, and will give the wrong package.

To use the package the syntax is

from glvis import glvis

glvis(data)

My suggestion would be that we

  • Use pyglvis for the name of the package on pypi, so it matches the repo name. We can transfer over what is currently on glvis to pyglvis, and then delete the glvis pypi registration.
  • Rename the module to pyglvis (I think people often expect the package and module name to match, eg pip install numpy, import numpy)
  • (This is implemented in 1ddd3b5) Change the main class name to some kind of noun - something like Visualizer or GlvisWidget? The intention is to 1) not use the same name for the class as the module, and 2) to use a capitalized class name as people would expect. For backwards compatibility, we could alias a constructor function glvis() that returns a Visualizer or GlvisWidget object.
@justinlaughlin
Copy link
Contributor Author

This is mostly minor except for the pypi registries. That one we really should choose one and delete the other.

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

No branches or pull requests

1 participant