-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Rename src
directory to project_name
#140
Comments
As someone who recently discovered this template: I had the same initial thought, but I think (and someone please correct me if I am wrong) that one should view the
As you suggest, this is probably a matter of personal preference. For instance, I would usually call such a folder |
(1) Agreed that |
@TobiasSkovgaardJepsen Thanks for replying! I agree that considering the @pjbull I'd be happy to create a PR at some point, given that I'll probably need to get up to speed on |
Renaming this issue to represent (1) above so that we can be in line with Python best practices, which in turn should help with any confusion about where packages are installed from as has been brought up in #124 |
src
directory to project_name
I've been running with a variant of this idea for a couple of months. I added a In practice, I tend to use I'll put together a diff for this |
On the
that |
I've made these changes (both adding |
I was about to open a new issue for this and then found this. So I'm adding my thoughts here. I think this thread is moving in the right direction. I do think that the cookiecutter should be using First, every python package on the planet uses its own name and not My guess is that the original intent of this project was to act as a good template for just playing around. However, at some point you might want to build an actual package out of it. All the architecture is already there, it's just currently breaking convention. Keep up the great work. |
Changing the package name away from What can be considered for the directory structure though would not be a simple rename of the
Then we keep the nice high level directory description of the underlying files and still a descriptive name for the module. |
Sorry, but that really does not sound like a strong argument in any sense? Similarly, the first question people would ask in the structure that you proposed is "Why is there a subfolder in src with the same name as the parent of src?" |
Closing—implemented for V2. |
First off, thanks for the wonderful template! I think this should work very well for my future projects. However, I could appreciate your thoughts on some aspects of the template:
Filenames like
make_features.py
andmake_dataset.py
in thesrc
package suggest that those are scripts, not modules. Wouldn't it be better separation to let the reusable code live in modules insidesrc
package while the scripts reside in ascripts
directory in project root? This way both the scripts and the notebooks could use the modules inside thesrc
package. Could you please elaborate the rationale behind the current template layout, which seems to have just scripts in thesrc
package?If I make my own project-specific packages, do they go under
src
? If I have a custom package that models, say, the dataset structure, does it make more sense to put it undersrc/data
instead?One minor nitpick: the name
src
could have been renamed to the project name itself. It would be clearer, I think, and also integrate well with a popular project structure suggested here, although I do understand that it may be a matter of personal preference.The text was updated successfully, but these errors were encountered: