spacetelescope / style-guides

An opinionated guide on how we work.
Creative Commons Attribution 4.0 International
55 stars 33 forks source link

Python package naming rules need to be corrected #60

Open stsci-hack opened 6 years ago

stsci-hack commented 6 years ago

A new python package was being established for supporting HST pipeline work and, in following the current style guide, this new package was initially set up with the name hla-pipeline. Subsequent use of 'cookiecutter' to initialize the repo, it returned with the following error:

> ERROR: The project slug (hla-pipeline) is not a valid Python module name. Please do not use a - and use _ instead
> ERROR: Stopping generation because pre_gen_project hook script didn't exit successfully
> Hook script failed (exit status: 1)
> 

Therefore, it appears that the guide needs to be updated to reflect the actual Python rules for package names and not allow '-' (hyphens) in the names.

pllim commented 6 years ago

Perhaps related: https://github.com/spacetelescope/style-guides/issues/10#issuecomment-425190598

It is possible in the sense that you can make a package so that it is installed as hla-pipeline but imported as hla_pipeline. https://github.com/spacetelescope/ci_watson is such an example.