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

use project_slug for project.name? #54

Open
sneakers-the-rat opened this issue Oct 30, 2024 · 3 comments
Open

use project_slug for project.name? #54

sneakers-the-rat opened this issue Oct 30, 2024 · 3 comments

Comments

@sneakers-the-rat
Copy link
Contributor

sneakers-the-rat commented Oct 30, 2024

I tend to name my projects with hyphens and the packages with underscores, like

[project]
name = 'my-package'
src
|- my_package
  |- __init__.py

I don't think we should add another option, but it was surprising to me that the name entry in the pyproject.toml file also used the underscore name. what do we think about using the project_slug in that spot (which replaces whitespace with hyphens) instead? not sure if that confuses the semantics of the config options too much, and we would want to put that in the help string.

not a huge deal, and i could of course have continued through the prompts to enter it myself, but i really like the shortcut mode y'all have set up, and something where i can just enter "{project_name} is any old string" and it cascades down into "{something}-is-at-least-hyphenated" -> "{package_name}_is_a_valid_python_name" would b lovely

@blink1073
Copy link
Contributor

I have a small bias toward being consistent between the two to reduce potential confusion for beginners.

@Midnighter
Copy link
Contributor

I normally do it the same as you @sneakers-the-rat, but something gave me the impression that pyOS prefers underscores. I can't recall what gave me that impression, though.

@sneakers-the-rat
Copy link
Contributor Author

I have a small bias toward being consistent between the two to reduce potential confusion for beginners.

This is totally valid.

Maybe we punt on this until the parameters settle down a bit and then we can make a more hierarchical parameter journey - "do you want to set pedantic and obsessive (complimentary) name settings (y/N)"

pyOS prefers underscores

i only started appreciating hyphens in names once i started playing in javascript world, so makes sense to me as a python language vibe. ah the linguistic ecology of ... non-whitespace whitespace symbols

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

3 participants