vscode-wpilib icon indicating copy to clipboard operation
vscode-wpilib copied to clipboard

Add python exclusions to gitignore

Open daltzctr opened this issue 1 year ago • 7 comments

daltzctr avatar Oct 22 '24 21:10 daltzctr

There are too many raw file blocks in here. Do all of these file types get put in the root?

ThadHouse avatar Oct 22 '24 21:10 ThadHouse

It's mostly pulled from the github python template gitignore. The only ones I've noticed locally are __pycache__ and venv

daltzctr avatar Oct 22 '24 21:10 daltzctr

Yeah we'd want to limit this to folders. Raw blocking file types is incorrect, because other projects might need those.

ThadHouse avatar Oct 22 '24 21:10 ThadHouse

@ThadHouse I've minimized to just what I think is necessary for Python

daltzctr avatar Oct 22 '24 22:10 daltzctr

Under what conditions would these python files end up in a gradle wpi project?

sciencewhiz avatar Oct 23 '24 03:10 sciencewhiz

It doesn't currently but all robotpy init does is add a robot.py and pyproject.toml, but given #622 I would expect VS Code to create Python projects.

Additionally, robotpy init doesn't have a gitignore either, which requires users to create their own. Using the wpilib project gitignore seems like a good start.

daltzctr avatar Oct 23 '24 13:10 daltzctr

I think that robotpy init making a .gitignore would be better then copying a C++/Java .gitignore. And even if it was implemented in the vs-code extension, I think it would be a different .gitignore, rather then adding onto the C++/Java one.

sciencewhiz avatar Oct 29 '24 12:10 sciencewhiz

robotpy now creates a .gitignore. https://github.com/robotpy/robotpy-installer/pull/128

sciencewhiz avatar May 26 '25 21:05 sciencewhiz