jonescompneurolab / hnn-core

Simulation and optimization of neural circuits for MEG/EEG source estimates
https://jonescompneurolab.github.io/hnn-core/
BSD 3-Clause "New" or "Revised" License
51 stars 50 forks source link

Add Virtual Environment Directories to `.gitignore` #738

Closed samadpls closed 3 months ago

samadpls commented 3 months ago

I'd like to propose adding the following lines to .gitignore file to prevent virtual environment directories from being tracked by Git:

# Virtual environments
env/
venv/
ENV/

Explanation:

Benefits:

jasmainak commented 3 months ago

@samadpls please feel free to make a pull request !

rythorpe commented 3 months ago

I'm not opposed to the suggestion here; however, I do feel like the underlying issue here is very user-specific. Personally, I wouldn't keep a virtual environment directory for a project within the source code of the project itself. There are a myriad of tools that developers and/or advanced users might opt to include within the source code of a project, but it is up to them to do so sparingly and to handle local gitignore rules on their personal machines.

gtdang commented 3 months ago

I agree with @rythorpe. Seems to be user specific. I do keep my virtual environments within project directories but I don't follow the venv naming convention because I have different environment builds to test out different python or dependency versions. Perhaps linking to how to update your .git/info/exclude would be a good addition to the contributors guide?

jasmainak commented 3 months ago

.gitignore tends to include a broad set of files ... I checked a few repos : mne and cookiecutter project for e.g., and they have a long .gitignore

I'm not against adding guidelines for better use of git but it adds an extra set up step for new contributors ...

gtdang commented 3 months ago

Yeah I suppose it's minor overhead and with very little risk, and is convenient for those who do use venv. Is there a recommended environment manager for this project?

rythorpe commented 3 months ago

That's fair @jasmainak and @gtdang. Let's move forward with with addressing this as @samadpls suggested.

Re: recommended environment manager, I think most of us use conda environments, but IDK if it truly matters.