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

Paths are not translated properly from python package names #198

Closed
llucax opened this issue Dec 18, 2023 · 1 comment · Fixed by #199
Closed

Paths are not translated properly from python package names #198

llucax opened this issue Dec 18, 2023 · 1 comment · Fixed by #199
Assignees
Labels
part:cookiecutter Affects the generation of projects using cookiecutter type:bug Something isn't working
Milestone

Comments

@llucax
Copy link
Contributor

llucax commented Dec 18, 2023

What happened?

When creating a new library project with name client-base, I changed the python_package variable from the default frequenz.client_common to frequenz.client.common, but files were still created as src/frequenz/client_common.

What did you expect instead?

I expected the directories to look like src/frequenz/client/common and all top-level files to be placed in there.

Affected version(s)

No response

Affected part(s)

Cookiecutter template (part:cookiecutter)

Extra information

FYI @shsms, please confirm if this is the issue you observed.

@llucax llucax added type:bug Something isn't working part:cookiecutter Affects the generation of projects using cookiecutter labels Dec 18, 2023
@llucax llucax added this to the v0.8.0 milestone Dec 18, 2023
@llucax llucax self-assigned this Dec 18, 2023
@shsms
Copy link
Contributor

shsms commented Dec 18, 2023

Yup, that was it, although I typed the module name as client.common, in cookiecutter.

github-merge-queue bot pushed a commit that referenced this issue Dec 19, 2023
When the `package_name` is changed from the default, we need to make
sure we adapt the paths in the generated project to match the new
package name, otherwise those packages will not be found.

With this general approach, we can also remove the special case for
`lib` projects, as it is now handled by the general case.

Fix #198.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:cookiecutter Affects the generation of projects using cookiecutter type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants