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

[INFRA] Use linkchecker to verify URLs #79

Closed
wants to merge 15 commits into from
Closed
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
15 changes: 12 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ version: 2
jobs:
build:
docker:
- image: circleci/python:3.6.6
- image: circleci/python:2.7
steps:
- checkout
- run: sudo chown -R circleci:circleci /usr/local/bin
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages
- run: sudo chown -R circleci:circleci /usr/local/lib/python*/site-packages
- restore_cache: # ensure this step occurs *before* installing dependencies
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run:
command: |
sudo pip install pip==18.0
sudo pip install pipenv==2018.7.1
pipenv install
pipenv install -d
- save_cache:
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
paths:
Expand All @@ -23,5 +23,14 @@ jobs:
- run:
name: generate docs
command: pipenv run mkdocs build --clean --strict --verbose
- run:
name: quick check URLs
command: |
mkdir -p ~/.linkchecker/ && echo '[AnchorCheck]' >| ~/.linkchecker/linkcheckerrc
pipenv run linkchecker site/
# TODO: ATM 38 errors (and locally got also 43 internal errors)
#- run:
# name: thorough check of external URLs
# command: pipenv run linkchecker --check-extern site/
- store_artifacts:
path: site
11 changes: 10 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ mkdocs = "==1.0.4"
mkdocs-material = "==3.0.4"

[dev-packages]
# Custom version with the fix for anchors
linkchecker = {file = "https://github.com/yarikoptic/linkchecker/archive/9.4.0.anchorfix1.zip"}
# Installing from a file seems to not pull in all the dependencies linkchecker needs,
# so installing them manually here
requests = "*"
pyxdg = "*"
dnspython = "*"


[requires]
python_version = "3.6"
# linkchecker doesn't support python3 yet
# python_version = "3.6"
112 changes: 94 additions & 18 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ inplaneT1, referenced by a defacemask image. E.g.,
`sub-01_mod-T1w_defacemask.nii.gz`.

Some meta information about the acquisition MAY be provided in an additional
JSON file. See Common MR metadata fields for a list of terms and their
definitions. There are also some OPTIONAL JSON fields specific to anatomical
scans:
JSON file. See [Common metadata fields](#common-metadata-fields) for a
list of terms and their definitions. There are also some OPTIONAL JSON
fields specific to anatomical scans:

| Field name | Definition |
| :---------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down Expand Up @@ -287,7 +287,7 @@ combined image rather than an image from each coil.
| CogAtlasID | RECOMMENDED. URL of the corresponding [Cognitive Atlas](http://www.cognitiveatlas.org/) Task term. |
| CogPOID | RECOMMENDED. URL of the corresponding [CogPO](http://www.cogpo.org/) term. |

See [8.3.1. Common MR metadata fields](#heading=h.5u721tt1h9pe) for a list of
See [Common metadata fields](#common-metadata-fields) for a list of
additional terms and their definitions.

Example:
Expand Down Expand Up @@ -360,7 +360,7 @@ dwi.nii file) and not the magnet’s coordinate system, which means that any
rotations applied to dwi.nii also need to be applied to the corresponding bvec
file.

<sup>4</sup>[http://fsl.fmrib.ox.ac.uk/fsl/fsl4.0/fdt/fdt_dtifit.html](hhttp://fsl.fmrib.ox.ac.uk/fsl/fsl4.0/fdt/fdt_dtifit.html)
<sup>4</sup>[http://fsl.fmrib.ox.ac.uk/fsl/fsl4.0/fdt/fdt_dtifit.html](http://fsl.fmrib.ox.ac.uk/fsl/fsl4.0/fdt/fdt_dtifit.html)

bvec example:

Expand All @@ -384,8 +384,8 @@ bval example:
and thus define those values for all sessions and/or subjects in one place (see
Inheritance principle).

See Common MR metadata fields for a list of additional terms that can be
included in the corresponding JSON file.
See [Common metadata fields](#common-metadata-fields) for a list of
additional terms that can be included in the corresponding JSON file.

JSON example:

Expand Down