data-liberation-project / aphis-inspection-reports

Inspection data and PDFs from the USDA's Animal and Plant Health Inspection Service.
13 stars 3 forks source link

Added linting and mypy tests #15

Closed palewire closed 1 year ago

jsvine commented 1 year ago

I think adding a workflow for linting is great. But to keep a single source of truth on this, how do you feel about using/updating the make lint commend in the repo's Makefile instead of redefining the linters in the GH workflow file? Entirely possible that I'm overlooking some complication / reason to keep separate!

palewire commented 1 year ago

That's generally fine with me, though you'd need to get venv worked out in Actions. I've never done that one. I tend to use pipenv and a Pipfile when I go that route.

jsvine commented 1 year ago

Ah, good point. Those venv/bin calls weren't strictly necessary, rather just a convenience for local development. Now stripped out, change pushed in commit above.

palewire commented 1 year ago

Kay. I see that black and isort are in the make lint command. In this case they wouldn't be committed to the repo, which does make them unnecessary. Unless we want to add an autocommit.

palewire commented 1 year ago

Or does --check validate? That's new to me.

jsvine commented 1 year ago

Or does --check validate? That's new to me.

Yep!

palewire commented 1 year ago

Okay. I put in make lint then.

jsvine commented 1 year ago

Awesome, merging. Ultimately, I'll probably move the mypy command into make lint, but totally fine to keep it in the GH workflow file for now.