feat(csv): add CSV validation to CI and pre-commit#389
Conversation
|
Pre-commit has several dependencies as written in the lock file: That's why there are numerous differences (I have nearly the same in https://github.com/Boavizta/boaviztapi/pull/387/files#diff-f53a023eedfa3fbf2925ec7dc76eecdc954ea94b7e47065393dbad519613dc89) in the file. |
c18da14 to
3b009fd
Compare
3b009fd to
a7badd5
Compare
a7badd5 to
37dabd4
Compare
|
In addition to rebasing to
|
jonperron
left a comment
There was a problem hiding this comment.
I am not a huge fan of symlink in repositories, but if you are confident that it would work on any dev environment (in particular Windows), then I'm fine with it.
I also added a nitpick comment.
| poetry install --with dev | ||
|
|
||
| check-csv: | ||
| poetry run python3 validate_csv.py |
There was a problem hiding this comment.
I'm not familiar with poetry run, does it use the python3 from the venv ? If not and it relies on the python3 of the system, then I would rather set up a variable at the top of the file (such as PYTHON=venv/bin/python3 or whatever), so it does not complain because the chckcsv library is not installed.
There was a problem hiding this comment.
Yes, poetry run uses the Python from its own virtual environment, so we can guarantee that chckcsv is installed.
In my local checkout of this repo:
$ poetry run which python
/home/sshillaker/.cache/pypoetry/virtualenvs/boaviztapi-WPfJjdvf-py3.13/bin/python
$ which python
/home/sshillaker/.pyenv/shims/python
|
You should also add the newly created .fmt files in dockerignore, so we don't take unecessary files in the image. |
|
Thanks for the comments @jonperron. I made the following changes:
|
Following discussions on #385 :
After discussing on this issue with @jonperron decided to give checkcsv a try, looks interesting and we could use same validating "format" file for CI and pre-commit
pre-commit installprior testing SEE b4ab1a1checkcsvSEE 511e099I'm not and expert on poetry and dependency management with python, but it looks like there is a lots of modifications (downgrade??) on the poetry.lock, might be an issue.
Fixes #385