Skip to content

Naming conventions #46

@justinlaughlin

Description

@justinlaughlin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions