-
Notifications
You must be signed in to change notification settings - Fork 90
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
Improve default .gitignore defaults for common IDEs #111
Comments
This is an interesting idea. Its not one I think I'm sold on yet. As you identify, there are several cases where ignoring all the files of this type can be harmful. Leaving these present does add a small amount of annoyance to the end-user (it does annoy me), but my personal stance for the Cookiecutter is this really is a flavor choice based on IDE, not so much about the cookiecutter or Python Dev more generally, where I would be more inclined to add these to a
My intuition agrees with this, but I still feel this is more a user-choice than something we should try to enforce. Some people may want to have these files present, and at least PyCharm (the one I use) asks about it first. However, I don't want to automatically mask things that the IDEs may want people to include, or mask features that are 100% based on per-user software choice. I'm open to the idea and happy to have a debate on this topic though. I'd also love to get feedback from other people on this topic. |
Those are each good reasons to leave it as-is. We agree that it is annoying but I certainly grant that it does not squarely fit into the scope of the cookiecutter. Let's see what others think |
I would be in favor of adding as many default IDE directories to gitignore as possible. One of the big strengths of the cookiecutter is that it just “does the right thing” for new developers and makes a minimal, clean package. I wasn’t aware that people ever intended to record their IDE settings on GitHub at all. Generally when I see IDE directories in a repository, I assume that it is unintentional. |
I lean a bit more toward teaching people how to cat ~/.git/gitignore_global
tmp*
.vscode
*.swp
# Psi
timer.dat
scratch/
# Random Python
Untitled*.ipynb
.DS_Store # What is this? Keeps popping up. |
To kick this off again, we can do both 1) teach people to use |
To add a bit to this discussion. I am in a similar thought process to @dgasmith . It makes sense to add to the local project |
I agree with @j-wags 💯 and with @mattwthompson's original post.
I think we should add as many IDEs as possible to the gitignore. If someone wants their settings transferred and wants to include them, they probably know enough to know how to edit the gitignore. I agree that it looks unintentional to me when they are included in a repo. It's also great to teach people about a global gitignore, but I don't see that as a job of or part of the cookiecutter. It isn't that cumbersome to have a few extra lines in the gitignore to ignore common IDEs and it will make pushed projects much cleaner for newbies. |
The directories ignored for the MolSSI repo don't need to be coupled to those automatically ignored for generated projects. I'm not sure if the current conversation is considering them as uncoupled questions, but I don't think this issue should block additions to the base I'm not sure if there is any "danger" in adding anything to gitignore. One can always manually add a file to git and, once tracked, it is no longer ignored. |
I also think we should add as many IDEs as possible to make things JustWork ™️
So I don't think it will be too harmful to include. |
Some IDEs store settings in folders that are not automatically
.gitignore
'd here. The three IDEs I know of that computational chemistry-ish developers use areVS Code -
.vscode/
, handled in add .vscode/ to .gitignore #110PyCharm -
.idea/
Spyder - I don't use this and cannot speak to if it does something similar
Googling around indicates that ignoring the entirety of these folders can be dangerous (https://stackoverflow.com/a/24530928, https://stackoverflow.com/q/32964920), but I would argue that this is appropriate for a blanket default. Any project that wishes to track important settings in one of these folders can update their
.gitignore
. My impression is that organizations/projects using common IDE setting is quite uncommon, at least in this community.Repeating #110 for PyCharm (or just taking it on to that PR) is a small change, just wanted to see if there's something I'm neglecting.
The text was updated successfully, but these errors were encountered: