瀏覽代碼

Use check-links-ignore to ignore pulls and issues

Afshin T. Darian 4 年之前
父節點
當前提交
458b5b3462
共有 5 個文件被更改,包括 23 次插入20 次删除
  1. 10 6
      CHANGELOG.md
  2. 1 1
      RELEASE.md
  3. 0 2
      docs/environment.yml
  4. 10 10
      scripts/ci_script.sh
  5. 2 1
      setup.py

+ 10 - 6
CHANGELOG.md

@@ -1,3 +1,7 @@
+---
+github_url: 'https://github.com/jupyterlab/jupyterlab/blob/master/CHANGELOG.md'
+---
+
 # JupyterLab Changelog
 
 ## v3.0
@@ -1135,7 +1139,7 @@ closed.
   notebook toolbar
   ([#8024](https://github.com/jupyterlab/jupyterlab/pull/8024))
 
-<img src="changelog_restartrunallbutton.png" class="jp-screenshot">
+<img src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/master/docs/source/getting_started/changelog_searchoutput.png" class="jp-screenshot">
 
 - Added a context menu item for opening a Markdown editor from the
   Markdown preview
@@ -1259,18 +1263,18 @@ closed.
   ([#7407](https://github.com/jupyterlab/jupyterlab/pull/7407),
   [#7786](https://github.com/jupyterlab/jupyterlab/pull/7786))
 
-<img src="changelog_celltags.png" class="jp-screenshot">
+<img src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/master/docs/source/getting_started/changelog_celltags.png" class="jp-screenshot">
 
 - File info display when hovering on a file in the file browser
   ([#7485](https://github.com/jupyterlab/jupyterlab/pull/7485),
   [#7352](https://github.com/jupyterlab/jupyterlab/issues/7352))
 
-<img src="changelog_fileinfo.png" class="jp-screenshot">
+<img src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/master/docs/source/getting_started/changelog_fileinfo.png" class="jp-screenshot">
 
 - Support for searching outputs in notebooks
   ([#7258](https://github.com/jupyterlab/jupyterlab/pull/7258))
 
-<img src="changelog_searchoutput.png" class="jp-screenshot">
+<img src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/master/docs/source/getting_started/changelog_searchoutput.png" class="jp-screenshot">
 
 - `Ctrl Shift .` and `Ctrl Shift ,` shortcuts move focus to the next
   and previous tab bar in the main area, respectively
@@ -1804,7 +1808,7 @@ in 1.0.0, and other 1.0.x milestones for bugs fixed in patch releases.
 
 ### Find and Replace
 
-<img src="find.png" class="jp-screenshot">
+<img src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/master/docs/source/getting_started/find.png" class="jp-screenshot">
 
 We have added first class support for find and replace across
 JupyterLab. It is currently supported in notebooks and text files and is
@@ -1827,7 +1831,7 @@ extensible for other widgets who wish to support it.
 
 ### Status Bar
 
-<img src="statusbar.png" class="jp-screenshot">
+<img src="https://raw.githubusercontent.com/jupyterlab/jupyterlab/master/docs/source/getting_started/statusbar.png" class="jp-screenshot">
 
 We have integrated the [JupyterLab Status Bar
 package](https://github.com/jupyterlab/jupyterlab-statusbar) package

+ 1 - 1
RELEASE.md

@@ -118,7 +118,7 @@ These lines:
 ## Post release candidate checklist
 
 - [ ] Modify and run `python scripts/milestone_check.py` to check the issues assigned to this milestone
-- [ ] Write [release highlights](docs/source/getting_started/changelog.md), starting with:
+- [ ] Write [release highlights](CHANGELOG.md), starting with:
   ```bash
   loghub jupyterlab/jupyterlab -m XXX -t $GITHUB_TOKEN --template scripts/release_template.txt
   ```

+ 0 - 2
docs/environment.yml

@@ -10,7 +10,5 @@ dependencies:
 - pytest
 - pip
 - nodejs
-- requests_cache
 - jsx-lexer
 - myst-parser
-- pytest-check-links

+ 10 - 10
scripts/ci_script.sh

@@ -55,10 +55,9 @@ if [[ $GROUP == linkcheck ]]; then
     conda init --all
     source $CONDA/bin/activate jupyterlab_documentation
     make html
+    conda deactivate
     popd
 
-    pip install -e ".[test]"
-
     # Run the link check on the built html files
     CACHE_DIR="${HOME}/.cache/pytest-link-check"
     mkdir -p ${CACHE_DIR}
@@ -66,16 +65,17 @@ if [[ $GROUP == linkcheck ]]; then
     ls -ltr ${CACHE_DIR}
     # Expire links after a week
     LINKS_EXPIRE=604800
-    args="--check-links --check-links-cache --check-links-cache-expire-after ${LINKS_EXPIRE} --check-links-cache-name ${CACHE_DIR}/cache"
-    args="--ignore docs/build/html/genindex.html --ignore docs/build/html/search.html --ignore docs/build/html/api --ignore docs/build/html/getting_started/changelog.html ${args}"
-    py.test $args --links-ext .html -k .html docs/build/html || py.test $args --links-ext .html -k .html --lf docs/build/html
+    base_args="--check-links --check-links-cache --check-links-cache-expire-after ${LINKS_EXPIRE} --check-links-cache-name ${CACHE_DIR}/cache"
 
-    # Run the link check on md files - allow for a link to fail once (--lf means only run last failed)
-    args="--check-links --check-links-cache --check-links-cache-expire-after ${LINKS_EXPIRE} --check-links-cache-name ${CACHE_DIR}/cache"
-    args="--ignore docs/source/getting_started/changelog.md --ignore CHANGELOG.md ${args}"
-    py.test $args --links-ext .md -k .md . || py.test $args --links-ext .md -k .md --lf .
+    # Ignore pull requests and issues to the link check doesn't take all day
+    base_args="--check-links-ignore https://github.com/.*/(pull|issues)/.* ${base_args}"
 
-    conda deactivate
+    # Check built html files
+    args="--ignore docs/build/html/genindex.html --ignore docs/build/html/search.html --ignore docs/build/html/api ${base_args}"
+    py.test $args --links-ext .html -k .html docs/build/html || py.test $args --links-ext .html -k .html --lf docs/build/html
+
+    # Check markdown files
+    py.test ${base_args} --links-ext .md -k .md . || py.test $args --links-ext .md -k .md --lf .
 fi
 
 

+ 2 - 1
setup.py

@@ -159,9 +159,10 @@ setup_args['extras_require'] = {
         'pytest>=6.0',
         'pytest-cov',
         'pytest-console-scripts',
-        'pytest-check-links',
+        'pytest-check-links>=0.5',
         'jupyterlab_server[test]~=2.2',
         'requests',
+        'requests_cache',
         'wheel',
         'virtualenv'
     ],