Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove multiversion docs #115

Merged
merged 5 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ jobs:
python-version: [ '3.9', '3.10', '3.11' ]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -32,11 +30,9 @@ jobs:
test_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
Expand All @@ -39,13 +39,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Checkout latest tagged commit
run: |
git checkout $(git describe --tags --abbrev=0)
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -66,11 +69,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check version in changelog
Expand All @@ -27,7 +27,7 @@ jobs:
if: ${{ github.ref == 'refs/heads/main' }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create new tag and release
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@ test_report.xml
/dist/
/sdist/
/docs/api/

# Autogenerated redirection page
/docs/_static/index.html
3 changes: 3 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ Contributors
* Olli Tyrkkö <[email protected]>
* Rakhim Davletkaliyev <[email protected]>
* Matthias Beuerle <[email protected]>
* Janne Kotilahti <[email protected]>
* Vladimir Kukushkin <[email protected]>
* Ricardas Brazinskas <[email protected]>
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Copyright

IQM client is free software, released under the Apache License, version 2.0.

Copyright 2021-2023 IQM client developers.
Copyright 2021-2024 IQM client developers.
24 changes: 0 additions & 24 deletions docs/_templates/page.html

This file was deleted.

32 changes: 0 additions & 32 deletions docs/_templates/versioning.html

This file was deleted.

27 changes: 3 additions & 24 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@

# Find the path to the source files we want to to document, relative to the location of this file,
# convert it to an absolute path.
# Sphinx-multiversion checks out the repo at different ref points into tmp directory.
# We're using SPHINX_MULTIVERSION_SOURCEDIR in order to access each such directory.
# See https://github.com/Holzhaus/sphinx-multiversion/issues/42 for details.
default_py_root = os.path.join(os.getcwd(), os.path.dirname(__file__))
py_path = os.path.join(os.getenv("SPHINX_MULTIVERSION_SOURCEDIR", default=default_py_root), "../src")
py_path = os.path.join(os.getcwd(), os.path.dirname(__file__), '../src')
sys.path.insert(0, os.path.abspath(py_path))

# -- Project information -----------------------------------------------------

project = 'IQM client'
copyright = '2021-2023, IQM'
copyright = '2021-2024, IQM'
author = 'IQM client developers'

# The short X.Y version.
Expand All @@ -39,7 +35,7 @@
# -- General configuration ---------------------------------------------------

# require a recent version of Sphinx
needs_sphinx = '6.2'
needs_sphinx = '7.2'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand All @@ -53,7 +49,6 @@
'sphinx.ext.todo',
'sphinx.ext.extlinks',
'sphinx.ext.intersphinx',
"sphinx_multiversion",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -115,12 +110,6 @@
# documentation.
html_theme_options = {}

html_sidebars = {
'**': [
'navbar-logo.html', 'search-field.html', 'sbt-sidebar-nav.html', 'versioning.html'
]
}

# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None

Expand Down Expand Up @@ -177,13 +166,3 @@

# List of all bibliography files used.
#bibtex_bibfiles = ['references.bib']

# -- Options for sphinx_multiversion --------------------------------------------------
# Only include certain tags (i.e. all tags except for ones listed below)
# (technically a whitelist, but we treat it as blacklist by using negative lookahead regex `?!`)
smv_tag_whitelist = r'^(?!(1\.0|1\.1\b|1\.2|1\.3|1\.4|1\.5|1\.6|1\.7|1\.8|1\.9|2\.0|2\.1|4\.1)).*$'

smv_branch_whitelist = "None" # Do not include local branches in versions list
smv_remote_whitelist = "None" # Do not include remote branches in versions list
smv_released_pattern = r'^refs/tags/.*$' # Tags recognized as releases
smv_outputdir_format = 'versions/{ref.name}' # Store versioned docs in a subdirectory
4 changes: 4 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Contents
integration_guide
license
authors

.. toctree::
:maxdepth: 1

changelog


Expand Down
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ testing = [
"jsons == 1.6.1",
]
docs = [
"sphinx == 6.2.1",
"sphinx-book-theme == 1.0.1",
"beautifulsoup4 == 4.11.2",
"sphinx-multiversion-contrib == 0.3.2",
"sphinx == 7.2.6",
"sphinx-book-theme == 1.1.2",
]


Expand Down
10 changes: 2 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,15 @@ commands =

[testenv:docs]
description =
Invoke sphinx-multiversion to build the docs.
Invoke sphinx to build the docs.
setenv =
DOCSDIR = {toxinidir}/docs
BUILDDIR = {toxinidir}/build/sphinx
BUILD = html
extras =
docs
allowlist_externals =
sphinx-multiversion
commands =
python tox_docs_pre_build_helper.py --build_dir "{env:BUILDDIR}" --build_type "{env:BUILD}"
# removed -W to prevent build failure due to
# WARNING: don't know which module to import for autodocumenting '__init__' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
sphinx-multiversion "{env:DOCSDIR}" "{env:BUILDDIR}/{env:BUILD}" --dev-name dev --skip-if-outputdir-exists
python tox_docs_post_build_helper.py --build_dir "{env:BUILDDIR}" --build_type "{env:BUILD}"
sphinx-build -b {env:BUILD} "{env:DOCSDIR}" "{env:BUILDDIR}/{env:BUILD}"

[testenv:build]
description =
Expand Down
Loading