Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple way to mimic GH Actions checks #352

Open
7 tasks
kerryhatcher opened this issue Apr 7, 2021 · 1 comment
Open
7 tasks

Simple way to mimic GH Actions checks #352

kerryhatcher opened this issue Apr 7, 2021 · 1 comment

Comments

@kerryhatcher
Copy link
Contributor

As a total NOOB contributor I would like a way to easily run all the tests and checks from one command in the root of the project so that I don't have to wait for the automated process to tell me I've forgotten something and have to rerun it.

Suggested fix: A main Makefile similar to the one in ./docs that invokes all the things.

Some of those things are:

  • black --check . with a fix option
  • make -C ./docs spellcheck
  • make -C ./docs linkcheck
  • make -C ./docs html
  • coverage run -m pytest
  • coverage report -m
  • Check codecov somehow

Here is what threw together after my last "black" failure: https://gist.github.com/kerryhatcher/dba1959f2ea349268f308043895674d3. In that Gist I'm using pydocstyle as a way to quickly error out on docstring issues without having to wait around on sphinx-build. The output of pydocstyle is also cleaner since it only tests changes since last commit. That would have to be added in to the requirements.txt if that is to be adopted. More info on that here: https://github.com/PyCQA/pydocstyle/

Since I already have something I'd be happy to work on a PR but I thought we could flesh out the idea here a bit before jumping right into the code.

@singingwolfboy
Copy link
Owner

To be honest, I don't think I've ever written a Makefile in my life -- the one in the docs directory was auto-generated when I set up Sphinx, and I've never touched it. That being said, I like this idea!

My only concern is that the GitHub Actions workflows and the make workflows might diverge at some point in the future, creating more confusion. We could try to make GHA use make, which would prevent that, but might also make the GHA configs more complicated.

Frankly, I'm not too concerned; if things diverge in the future, then we can just re-align them. Maybe everything will be fine, and things will never diverge! At any rate, I think this is a good idea, and I would be happy to accept a pull request for a Makefile like the one you put in your gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants