devpi / devpi-constrained

releases filter for devpi-server
MIT License
8 stars 2 forks source link

Set repository policies #4

Closed EvaSDK closed 1 year ago

EvaSDK commented 1 year ago

Add pre-commit configuration to share expected coding style policies. Everything is open for discussion, I just added what seemed to make sense from the configuration I use in internal projects. Regarding setup-cfg-fmt specifically, I found out it had an issue in handling multiple files in file: directive. I filed https://github.com/asottile/setup-cfg-fmt/issues/187. Let me know if this is a blocker for you or not.

fschulze commented 1 year ago

Thanks for the effort, but I really dislike pre-commit hooks and black is not to my taste. I know this is very subjective, but I will not add this to projects I'm maintaining. I'm sorry for the time you have spent on this, but hope you understand.

EvaSDK commented 1 year ago

Sure there's no problem, I develop in a somewhat hostile environment so I need this kind of tool to ensure basics are met before someone submits a PR. Do the changes on setup.cfg look any worth salvaging or should I discard that as well?

fschulze commented 1 year ago

I only noticed after your comment that there are some added, not only reordered. Where those reported by check-manifest, or which tool made you notice? I think those without the reordering of the unchanged ones are helpful.

EvaSDK commented 1 year ago

The tool doing this is setup-cfg-fmt. I think it needs to be updated once in a while with pre-commit autoupdate to pick up new Python releases, otherwise it can manages the range of supported versions as passed through the pre-commit configuration file. check-manifest is for checking the consistency between files in repository and in sdist.

fschulze commented 1 year ago

I thought setup-cfg-fmt would report the missing settings, but since it doesn't, I only cherry picked the commit where you added them.