Skip to content
Snippets Groups Projects
Commit 3bd1317e authored by Klaas Kliffen's avatar Klaas Kliffen :satellite:
Browse files

Merge branch 'fix-docs' into 'main'

Fix docs

See merge request !27
parents ca05ff04 2db4a1f4
No related branches found
No related tags found
1 merge request!27Fix docs
Pipeline #74916 failed
Pipeline: Python Package

#74917

    ......@@ -11,6 +11,7 @@ dist
    # Documentation
    docs/source/source_documentation
    !docs/source/source_documentation/index.rst
    docs/build
    # Setuptools SCM
    ......
    #!/usr/bin/env python3
    # Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
    # SPDX-License-Identifier: Apache-2.0
    import os
    file_dir = os.path.dirname(os.path.realpath(__file__))
    clean_dir = os.path.join(file_dir, "source", "source_documentation")
    print(f"Cleaning.. {clean_dir}/*")
    if not os.path.exists(clean_dir):
    exit()
    for file_name in os.listdir(clean_dir):
    file = os.path.join(clean_dir, file_name)
    if file_name == "index.rst":
    continue
    print(f"Removing.. {file}")
    os.remove(file)
    #!/bin/sh
    FILE_DIR=$(dirname -- "$(readlink -f -- "${0}")")
    echo "Cleaning.. ${FILE_DIR}/source/source_documentation/*"
    for f in "${FILE_DIR}"/source/source_documentation/*
    do
    case $f in
    */index.rst) true;;
    *) echo "Removing.. ${f}"; rm "${f}";;
    esac
    done
    ......@@ -41,8 +41,6 @@ commands =
    format: {envpython} -m black -v {{cookiecutter.project_slug}} tests
    [testenv:docs]
    allowlist_externals =
    sh
    ; unset LC_ALL / LANGUAGE from testenv, would fail sphinx otherwise
    setenv =
    deps =
    ......@@ -50,7 +48,7 @@ deps =
    -r{toxinidir}/docs/requirements.txt
    changedir = {toxinidir}
    commands =
    sh docs/cleanup.sh
    {envpython} docs/cleanup.py
    sphinx-build -b html docs/source docs/build/html
    [testenv:build]
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment