Okay, I just learned about unit testing, GitHub checks with CircleCI and pull requests all in a day. I ran into a question as I was trying to test my understanding of everything:
- I've got a repository locally and it is set to push changes to my repo on GitHub.
- I've got some basic tests written that pass
pytesttest runner locally. - I make some simple change to test everything, commit and push the change.
- I go to GitHub and see that I did not pass my tests defined in my CircleCI YAML file because I don't have flake8 installed in my virtual environment (I accidentally installed it globally).
- I return to PyCharm and install flake8 in my venv.
- I update my
requirements.txtto reflect the install. - ???
Now, my question is this: When a check fails, what is the best practice for 'updating' the pull request after fixing the issue. Do I just make a new commit that fixes it and start a new pull request? Or, do I find a way to revert the old commit to include the new version that works?