From 292783d941260e16aaddd16e832b3694d0cb3fbb Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Wed, 14 Aug 2024 12:40:03 -0500 Subject: [PATCH] Revert "Add a bunch of features to the default build" This reverts commit c454d0acc7b2b20f2a90d3e6bd376159eec5e3a5. --- .readthedocs.yaml | 11 +---------- docs/conf.py | 7 +------ docs/environment-variables.rst | 13 ------------- docs/hoverxref.rst | 4 ---- docs/index.rst | 6 ------ docs/jsdoc.rst | 8 -------- requirements.txt | 9 +-------- src/actions.js | 14 -------------- 8 files changed, 3 insertions(+), 69 deletions(-) delete mode 100644 docs/environment-variables.rst delete mode 100644 docs/hoverxref.rst delete mode 100644 docs/jsdoc.rst delete mode 100644 src/actions.js diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 526c9d1..e124d1d 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -3,18 +3,9 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "latest" - nodejs: "latest" + python: "3" apt_packages: - tree - jobs: - post_checkout: - # Test we can use a PUBLIC environment variable in a command - - set -x; test -n "${PUBLIC}" - - post_install: - # Test jsdoc - - npm install -g jsdoc jobs: sphinx: configuration: docs/conf.py diff --git a/docs/conf.py b/docs/conf.py index 9d2ab51..6de5f9d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,15 +4,10 @@ project = 'Test Builds' extensions = [ 'sphinx_autorun', - 'notfound.extension', - 'hoverxref.extension', - 'sphinx_js', ] latex_engine = 'xelatex' # allow us to build Unicode chars -hoverxref_auto_ref = True + # Include all your settings here html_theme = 'sphinx_rtd_theme' - -js_source_path = '../src/' diff --git a/docs/environment-variables.rst b/docs/environment-variables.rst deleted file mode 100644 index 864750a..0000000 --- a/docs/environment-variables.rst +++ /dev/null @@ -1,13 +0,0 @@ -environment-variables -===================== - -These are the environment variables used to build this docs: - -.. runblock:: pycon - - >>> import os - >>> import pprint - >>> pprint.pprint(dict(os.environ)) - -There is a variable called ``SECRET_VALUE_ESCAPED`` with this content -``{1}\|\1+-(8)$`` that should be shown correctly. diff --git a/docs/hoverxref.rst b/docs/hoverxref.rst deleted file mode 100644 index 8975217..0000000 --- a/docs/hoverxref.rst +++ /dev/null @@ -1,4 +0,0 @@ -sphinx-hoverxref -================ - -Link to a page you can hover: :ref:`index`. diff --git a/docs/index.rst b/docs/index.rst index 8d16676..d14d6c1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,12 +3,6 @@ test-builds GitHub repository to test different Read the Docs builds scenarios. -.. toctree:: - - hoverxref - environment-variables - jsdoc - ---- Read the Docs configuration file used to build this docs: diff --git a/docs/jsdoc.rst b/docs/jsdoc.rst deleted file mode 100644 index d137004..0000000 --- a/docs/jsdoc.rst +++ /dev/null @@ -1,8 +0,0 @@ -Build with ``jsdoc`` -==================== - - -This version is built with ``jsdoc``. -It should show the ``linkDensity`` function documented below. - -.. js:autofunction:: linkDensity diff --git a/requirements.txt b/requirements.txt index 961d83c..44e154f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,2 @@ sphinx-autorun -sphinx-rtd-theme -sphinx-notfound-page -sphinx-hoverxref - -sphinx-js -# Pin it because it fails otherwise -# ImportError: cannot import name 'soft_unicode' from 'markupsafe' -markupsafe==2.0.1 +sphinx-rtd-theme>=1.2.0rc3 diff --git a/src/actions.js b/src/actions.js deleted file mode 100644 index 3f56366..0000000 --- a/src/actions.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Return the ratio of the inline text length of the links in an element to - * the inline text length of the entire element. - * - * @param {Node} node - Types or not: either works. - * @throws {PartyError|Hearty} Multiple types work fine. - * @returns {Number} Types and descriptions are both supported. - */ -function linkDensity(node) { - const length = node.flavors.get('paragraphish').inlineLength; - const lengthWithoutLinks = inlineTextLength(node.element, - element => element.tagName !== 'A'); - return (length - lengthWithoutLinks) / length; -}