truera / trulens

Evaluation and Tracking for LLM Experiments
https://www.trulens.org/
MIT License
2.08k stars 181 forks source link

Formatter pre-commit hook #1277

Closed sfc-gh-jreini closed 2 months ago

sfc-gh-jreini commented 3 months ago

Description

Adding a precommit hook for formatting.

Other details good to know for developers

To add the change to your local development environment, run from root:

sh setup-hooks.sh

Type of change

sfc-gh-jreini commented 3 months ago

I only just read about the pre-commit stuff, but is there a reason you don't just change the .git/hooks/pre-commit file directly?

My understanding is that the .git folder isn't versioned. Also this way devs can choose to use or not this hook

sfc-gh-chu commented 2 months ago

I only just read about the pre-commit stuff, but is there a reason you don't just change the .git/hooks/pre-commit file directly?

My understanding is that the .git folder isn't versioned. Also this way devs can choose to use or not this hook

Have we taken a look at precommit? yapf and isort are both supported as a config there

sfc-gh-jreini commented 2 months ago

I only just read about the pre-commit stuff, but is there a reason you don't just change the .git/hooks/pre-commit file directly?

My understanding is that the .git folder isn't versioned. Also this way devs can choose to use or not this hook

Have we taken a look at precommit? yapf and isort are both supported as a config there

I only just read about the pre-commit stuff, but is there a reason you don't just change the .git/hooks/pre-commit file directly?

My understanding is that the .git folder isn't versioned. Also this way devs can choose to use or not this hook

Have we taken a look at precommit? yapf and isort are both supported as a config there

Would that be easier? Since our format.sh is nonstandard, wouldn't we have to configure that anyway with precommit?

sfc-gh-jreini commented 2 months ago

Closing, will by done by #1303