Skip to content
Draft
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
16 changes: 15 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,21 @@
"showReuseMessage": false
},
"dependsOn": "test-build",
"command": "bash checks/run_a11y_check.sh"
"command": "bash checks/run_a11y_check.sh ${input:a11y_min_level} ${input:a11y_url}"
},
],
"inputs": [
{
"id": "a11y_min_level",
"description": "minimum violation level to report from run_a11y_check.sh",
"default": "minor",
"type": "promptString"
},
{
"id": "a11y_url",
"description": "url to run a11y audit on",
"default": "",
"type": "promptString"
}
]
}
24 changes: 17 additions & 7 deletions checks/run_a11y_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,24 @@
# Runs the same WCAG audit as the AccessLint/audit@v0 GitHub Action, locally.
set -euo pipefail

MIN_IMPACT=$1

CACHE_DIR="${HOME}/.cache/accesslint-audit"
PORT="$(python3 -c 'import socket; s=socket.socket(); s.bind(("",0)); print(s.getsockname()[1]); s.close()')"
URLS="${1:-http://localhost:${PORT}/}"

if [ ! -d "public" ]; then
echo "Error: 'public' directory does not exist. Run a build first!" >&2
exit 1
fi

if [ -n "${2:-}" ]; then
PAGE=$2
URLS="http://localhost:${PORT}/${PAGE}"
else
# No URL given: audit every page from the built sitemap.
URLS="$(sed -n 's#.*<loc>\(.*\)</loc>.*#\1#p' public/sitemap.xml \
| sed "s#^https\?://[^/]*/#http://localhost:${PORT}/#")"
fi
Comment on lines +18 to +22

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Ahoy! Ye be blindly plunderin' public/sitemap.xml without so much as a glance to see if the map actually exists in yer 'public' port! Since ye set pipefail at the top of yer scroll, if that file be missin', yer whole vessel will scuttle itself with a nasty error. Best check if the sitemap exists first, ye scurvy dog, or suffer the wrath of the deep!

Suggested change
else
# No URL given: audit every page from the built sitemap.
URLS="$(sed -n 's#.*<loc>\(.*\)</loc>.*#\1#p' public/sitemap.xml \
| sed "s#^https\?://[^/]*/#http://localhost:${PORT}/#")"
fi
else
# No URL given: audit every page from the built sitemap.
if [ ! -f "public/sitemap.xml" ]; then
echo "Error: 'public/sitemap.xml' does not exist. Run a build first!" >&2
exit 1
fi
URLS="
$(sed -n 's#.*<loc>\(.*\)</loc>.*#\1#p' public/sitemap.xml \
| sed "s#^https\?://[^/]*/#http://localhost:${PORT}/#")"
fi


if [ ! -d "$CACHE_DIR" ]; then
git clone --depth 1 --branch v0 https://github.com/AccessLint/audit.git "$CACHE_DIR"
Expand All @@ -16,11 +31,6 @@ if [ ! -f "$READY_MARKER" ]; then
touch "$READY_MARKER"
fi

if [ ! -d "public" ]; then
echo "Error: 'public' directory does not exist. Run a build first!" >&2
exit 1
fi

python3 -m http.server "$PORT" --directory public &
SERVER_PID=$!
trap 'kill "$SERVER_PID" 2>/dev/null || true' EXIT
Expand All @@ -40,5 +50,5 @@ env \
INPUT_URLS="$URLS" \
INPUT_WCAG-LEVEL="AA" \
INPUT_FAIL-ON="never" \
INPUT_MIN-IMPACT="minor" \
INPUT_MIN-IMPACT="$MIN_IMPACT" \
node "$CACHE_DIR/dist/index.js"
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ After a few minutes, a preview of the source branch will be deployed, a bot will

Assign a reviewer if you wish.

Adding the tag <a id="label-987ef8" href="https://github.com/nesi/support-docs/labels/auto_merge" data-name="auto_merge" style="--label-r:217;--label-g:244;--label-b:210;--label-h:107;--label-s:60;--label-l:89;" data-view-component="true" class="IssueLabel hx_IssueLabel Label--inline"> will cause the request to be merged at midnight, if all checks passed.
Adding the tag <a id="label-987ef8" href="https://github.com/nesi/support-docs/labels/auto_merge" data-name="auto_merge" style="--label-r:217;--label-g:244;--label-b:210;--label-h:107;--label-s:60;--label-l:89;" data-view-component="true" class="IssueLabel hx_IssueLabel Label--inline"> will cause the request to be merged at midnight, if all checks passed.</a>

### Reviewing A Merge Request

Expand Down
10 changes: 5 additions & 5 deletions docs/Software/Available_Applications/AlphaFold.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ complexes (with per-residue and per-pair confidence estimates). It does
not compute binding affinities, docking scores or other measures of
binding strength.

Home page is at <https://github.com/google-deepmind/alphafold3>.
Home page is at <https://github.com/google-deepmind/alphafold3).

!!! warning "You must request the model parameters from Google DeepMind"
The AlphaFold 3 model parameters are
Expand Down Expand Up @@ -402,7 +402,7 @@ Dockerfile](https://hub.docker.com/r/catgumag/alphafold) with some
modifications. Image (.*simg*) and the corresponding definition file
(*.def*) are stored in `/opt/nesi/containers/AlphaFold/`

### [](https://github.com/DininduSenanayake/alphafold/tree/main/AlphaFold_Mahuika_instructions#example-slurm-script)Example Slurm scripts for Singularity container based AF2 deployment
### [Example Slurm scripts for Singularity container based AF2 deployment](https://github.com/DininduSenanayake/alphafold/tree/main/AlphaFold_Mahuika_instructions#example-slurm-script)

#### Monomer

Expand Down Expand Up @@ -523,7 +523,7 @@ This is not an officially supported Google product.

Copyright 2021 DeepMind Technologies Limited.

### [](https://github.com/deepmind/alphafold#alphafold-code-license)AlphaFold Code License
### [AlphaFold Code License](https://github.com/deepmind/alphafold#alphafold-code-license)

Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
Expand All @@ -535,9 +535,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

### [](https://github.com/deepmind/alphafold#model-parameters-license)Model Parameters License
### [Model Parameters License](https://github.com/deepmind/alphafold#model-parameters-license)

The AlphaFold parameters are made available for non-commercial use only,
under the terms of the Creative Commons Attribution-NonCommercial 4.0
International (CC BY-NC 4.0) license. You can find details
at: <https://creativecommons.org/licenses/by-nc/4.0/legalcode>
at: <https://creativecommons.org/licenses/by-nc/4.0/legalcode>
2 changes: 1 addition & 1 deletion docs/Software/Available_Applications/Dorado.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ zendesk_section_id: 360000040076
Dorado is a high-performance, easy-to-use, open source basecaller for
Oxford Nanopore reads.

### [](https://github.com/nanoporetech/dorado#features)Features
### [Features](https://github.com/nanoporetech/dorado#features)

- One executable with sensible defaults, automatic hardware detection
and configuration.
Expand Down
6 changes: 3 additions & 3 deletions docs/assets/stylesheets/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
--reannz-orange: rgb(241, 128, 0);
--reannz-purple: rgb(132, 121, 183);

[data-md-color-scheme="default"] {
[data-md-color-scheme="default"] { /* original definitions of these colors here: https://github.com/squidfunk/mkdocs-material/blob/master/src/templates/assets/stylesheets/main/_colors.scss */
--md-primary-fg-color: var(--reannz-blue--dark); /* head bar background color */
--md-accent-fg-color: var(--reannz-blue); /* hover color for sidebar links */
/* --md-accent-bg-color: var(--reannz-orange); */ /* cannot figure what this one does */
Expand All @@ -28,8 +28,8 @@
/* --md-accent-fg-color--light: var(--reannz-orange); */ /* cannot figure what this one does */
/* --md-default-fg-color: var(--reannz-orange); */ /* main text color, sub H1 headers too */
/* --md-default-bg-color: var(--reannz-orange); */ /* main background color */
/* --md-code-fg-color: var(--reannz-orange); */ /* main color for code text */
/* --md-code-bg-color: var(--reannz-orange); */ /* main color for code background */
/* --md-code-fg-color: rgb(53,69,77); */ /* main color for code text */
--md-code-bg-color: var(--md-code-bg-color--light); /* main color for code background */
/* --md-typeset-color: var(--reannz-orange); */ /* main text color, sub H1 headers too */
}

Expand Down
Loading