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

Update Contributing docs and add tox as test optional-dependency #4209

Merged
merged 6 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .config/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ beautifulsoup4==4.12.3
black==24.4.2
boolean-py==4.0
bracex==2.4
cachetools==5.3.3
cairocffi==1.7.0
cairosvg==2.7.1
certifi==2024.6.2
cffi==1.16.0
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
Expand All @@ -27,6 +29,7 @@ csscompressor==0.9.5
cssselect2==0.7.0
defusedxml==0.7.1
dill==0.3.8
distlib==0.3.8
dnspython==2.6.1
exceptiongroup==1.2.1
execnet==2.1.1
Expand Down Expand Up @@ -82,6 +85,7 @@ pycparser==2.22
pygments==2.18.0
pylint==3.2.2
pymdown-extensions==10.8.1
pyproject-api==1.6.1
pytest==8.2.1
pytest-mock==3.14.0
pytest-plus==0.7.0
Expand All @@ -104,10 +108,12 @@ text-unidecode==1.3
tinycss2==1.3.0
tomli==2.0.1
tomlkit==0.12.5
tox==4.15.0
types-jsonschema==4.22.0.20240501
types-pyyaml==6.0.12.20240311
typing-extensions==4.12.1
urllib3==2.2.1
virtualenv==20.26.2
watchdog==4.0.1
webencodings==0.5.1
yamllint==1.35.1
Expand Down
1 change: 1 addition & 0 deletions .config/requirements-test.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ pytest-plus >= 0.6 # for PYTEST_REQPASS
pytest-xdist >= 2.1.0
ruamel.yaml>=0.17.31
ruamel-yaml-clib # needed for mypy
tox >= 4.0.0
types-jsonschema # IDE support
types-pyyaml # IDE support
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ __pycache__

# Packages
.Python
env/
build/
develop-eggs/
dist/
Expand All @@ -20,7 +19,6 @@ parts/
pip-wheel-metadata
sdist/
var/
venv/
*.egg-info/
.installed.cfg
*.egg
Expand All @@ -37,6 +35,12 @@ pip-log.txt
# pyenv
.python-version

# Environments
.env
.venv
env/
venv/

# Coverage artifacts
.coverage*
coverage*.xml
Expand Down
7 changes: 5 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ After [creating your fork on GitHub], you can do:
```shell-session
$ git clone --recursive git@github.com:your-name/ansible-lint
$ cd ansible-lint
$ # Recommended: Initialize and activate a Python virtual environment
$ pip install --upgrade pip
$ pip install -e .[test] # Install testing dependencies
$ tox run -e lint,pkg,docs,py # Ensure subset of tox tests work in clean checkout
$ git checkout -b your-branch-name
# DO SOME CODING HERE
$ tox run -e lint,pkg,docs,py # Ensure subset of tox tests work with your changes
$ git add your new files
$ git commit -v
$ git push origin your-branch-name
Expand All @@ -31,8 +36,6 @@ released.
Automated tests will be run against all PRs, to run checks locally before
pushing commits, just use [tox](https://tox.wiki/en/latest/).

% DO-NOT-REMOVE-deps-snippet-PLACEHOLDER

## Talk to us

Use Github [discussions] forum or for a live chat experience try
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/schemas/__store__.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ansible-lint-config": {
"etag": "616457d973f4b221d85910086ce1fab520d8a363b1e1e62a62e4d8b57a824976",
"etag": "a0bb8004fad70bab34fad94a45b2698125127142ec6b2c8900976aa2bd96a86c",
"url": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible-lint-config.json"
},
"ansible-navigator-config": {
Expand Down
2 changes: 1 addition & 1 deletion tools/test-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set -euo pipefail
rm -rf .tox/x
mkdir -p .tox/x
cd .tox/x
git init
git init --initial-branch=main
# we add a file to the repo to avoid error due to no file to to lint
touch foo.yml
git add foo.yml
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ requires =

[testenv]
description =
Run the tests under {basepython} and
devel: ansible devel branch
pre: Enables --pre when installing dependencies, testing prereleases
Run the tests under {basepython}
devel: and ansible devel branch
pre: and enable --pre when installing dependencies, testing prereleases
deps =
devel: ansible-core @ git+https://github.com/ansible/ansible.git # GPLv3+
devel: ansible-compat @ git+https://github.com/ansible/ansible-compat.git # GPLv3+
Expand Down Expand Up @@ -172,7 +172,7 @@ description = Rebuild and test JSON Schemas
deps =
check-jsonschema>=0.26.3
setenv =
# without his upgrade would likely not do anything
# without this upgrade would likely not do anything
PIP_CONSTRAINT = /dev/null
skip_install = true
changedir = test/schemas
Expand Down
Loading