This PR attempts to structure the project with an nsidc namespace. metgen was used rather than granule-metgen to avoid extra typing as well as to avoid one more place where Python would require two different characters depending on context (_ in imports vs - in the distribution package). Note that the name of the project (and package) is/will be nsidc-metgen given the directory structure under src. I used that name in the README, but I don't want to rename this repository at this time because (1) there are a bunch of issues opened against it and I'm not sure Github will carry them along correctly, (2) we may or may not want to go with granule-metgen or stick with metgen or use a completely different name, (3) I don't want to name the repository nsidc-metgen because it seems redundant to have a repository with the Github location nsidc/nsidc-metgen. I wasn't very happy with any of the solutions I tried because something always ended up being inconsistent, mostly due to the difference in characters Python allows in import statements vs. naming conventions for distribution packages.
A few other notes:
I left the __init__.py file in the nsidc directory for now.
I don't think the __name__ == "__main__" check is needed in cli.py given the scripts definition in pyproject.toml, but I left it to be safe.
I'm pretty sure there are five other ways of implementing some sort of namespacing solution!
This PR attempts to structure the project with an
nsidc
namespace.metgen
was used rather thangranule-metgen
to avoid extra typing as well as to avoid one more place where Python would require two different characters depending on context (_
in imports vs-
in the distribution package). Note that the name of the project (and package) is/will bensidc-metgen
given the directory structure undersrc
. I used that name in the README, but I don't want to rename this repository at this time because (1) there are a bunch of issues opened against it and I'm not sure Github will carry them along correctly, (2) we may or may not want to go withgranule-metgen
or stick withmetgen
or use a completely different name, (3) I don't want to name the repositorynsidc-metgen
because it seems redundant to have a repository with the Github locationnsidc/nsidc-metgen
. I wasn't very happy with any of the solutions I tried because something always ended up being inconsistent, mostly due to the difference in characters Python allows in import statements vs. naming conventions for distribution packages.A few other notes:
__init__.py
file in thensidc
directory for now.__name__ == "__main__"
check is needed incli.py
given thescripts
definition inpyproject.toml
, but I left it to be safe.