Tecnativa / doodba-copier-template

A Copier template for Doodba projects
Boost Software License 1.0
86 stars 114 forks source link

[IMP] Store ruff's cache in ~/.cache/ruff #434

Closed PabloEForgeFlow closed 11 months ago

PabloEForgeFlow commented 11 months ago

https://github.com/Tecnativa/doodba-copier-template/pull/425 replaced most linters with ruff based on https://github.com/OCA/oca-addons-repo-template/commit/49b350fd795e039963e153943a8d0635be6f0fee, but didn't ignore /.ruff_cache.

pedrobaeza commented 11 months ago

Shouldn't be such cache on the personal profile instead of each repo?

PabloEForgeFlow commented 11 months ago

I think so as well, but for some reason the default path is the root of the current project.

pedrobaeza commented 11 months ago

I think we should set RUFF_CACHE_DIR in the pre-commit environment somehow. How is this done in OCA?

PabloEForgeFlow commented 11 months ago

We could do that by adding cache-dir = "~/.cache/ruff" to .ruff.toml. I simply decided to follow what they did as per https://github.com/OCA/oca-addons-repo-template/commit/49b350fd795e039963e153943a8d0635be6f0fee.

pedrobaeza commented 11 months ago

Thanks for the extra info, but I think it's not a good default, because it also means to spread mini-cache dirs around all your drive, and to not be efficient. Please set such configuration here, and propose it also to OCA.

pedrobaeza commented 11 months ago

Please do the same on OCA's template.