Billingegroup / cookiecutter

A cookie-cutter for DiffPy packages.
Other
0 stars 7 forks source link

Fix header on debug.py and add conftest.py #55

Closed cadenmyers13 closed 3 weeks ago

cadenmyers13 commented 3 weeks ago

closes #26 and closes #27

Screen Shot 2024-06-20 at 3 53 05 PM
cadenmyers13 commented 3 weeks ago
Screen Shot 2024-06-20 at 4 01 27 PM

both debug.py and conftest.py were copied over. Only debug.py had differences with the original.

sbillinge commented 3 weeks ago

ugh, it is so much work getting pre-commit to pass on the jinja templates. @Sparks29032 shall we just ignore all .py? Or do we have a more clever way to get around this?

Sparks29032 commented 3 weeks ago

It seems like black does not support these cookiecutter formats (and does not plan to in the future, this was brought up like two years ago). We can't even skip them using # fmt: off and # fmt: on as that will affect the built files. Not sure what to do except we manually review every pre-commit check to see if there is anything besides the syntax errors.

Sparks29032 commented 3 weeks ago

Otherwise, I am stumped. I feel like we may not even need pre-commit on these files in cookiecutter. Maybe the better option is to run all the features in pre-commit on the new diffpy.utils that is generated since testing that that file is formatted correctly means our cookiecutter is also formatted correctly.

sbillinge commented 3 weeks ago

Otherwise, I am stumped. I feel like we may not even need pre-commit on these files in cookiecutter. Maybe the better option is to run all the features in pre-commit on the new diffpy.utils that is generated since testing that that file is formatted correctly means our cookiecutter is also formatted correctly.

yes, that. Let;s just turn off black on .py in cookiecutter (but not in resulting packages)

Sparks29032 commented 3 weeks ago

This looks mergable (despite the .py issue that is now fixed)