forked from Iota-School/notebooks-for-all
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
11,977 additions
and
558 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# GitHub syntax highlighting | ||
pixi.lock linguist-language=YAML | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: test with pixi | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: ["*"] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
PYTHONUNBUFFERED: "1" | ||
PIP_DISABLE_PIP_VERSION_CHECK: "1" | ||
USE_PIXI_VERSION: 0.22.0 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: prefix-dev/setup-pixi@v0.6.0 | ||
with: | ||
pixi-version: v${{ env.USE_PIXI_VERSION }} | ||
cache: true | ||
environments: build | ||
- run: pixi run -ve build build | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: nbconvert-a11y-${{ github.run_number }}-dist | ||
path: ./dist | ||
|
||
test: | ||
name: (${{ matrix.os }}) test | ||
needs: [build] | ||
runs-on: ${{ matrix.os }}-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu"] | ||
# add matrix for browsers later on | ||
steps: | ||
- run: git config --global core.autocrlf false | ||
- uses: actions/checkout@v4 | ||
- uses: prefix-dev/setup-pixi@v0.6.0 | ||
with: | ||
pixi-version: v${{ env.USE_PIXI_VERSION }} | ||
cache: true | ||
environments: test | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: nbconvert-a11y-${{ github.run_number }}-dist | ||
path: ./dist | ||
# need to make this install from the wheel | ||
- run: pixi run -ve test test | ||
- if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: |- | ||
nbconvert-a11y-${{ github.run_number }}-${{ matrix.os }}-test | ||
path: | | ||
./.pixi/task-cache-v0 | ||
./build/reports | ||
docs: | ||
name: docs | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: git config --global core.autocrlf false | ||
- uses: actions/checkout@v4 | ||
- uses: prefix-dev/setup-pixi@v0.6.0 | ||
with: | ||
pixi-version: v${{ env.USE_PIXI_VERSION }} | ||
cache: true | ||
environments: docs | ||
- run: pixi run -ve docs build | ||
- if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nbconvert-a11y-${{ github.run_number }}-site | ||
path: site | ||
|
||
publish: | ||
name: publish the mkdocs build to github pages | ||
needs: [docs] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: nbconvert-a11y-${{ github.run_number }}-site | ||
path: site | ||
- name: Deploy main 🚀 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
if: ${{ github.ref_name == 'main' }} | ||
with: | ||
folder: site # The folder the action should deploy. | ||
single-commit: true | ||
- name: Deploy non-main 🚀 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
if: ${{ github.ref_name != 'main' }} | ||
with: | ||
folder: site # The folder the action should deploy. | ||
single-commit: true | ||
target-folder: branch/${{ github.ref_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# testing axe in python | ||
|
||
the `test_axe` module provides utilities for running `axe-core` on html document in python. it is designed for asynchronous interactive use and synchronous testing with the `pytest_axe` extension. | ||
|
||
`axe-core` is a javascript module that must be run inside of a live browser. currently, `playwright` is the only browser automation supporter, but `selenium` could be added. | ||
|
||
<!-- can we add it to robots from jupyter after that? --> | ||
|
||
## axe exceptions in python | ||
|
||
each release contains a version of axe and a set of exceptions generated for that specific version. | ||
the types are useful in accounting for expected accessibility that can be fixed later. | ||
|
||
## playwright testing | ||
|
||
it turns out the best ergonomics with working with axe from playwright are to append methods to the `Page` class. it has the following methods when `test_axe` is active: | ||
|
||
`Page.axe` | ||
: run axe and return the test results as a python dictionary | ||
|
||
`Page.test_axe` | ||
: run axe and return the test results as a python exception group | ||
|
||
`Page.aom` | ||
: an alias to the soon to be deprecated `page.accessibility.snapshot()` | ||
|
||
we have to main synchronous and asynchronous methods for playwright |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from .async_axe import * | ||
from ..browsers import Browser | ||
from .axe_exceptions import * | ||
from .ipy import load_ipython_extension, unload_ipython_extension |
Oops, something went wrong.