lorenzwalthert / precommit

pre-commit hooks for R projects
https://lorenzwalthert.github.io/precommit/
GNU General Public License v3.0
247 stars 48 forks source link

Explore possibility of distributing hooks via conda in addition to script #119

Closed lorenzwalthert closed 3 years ago

lorenzwalthert commented 4 years ago

In addition to language: script, some people may prefer language: conda. Conda is now a supported language in pre-commit. This would allow dependency management and isolation via conda but probably also require a conda env per repo. Would be an overkill for most projects I think. Because I think it's totally fine for an end-user repo to use hooks from different hook repos, even one hook repo can host hooks that feature different languages, i.e. it's already possible to use R and Python hooks along each other.

Also, if we would want to distribute hooks via conda, do we need to provide command line executables for them? R packages cannot easily do this compared to Python. And {precommit} must be available on a conda repository such as conda forge I guess because some hooks depend on it directly (don't know how to bring it there).

@xhochy maybe you can help clarifying this.

lorenzwalthert commented 4 years ago

This blog post contains an introduction and example to conda hooks: https://tech.quantco.com/2020/03/10/conda-in-pre-commit.html

lorenzwalthert commented 3 years ago

We'll use language: r.