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

Allow package name to be different from repository name #154

Open
eirrgang opened this issue Aug 12, 2022 · 1 comment
Open

Allow package name to be different from repository name #154

eirrgang opened this issue Aug 12, 2022 · 1 comment

Comments

@eirrgang
Copy link
Contributor

It is not uncommon for importable packages to have different names than the repositories (or distributions) that hold them, so {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}} should use two distinct variables.

project_name is not a drop-in for either, since it can include spaces and capital letters.

It seems like maybe there should be an additional option declared between repo_name and first_module_name.

Also, it seems a bit odd to default to creating the first module as projectname/projectname.py. Would it be reasonable to change the default to the proposal from the workshop material? (i.e. functions?)

{
    "project_name": "ProjectName",
    "repo_name": "{{ cookiecutter.project_name.lower().replace(' ', '_') }}",
    "package_name": "{{ cookiecutter.repo_name.lower().replace(' ', '_') }}",
    "first_module_name": "functions",
...

Then, the template directory structure can be updated to
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}

@eirrgang
Copy link
Contributor Author

For those with access, see also https://molssiedu.slack.com/archives/C03Q6GCCZ1B/p1659622847027609

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

1 participant