Skip to content

Commit 02896a4

Browse files
authored
Update all the things (#196)
1 parent 3cfbdd6 commit 02896a4

File tree

23 files changed

+168
-204
lines changed

23 files changed

+168
-204
lines changed

.github/workflows/main.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
tests:
15+
name: Python ${{ matrix.python-version }}
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
python-version:
21+
- '3.12'
22+
- '3.13'
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
31+
- uses: browser-actions/setup-geckodriver@latest
32+
33+
- name: Install uv
34+
uses: astral-sh/setup-uv@v4
35+
with:
36+
enable-cache: true
37+
cache-dependency-glob: tests/requirements/*.txt
38+
39+
- name: Install dependencies
40+
run: uv pip install --system tox tox-uv
41+
42+
- name: NPM Install
43+
run: npm install
44+
45+
- name: Run tox targets for ${{ matrix.python-version }}
46+
run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .)
47+
48+
lint:
49+
name: Lint
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Set up Python
55+
uses: actions/setup-python@v5
56+
with:
57+
python-version: "3.13"
58+
59+
- name: Install dependencies
60+
run: |
61+
python -m pip install --upgrade pip tox
62+
- name: Run lint
63+
run: tox -e lint

.travis.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11
# Community Participation Guidelines
22

3-
This repository is governed by Mozilla's code of conduct and etiquette guidelines.
4-
For more details, please read the
5-
[Mozilla Community Participation Guidelines](https://www.mozilla.org/about/governance/policies/participation/).
3+
This repository is governed by Django's code of conduct. See https://www.djangoproject.com/conduct/.
64

7-
## How to Report
8-
For more information on how to report violations of the Community Participation Guidelines, please read our '[How to Report](https://www.mozilla.org/about/governance/policies/participation/reporting/)' page.
9-
10-
<!--
11-
## Project Specific Etiquette
12-
13-
In some cases, there will be additional project etiquette i.e.: (https://bugzilla.mozilla.org/page.cgi?id=etiquette.html).
14-
Please update for your project.
15-
-->

MANIFEST.in

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
1-
include LICENSE.txt README.rst axe_selenium_python/node_modules/axe-core/axe.min.js axe_selenium_python/tests/test_page.html
1+
include CODE_OF_CONDUCT.md
2+
include LICENSE.txt
3+
include README.rst
4+
include tox.ini
5+
include axe_selenium_python/node_modules/axe-core/axe.min.js
6+
include tests/test_page.html
7+
include package.json
8+
include package-lock.json
9+
include axe_selenium_python/package-lock.json
10+
include axe_selenium_python/package.json
211
recursive-include *.rst *.txt
12+
recursive-include tests *.js
13+
recursive-include tests *.py
14+
recursive-include tests *.txt

README.rst

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,25 @@ axe-selenium-python
33

44
axe-selenium-python integrates aXe and selenium to enable automated web accessibility testing.
55

6-
**This version of axe-selenium-python is using axe-core@4.0.2.**
6+
**This version of axe-selenium-python is using axe-core@4.10.2.**
77

88
.. image:: https://img.shields.io/badge/license-MPL%202.0-blue.svg
9-
:target: https://github.com/mozilla-services/axe-selenium-python/blob/master/LICENSE.txt
9+
:target: https://github.com/axe-selenium-python/axe-selenium-python/blob/master/LICENSE.txt
1010
:alt: License
1111
.. image:: https://img.shields.io/pypi/v/axe-selenium-python.svg
1212
:target: https://pypi.org/project/axe-selenium-python/
1313
:alt: PyPI
14-
.. image:: https://img.shields.io/travis/mozilla-services/axe-selenium-python.svg
15-
:target: https://travis-ci.org/mozilla-services/axe-selenium-python
16-
:alt: Travis
17-
.. image:: https://img.shields.io/github/issues-raw/mozilla-services/axe-selenium-python.svg
18-
:target: https://github.com/mozilla-services/axe-selenium-python/issues
14+
.. image:: https://img.shields.io/github/issues-raw/axe-selenium-python/axe-selenium-python.svg
15+
:target: https://github.com/axe-selenium-python/axe-selenium-python/issues
1916
:alt: Issues
20-
.. image:: https://api.dependabot.com/badges/status?host=github&repo=mozilla-services/axe-selenium-python
21-
:target: https://dependabot.com
22-
:alt: Dependabot
23-
.. image:: https://coveralls.io/repos/github/mozilla-services/axe-selenium-python/badge.svg?branch=master
24-
:target: https://coveralls.io/github/mozilla-services/axe-selenium-python?branch=master
25-
:alt: Coveralls
26-
27-
2817

2918
Requirements
3019
------------
3120

3221
You will need the following prerequisites in order to use axe-selenium-python:
3322

34-
- selenium >= 3.0.0
35-
- Python 2.7 or 3.6
23+
- selenium >= 4.2
24+
- Python 3.12+
3625
- The appropriate driver for the browser you intend to use, downloaded and added to your path, e.g. geckodriver for Firefox:
3726

3827
- `geckodriver <https://github.com/mozilla/geckodriver/releases>`_ downloaded and `added to your PATH <https://stackoverflow.com/questions/40208051/selenium-using-python-geckodriver-executable-needs-to-be-in-path#answer-40208762>`_
@@ -88,16 +77,15 @@ You can run the tests using
8877
8978
$ tox
9079
91-
Resources
92-
---------
93-
94-
- `Issue Tracker <http://github.com/mozilla-services/axe-selenium-python/issues>`_
95-
- `Code <http://github.com/mozilla-services/axe-selenium-python/>`_
96-
- `pytest-axe <http://github.com/mozilla-services/pytest-axe/>`_
97-
9880
CHANGELOG
9981
^^^^^^^^^^^^^^
10082

83+
version 3.0
84+
***********
85+
86+
- Bumped minimum Python version to 3.12
87+
- Updated axe to ``[email protected]``
88+
10189
version 2.1.5
10290
*************
10391
**Breaks backwards compatibility**:

axe_selenium_python/axe.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44

55
import json
66
import os
7-
from io import open
87

98
_DEFAULT_SCRIPT = os.path.join(
109
os.path.dirname(__file__), "node_modules", "axe-core", "axe.min.js"
1110
)
1211

1312

14-
class Axe(object):
13+
class Axe:
1514
def __init__(self, selenium, script_url=_DEFAULT_SCRIPT):
1615
self.script_url = script_url
1716
self.selenium = selenium
@@ -23,7 +22,7 @@ def inject(self):
2322
:param script_url: location of the axe-core script.
2423
:type script_url: string
2524
"""
26-
with open(self.script_url, "r", encoding="utf8") as f:
25+
with open(self.script_url, encoding="utf8") as f:
2726
self.selenium.execute_script(f.read())
2827

2928
def run(self, context=None, options=None):
@@ -110,6 +109,6 @@ def write_results(self, data, name=None):
110109

111110
with open(filepath, "w", encoding="utf8") as f:
112111
try:
113-
f.write(unicode(json.dumps(data, indent=4)))
112+
f.write(json.dumps(data, indent=4))
114113
except NameError:
115114
f.write(json.dumps(data, indent=4))

axe_selenium_python/package-lock.json

Lines changed: 18 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

axe_selenium_python/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
},
1818
"homepage": "https://github.com/kimberlythegeek/axe-selenium-python#readme",
1919
"dependencies": {
20-
"axe-core": ">=4.0.2"
20+
"axe-core": "^4.10.2"
2121
}
2222
}

axe_selenium_python/tests/conftest.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

axe_selenium_python/tests/requirements/flake8.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)