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

ENH: Update gitpod setup #16

Merged
merged 23 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
66d6bf6
:construction_worker: Use simple testing workflow
trallard Sep 1, 2022
685bdfe
:bug: Fix env file path
trallard Sep 1, 2022
daf6c76
:bug: Fix path - miniconda does not respect wdir
trallard Sep 1, 2022
7cf39e6
:construction_worker: Use mamba instead
trallard Sep 1, 2022
e057c73
:fire: Remove unnecessary notebooks
trallard Sep 2, 2022
4ad2087
:fire: Remove files from POC
trallard Sep 2, 2022
6bb1791
:truck: Move tools to root of repo
trallard Sep 2, 2022
cc61595
:wrench: Fix config files
trallard Sep 2, 2022
459c0c8
:pencil2: Fix typo
trallard Sep 2, 2022
387f167
use npm instead of yarn plus other changes
gabalafou Sep 6, 2022
863b378
:construction_worker: Improve paths defs in workflow
trallard Sep 10, 2022
766e1cc
:rewind: Revet accidental changes in workflow
trallard Sep 10, 2022
5ec0795
:memo: Fix docs - installation
trallard Sep 10, 2022
36d59db
Commit workflow this time to trigger action
trallard Sep 10, 2022
9bbcaaf
👷‍♂️ Ensure we use conda npm - not system
trallard Sep 15, 2022
11a8614
:construction_worker: Ensure we only run one job at a time
trallard Sep 15, 2022
5c94217
:construction_worker: Add explicit run rules
trallard Sep 15, 2022
d543d47
:rewind: Revert to full branch for now
trallard Sep 15, 2022
9bad075
:pencil2: Add missing emoji
trallard Sep 16, 2022
5c2aea9
🔨 Improvements to script performance
trallard Sep 16, 2022
fd4e74e
🛠 Update Dockerfile to match new structure
trallard Sep 16, 2022
0437191
🛠 Remove now redundant init tasks
trallard Sep 16, 2022
1370e40
:memo: Update Gitpod instructions
trallard Sep 16, 2022
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
53 changes: 0 additions & 53 deletions .github/workflows/a11y-test.yml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/jlab-a11y-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Run accessibility tests on JupyterLab

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
jlab-a11y:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./testing/jupyterlab
shell: bash -l {0}
steps:
- name: Checkout repository 🛎
uses: actions/checkout@v3

- name: Cache conda 🧠
uses: actions/cache@v2
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('environment.yml') }}

- name: Install miniconda 🐍
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
environment-file: ./testing/jupyterlab/environment.yml
activate-environment: a11y-tests
use-only-tar-bz2: true

- name: Sanity checks on environment 🔍
run: |
conda info
conda env list
echo $CONDA_PREFIX

- name: Install node dependencies 🧶
run: |
conda run --prefix $CONDA_PREFIX npm install
conda run --prefix $CONDA_PREFIX npx playwright install chromium

- name: Run tests ✅
continue-on-error: true
run: |
conda run --prefix $CONDA_PREFIX npm test

- name: Get run refs 🏷
id: getrefs
run: |
export raw_branch=${GITHUB_REF#refs/heads/}
echo "::set-output name=branch::${raw_branch//\//-}"
echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- name: Upload testing results 📤
uses: actions/upload-artifact@v3
# using default retention policy = 90 days
with:
name: jupyterlab-a11y-${{ steps.getrefs.outputs.branch }}-${{ steps.getrefs.outputs.sha8 }}
path: |
testing/jupyterlab/test-results/
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ venv.bak/
# doit
.doit*

# yarn
.yarn-links/
# npm
node_modules/

# repos
Expand Down
10 changes: 0 additions & 10 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@

image: quansight/jupyter-a11y:latest

tasks:
- name: Install JupyterLab Node.js testing dependencies
init: |
cd testing/jupyterlab
echo " 📦 Installing node dependencies "
yarn install
npx playwright install
echo "🚀 Dependencies installed "
cd /workspace/accessibility/

# --------------------------------------------------------
# exposing ports
ports:
Expand Down
33 changes: 25 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<div align="center">
<img alt="Jupyter Accessibility logo" src="https://github.com/jupyter/accessibility/blob/main/docs/_static/logo.png?raw=true" width="250" />
</div>
<br>
![Jupyter accessibility - Colour logo](https://raw.githubusercontent.com/jupyter/accessibility/main/docs/_static/logos/JupAccessColor.svg#gh-light-mode-only)
![Jupyter accessibility - Light colour logo](https://raw.githubusercontent.com/jupyter/accessibility/main/docs/_static/logos/JupAccessLight.svg#gh-dark-mode-only)

# Jupyter accessibility testing tools

Expand All @@ -12,10 +10,29 @@ Information | Links
Project | [![OSI License badge - BSD-3](https://img.shields.io/badge/License-BSD%203--Clause%20📃-gray.svg?colorA=2D2A56&colorB=5936D9&style=flat.svg)](https://opensource.org/licenses/BSD-3-Clause) [![Project backlog badge](https://img.shields.io/badge/Backlog-GitHub%20Board%20🗃️-gray.svg?colorA=2D2A56&colorB=A7B2F2&style=flat.svg)](https://github.com/orgs/Quansight-Labs/projects/8/views/1)
<!-- prettier-ignore-end -->

Welcome to the Jupyter Accessibility testing tools repository 👋🏽 .
Welcome to the Jupyter Accessibility testing tools' repository. 👋🏽
This repository is a place for accessibility testing within [Jupyter](https://jupyter.org).

To learn more about the broader accessibility initiatives within Jupyter, check the [jupyter/accessibility repository][jupyter-accesibility].

## 🧹 Pre-commit hooks
> **Note**
> 🗃 The JupyterLab tests and the corresponding instructions to run these can be found in [testing/jupyterlab](testing/jupyterlab).

## Plans for the future

Automated accessibility tests cannot address accessibility issues on their own, but used correctly they can be a useful tool.

Work in this repository is modeled after the [JupyterLab Benchmarks](https://github.com/jupyterlab/benchmarks/) repo.

As described in the [Jupyter Accessibility Roadmap](https://github.com/jupyter/accessibility/blob/main/docs/funding/czi-grant-roadmap.md),
the plan is to start by adding tests for JupyterLab.
We are starting with the web app UI, then we will add tests for the docs.
(The rationale to that sequence is to start with the harder problem first.)

After JupyterLab, though it is not within scope of the grant driving the roadmap,
we hope to extend this testing to other parts of the Jupyter ecosystem beyond JupyterLab.

## Pre-commit hooks 🧹

This repository uses the `prettier` [pre-commit hook](https://pre-commit.com/) to standardize our YAML and markdown structure.

Expand Down Expand Up @@ -45,9 +62,9 @@ This repository uses the `prettier` [pre-commit hook](https://pre-commit.com/) t

Once installed, the pre-commit hooks will run automatically when you make a commit in version control.

## 📖 License
## License 📖

[This project is licensed under the BSD-3-Clause license](https://opensource.org/licenses/BSD-3-Clause).
Jupyter uses a shared copyright model that enables all contributors to maintain the copyright on their contributions. All code is licensed under the terms of the revised [BSD license](https://opensource.org/licenses/BSD-3-Clause).

<!-- links -->

Expand Down
Loading