NLeSC / python-template

Netherlands eScience Center Python Template
https://research-software-directory.org/software/nlesc-python-template
Apache License 2.0
180 stars 76 forks source link

package_name used different ways should set/validated differently #621

Open sverhoeven opened 3 weeks ago

sverhoeven commented 3 weeks ago

Checklist before submitting an issue

When #211 was fixed there was package_name and directory_name questions.

Issue details

The package_name question value is used in multiple places:

  1. name on pypi, in template/pyproject.toml:project.name
  2. name when importing, in template/src/{{package_name}}

The name on pypi and import could be different for an existing package or a template user might want to have them different.

See https://blogs.gentoo.org/mgorny/2023/02/09/the-inconsistencies-around-python-package-naming-and-the-new-policy/ for a comparison what naming styles there are.

Could there be a warning when given package name does not follow PEP8? Could package_name be split into package_name and directory_name? Maybe have the second question have default of the first answer.

fdiblen commented 3 weeks ago

thank you, @sverhoeven. We will not merge #613 as it requires more work than expected.

sverhoeven commented 3 weeks ago

Refs #613