From 95a46d5f4b78be095f232c2509359d3e360da262 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 2 Aug 2019 15:00:08 -0400 Subject: [PATCH 01/12] ENH: Neurodocker script to create docker container with patched linkchecker --- tools/linkchecker-docker/neurodocker-build.sh | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 tools/linkchecker-docker/neurodocker-build.sh diff --git a/tools/linkchecker-docker/neurodocker-build.sh b/tools/linkchecker-docker/neurodocker-build.sh new file mode 100755 index 0000000000..8b9aa66ccc --- /dev/null +++ b/tools/linkchecker-docker/neurodocker-build.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# A script to build docker image with desired patched linkchecker +# using neurodocker + +# TODOs: +# - minimize image (currently >500MB) using reprozip +# see https://github.com/kaczmarj/neurodocker/#minimize-existing-docker-image +# for instructions + +# tag for patched linkchecker -- will also serve our image version +version="9.4.0.anchorfix1" +# docker image build +build=1 + +neurodocker generate docker \ + --base neurodebian:nd100 \ + --pkg-manager apt \ + --install python-pip python-requests python-dnspython python-setuptools python-wheel \ + --run "sed -e 's,^deb ,deb-src ,g' /etc/apt/sources.list > /etc/apt/sources.list.d/deb-sources.list \ + && apt-get update \ + && apt-get build-dep -y linkchecker \ + && pip install pyxdg https://github.com/yarikoptic/linkchecker/archive/$version.zip \ + && mkdir ~/.linkchecker && echo '[AnchorCheck]' > ~/.linkchecker/linkcheckerrc \ + " \ + --entrypoint /usr/local/bin/linkchecker \ +| docker build -t yarikoptic/linkchecker:$version-$build - From 649e5ec250f5c1f48d401773db108c36995c5a4a Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 2 Aug 2019 15:01:50 -0400 Subject: [PATCH 02/12] ENH: place built site/ into workspace and run linkchecker from a dedicated docker image as a separate job --- .circleci/config.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index b8aa208d9b..3c3b8c8a99 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,6 +25,18 @@ jobs: command: pipenv run mkdocs build --clean --strict --verbose - store_artifacts: path: site + - persist_to_workspace: + root: . + paths: site + + linkchecker: + docker: + - image: yarikoptic/linkchecker:9.4.0.anchorfix1-1 + steps: + - attach_workspace: + at: ~/build + # Image already has linkchecker as the entry point + - run: ~/build/site # Auto changelog collector github-changelog-generator: @@ -127,6 +139,7 @@ workflows: search_build: jobs: - build + - linkchecker - github-changelog-generator: filters: branches: From 5107ae091f70670e0973dd3a061ca88ec59fd22e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 5 Aug 2019 09:46:34 -0400 Subject: [PATCH 03/12] BF: state that linkchecker requires build (otherwise workspace is empty!) --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3c3b8c8a99..d7fd464fb0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -139,7 +139,9 @@ workflows: search_build: jobs: - build - - linkchecker + - linkchecker: + requires: + - build - github-changelog-generator: filters: branches: From 64faa855f7e509a5e36711f9b0d17081666f90fa Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 2 Aug 2019 15:15:36 -0400 Subject: [PATCH 04/12] BF: add linkchecker command (entered image), and chmod entire ~ to be readable -- demanded by linkchecker - note: it is important to have trailing / after site/ for linkchecker --- .circleci/config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d7fd464fb0..2d9a1f4cf6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,8 +35,10 @@ jobs: steps: - attach_workspace: at: ~/build - # Image already has linkchecker as the entry point - - run: ~/build/site + - run: + command: | + chmod a+rX -R ~ + linkchecker ~/build/site/ # Auto changelog collector github-changelog-generator: From f795519bd1a4fe3caec75e0369288617ff3639b3 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 5 Aug 2019 10:19:47 -0400 Subject: [PATCH 05/12] BF: fixed up #anchored references in two files --- src/04-modality-specific-files/03-electroencephalography.md | 4 ++-- .../04-intracranial-electroencephalography.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/04-modality-specific-files/03-electroencephalography.md b/src/04-modality-specific-files/03-electroencephalography.md index 93fd73675d..36314b4290 100644 --- a/src/04-modality-specific-files/03-electroencephalography.md +++ b/src/04-modality-specific-files/03-electroencephalography.md @@ -197,7 +197,7 @@ required columns are channel `name`, `type` and `units` in this specific order. Channel names should furthermore appear in the table in the same order they do in the EEG data file. Any number of additional columns may be provided to provide additional information about the channels. Note that electrode -positions should not be added to this file, but to [`*_electrodes.tsv`](./03-electroencephalography.md#electrodes-description-electrodes-tsv). +positions should not be added to this file, but to [`*_electrodes.tsv`](./03-electroencephalography.md#electrodes-description-_electrodestsv). The columns of the Channels description table stored in `*_channels.tsv` are: @@ -272,7 +272,7 @@ sub-