Closed tztsai closed 1 year ago
haha I hadn't looked at that part of the log... >_<
out of curiosity @TZTsai if you know about pytest, can I just send it pytest src/gz21_ocean_momentum
and it'll figure out all the *.py
s to check? (It works on my machine, but I wonder if there's any difference in behaviour)
I think for pytest, it only checks all Python files (recursively) with a name starting with "test_"? Besides, isn't there a tests/ folder in the root directory which also should be run by pytest? So I think just pytest .
(the current command) would work. Or did you actually mean pylint? I just tried running pylint src/gz21_ocean_momentum
but it ignored the python files in folders like "data", "models", "train", etc. because they do not contain a "__init__.py" file.
Update: I just found pylint src/gz21_ocean_momentum/*
will also work correctly.
oops, meant pylint & said pytest. Thanks for this!
oops, meant pylint & said pytest. Thanks for this!
Thanks!
There is an error in the current CI workflow:
I updated the command from
pylint .
(which somehow makes pylint look for a__init__.py
file in the root directory) topylint $(find -type f -name *.py)
, so that it can check all python files in the repository.Related issue: #16