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

Package name #1

Open
nstarman opened this issue Jan 20, 2023 · 4 comments
Open

Package name #1

nstarman opened this issue Jan 20, 2023 · 4 comments

Comments

@nstarman
Copy link
Contributor

I'm not sure how to do namespace packages like cosmology.api, cosmology.compat if we also have a regular package cosmology. For now I'm calling this cosmology.core, but it would be nice to drop the core.

@nstarman
Copy link
Contributor Author

Maybe import cosmology.core as cosmology is sufficient.

@ntessore
Copy link

Maybe useful what we have been doing in GLASS: We have a glass package and e.g. glass-camb. There is no distinction between them in terms of installation, so it does not matter whether or not one has the namespace name. Also, namespace packages don't need subfolders, you only must not have an __init__.py at namespace level in any of them.

We hence want to have the cosmology package around because otherwise, someone could make a package with that name that isn't a namespace package. So we can either put cosmology/api.py into this package, or have it completely empty.

@nstarman
Copy link
Contributor Author

There can be differences between the pip name and import name. We can have the pip name be cosmology and the import name be cosmology.core...

@nstarman
Copy link
Contributor Author

nstarman commented Jan 21, 2023

I'll experiment.

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

2 participants