Update Contributing docs and add tox as test optional-dependency #4209
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DISCLAIMER
Long time ansible-lint user, first time contributor, and also first time working
directly with a Python project. I'm trying to do things "right" but might have
missed the mark. Feedback welcome so I can get better!
Description
Problem: The contributing docs are a little lacking on how to get up and go and,
while they encourage running tox tests, tox is not included as a test dependency.
Solution: This PR
venv
paths to .gitignoretox list
tox run -e hook
Testing
tox
installed withpip install -e .[test]
BEFORE:
AFTER:
git ignores
.venv
BEFORE:
AFTER:
tox list
no longer has a danglingand
BEFORE:
AFTER:
Add
--initial-branch=main
to test-hooks.sh to get rid of big warning.BEFORE:
AFTER:
tox run -e lint,pkg,docs,py
Outstanding questions / TODOs
If someone has the answers for these, I'm willing to update this PR to include it.
location and I will do the needful.
tox run -e schemas
.I see the workflows are using setup-node and a cache-dependency-path but I didn't see a quick
way to utilize this in a fresh local install. Thoughts?