CosmiQ / solaris

CosmiQ Works Geospatial Machine Learning Analysis Toolkit
https://solaris.readthedocs.io
Apache License 2.0
411 stars 112 forks source link

[MAINT] make lint and github action lint return different results #455

Closed rbavery closed 2 years ago

rbavery commented 2 years ago

Maintenance request summary

contributors will use make lint and make lint-ci to check that their code is properly linted. but the results of this differ from the tox lint checking that is done in the github testing action.

local linting for this PR

# rave at rave-desktop in ~/solaris on git:bug/tile ● [16:26:58]
β†’ make lint-ci
Linting...
.venv/bin/black solaris --check
All done! ✨ 🍰 ✨
35 files would be left unchanged.
.venv/bin/isort solaris --check

# rave at rave-desktop in ~/solaris on git:bug/tile ● [16:27:14]
β†’ make lint   
Linting...
.venv/bin/black solaris
All done! ✨ 🍰 ✨
35 files left unchanged.
.venv/bin/isort solaris
.venv/bin/flake8 solaris
0

gh action linting with errors

format run-test: commands[1] | black . --check
Skipping .ipynb files as Jupyter dependencies are not installed.
You can fix this by running ``pip install black[jupyter]``
would reformat solaris/preproc/sar.py

Oh no! πŸ’₯ πŸ’” πŸ’₯
1 file would be reformatted, 60 files would be left unchanged.
ERROR: InvocationError for command /__w/solaris/solaris/.tox/format/bin/black . --check (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   format: commands failed
Error: Process completed with exit code 1.

Task detail and notes

I think we need to align the environments where make lint is run so that it uses the same environment as the gh action

rbavery commented 2 years ago

@srmsoumya I've pinned the black, flake8, and isort reqs here which seems to have solved this, closing