Unverified Commit 89c6e821 authored by Akke Viitanen's avatar Akke Viitanen
Browse files

allow sphinx to run

parent 6a855ee4
Loading
Loading
Loading
Loading
+29 −29
Original line number Diff line number Diff line
@@ -73,35 +73,35 @@ repos:
          [
            "--ignore-missing-imports", # Ignore imports without type hints
          ]
  #  # Make sure Sphinx can build the documentation while explicitly omitting
  #  # notebooks from the docs, so users don't have to wait through the execution
  #  # of each notebook or each commit. By default, these will be checked in the
  #  # GitHub workflows.
  #- repo: local
  #  hooks:
  #    - id: sphinx-build
  #      name: Build documentation with Sphinx
  #      entry: sphinx-build
  #      language: system
  #      always_run: true
  #      exclude_types: [file, symlink]
  #      args:
  #        [
  #          "-M", # Run sphinx in make mode, so we can use -D flag later
  #                # Note: -M requires next 3 args to be builder, source, output
  #          "html", # Specify builder
  #          "./docs", # Source directory of documents
  #          "./_readthedocs", # Output directory for rendered documents
  #          "-T", # Show full trace back on exception
  #          "-E", # Don't use saved env; always read all files
  #          "-d", # Flag for cached environment and doctrees
  #          "./docs/_build/doctrees", # Directory
  #          "-D", # Flag to override settings in conf.py
  #          #"exclude_patterns=notebooks/*,_build", # Exclude notebooks and build dir from pre-commit
  #          "exclude_patterns=_build", # Exclude notebooks and build dir from pre-commit
  #          "-j4", # Use multiple threads
  #          "-d.sphinx-cache", # Use persistent cache
  #        ]
    # Make sure Sphinx can build the documentation while explicitly omitting
    # notebooks from the docs, so users don't have to wait through the execution
    # of each notebook or each commit. By default, these will be checked in the
    # GitHub workflows.
  - repo: local
    hooks:
      - id: sphinx-build
        name: Build documentation with Sphinx
        entry: sphinx-build
        language: system
        always_run: true
        exclude_types: [file, symlink]
        args:
          [
            "-M", # Run sphinx in make mode, so we can use -D flag later
                  # Note: -M requires next 3 args to be builder, source, output
            "html", # Specify builder
            "./docs", # Source directory of documents
            "./_readthedocs", # Output directory for rendered documents
            "-T", # Show full trace back on exception
            "-E", # Don't use saved env; always read all files
            "-d", # Flag for cached environment and doctrees
            "./docs/_build/doctrees", # Directory
            "-D", # Flag to override settings in conf.py
            #"exclude_patterns=notebooks/*,_build", # Exclude notebooks and build dir from pre-commit
            "exclude_patterns=_build", # Exclude notebooks and build dir from pre-commit
            "-j4", # Use multiple threads
            "-d.sphinx-cache", # Use persistent cache
          ]
    # Run unit tests, verify that they pass. Note that coverage is run against
    # the ./src directory here because that is what will be committed. In the
    # github workflow script, the coverage is run against the installed package