From ebfae6ea27ac001cf712d5e2f4358e7775f80fc9 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 7 Dec 2020 21:51:24 -0600 Subject: [PATCH 1/4] Move loopy import in pytato.program docs for sphinx's benefit --- pytato/program.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytato/program.py b/pytato/program.py index e2e2c86..2894332 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 -- GitLab From 9f8aa9c67dff24e2b29066a07c15642ed01229da Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 7 Dec 2020 22:29:32 -0600 Subject: [PATCH 2/4] Build docs without checking for now --- .github/workflows/ci.yml | 7 +++++-- .gitlab-ci.yml | 15 ++++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52df9c5..7b5b9c0 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 686e992..8c35c6c 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-supoort.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 -- GitLab From 2adceb6800e99161a2f44b03b78a6cde4e54528d Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 7 Dec 2020 22:45:19 -0600 Subject: [PATCH 3/4] Add explicit path to ci-support source on Gitlab CI --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8c35c6c..b5f3e62 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,7 +67,7 @@ Documentation: 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-supoort.sh - . 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 -- GitLab From 498335f16526ccd5b2e60e7928dc0baa396a6f82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kl=C3=B6ckner?= Date: Tue, 8 Dec 2020 05:52:24 +0100 Subject: [PATCH 4/4] Fix ci-support typo in Gitlab CI --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b5f3e62..da24af2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,7 +66,7 @@ Documentation: 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-supoort.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. -- GitLab