diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52df9c59f05e6fd40426f1cef9c02edc5a5855d9..7b5b9c028b50bfb225476615e88f5f3303406571 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,9 +91,12 @@ jobs: - name: "Main Script" run: | CONDA_ENVIRONMENT=.test-conda-env-py3.yml + ./.ci-support/fix-code-for-docs.sh + ./.ci-support/build-docs.sh curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/ci-support.sh . ci-support.sh - ./.ci-support/fix-code-for-docs.sh build_py_project_in_conda_env - build_docs + # Circular references in type hints. Sphinx currently doesn't deal well with those. + # e.g. https://gitlab.tiker.net/inducer/pytato/-/jobs/202899 + build_docs --no-check diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 686e9926cbb29184b1a6839057f2b2e3eb6bdc17..da24af23949c9fd052f3e945cb3d80cb689c073c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,10 +63,15 @@ Mypy: Documentation: - script: - - EXTRA_INSTALL="pyopencl sphinx-autodoc-typehints" - - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-docs.sh - - ./.ci-support/fix-code-for-docs.sh - - ". ./build-docs.sh" + script: | + EXTRA_INSTALL="pyopencl sphinx-autodoc-typehints" + ./.ci-support/fix-code-for-docs.sh + curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/ci-support.sh + . ./ci-support.sh + build_py_project_in_venv + # Circular references in type hints. Sphinx currently doesn't deal well with those. + # e.g. https://gitlab.tiker.net/inducer/pytato/-/jobs/202899 + build_docs --no-check + maybe_upload_docs tags: - python3 diff --git a/pytato/program.py b/pytato/program.py index e2e2c867667665094e5d3bcddbec679b27d108cc..2894332cc8461d49441bc888500068ea3d7d18b0 100644 --- a/pytato/program.py +++ b/pytato/program.py @@ -36,12 +36,12 @@ from dataclasses import dataclass import typing from typing import Any, Mapping, Optional +import loopy if typing.TYPE_CHECKING: # Imports skipped for efficiency. FIXME: Neither of these work as type # stubs are not present. Types are here only as documentation. import pyopencl - import loopy # Imports skipped to avoid circular dependencies. import pytato.target