cosmology-api / cosmology

In-development
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Package name #1

Open nstarman opened 1 year ago

nstarman commented 1 year ago

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 commented 1 year ago

Maybe import cosmology.core as cosmology is sufficient.

ntessore commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

I'll experiment.