add .pre-commit-config.yaml#2026
Conversation
|
Why did you remove it from the global .toml, wouldn't it be better to have it there? If black and isort from pre-commit don't recognize it (they should) you can explictly say That way one can use black on isort with your ide and make sure that it is using the same options. (I guess we want to also check -but not autocommit the fixes- as part of the checks) |
Because pre-commit cannot use the pyproject.toml file pre-commit/pre-commit#1165
I thought there was no such option for isort and didn't really see the benefit. But I guess if you want to run it from the ide that's indeed not possible this way. I was wrong though, and isort does have an option
I'm not so sure, there may be cases in which we don't want to do exactly what black or isort wants. Or maybe not. Either way, let's see, if people adopt pre-commit problems about forgetting to run black should become rare. |
|
I don't know about pre-commit, but the tools you run inside certainly can (this is used in pineko or pinefarm) |
|
Not for black and isort |
|
Not sure what the problem is, but at least black doesn't seem to recognise the settings from pyproject.toml. I also still need to update the mentions of black and isort in the docs, but for now I've wrestled enough with this. |
aec9ddf to
8fde036
Compare
scarlehoff
left a comment
There was a problem hiding this comment.
thanks!
Since you are at it, it might be a good idea to remove the link to the old vp guide from https://github.com/NNPDF/nnpdf/tree/master/doc#currently-documented
(I think we already moved part of the stuff to the standard docs)
c5fe6a7 to
feeeabd
Compare
I did not keep
known_first_party. I tested it onmodel_trainer.pyand it put thenumpyimport inside then3fitimports while separatingfrom n3fit import model_gen(not sure what's going on there). I also realised that we missed e.g.ekobox.isortseems to recognise thatnnpdf_data,validphysandn3fitare part of this repo so I think that's good enough (let's keep an eye on it though).I'm not if favour of a CI test