Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 2 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- python-version: "3.9"
- python-version: "3.13"
use_coverage: 'coverage'

steps:
- uses: actions/checkout@v6
with:
Expand Down
9 changes: 2 additions & 7 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ help:

.PHONY: help Makefile

# additional step to use sphinx-apidoc to generate rst files for APIs
rst:
rm -f $(SOURCEDIR)/kubernetes.*.rst
$(SPHINXAPIDOC) -o "$(SOURCEDIR)" ../kubernetes/ -e -f

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
html: rst
html:
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@echo "\nDocs rendered successfully, open _/build/html/index.html to view"
@echo "Docs rendered successfully, open _/build/html/index.html to view"
1 change: 0 additions & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ $ pip install -r ../test-requirements.txt
```

Use `make html` to build the docs in html format.

1 change: 1 addition & 0 deletions doc/requirements-docs.txt → doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
sphinx
recommonmark
sphinx_markdown_tables
88 changes: 31 additions & 57 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -18,29 +17,7 @@

from recommonmark.transform import AutoStructify

# --
# Copy README.md, CONTRIBUTING.md to source/ directory and replace
# all paths to point github files.
def _copy_with_converting_link_to_repo(filename, new_filename):
base_url = 'https://github.com/kubernetes-client/python/blob/master/'

def subf(subs):
label, url = subs.groups()
if not url.startswith('http://') and not url.startswith('https://'):
url = base_url + url
return label + '(' + url + ')'

with open(filename, "r") as r:
data = re.sub("(\[[^\]]+\])\(([^\)]+)\)", subf, r.read())

with open(new_filename, "w") as w:
w.write(data)

_copy_with_converting_link_to_repo("../../README.md", "README.md")
_copy_with_converting_link_to_repo("../../CONTRIBUTING.md", "CONTRIBUTING.md")
# --

sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ----------------------------------------------------

source_suffix = ['.rst', '.md']
Expand All @@ -50,23 +27,17 @@ def subf(subs):
extensions = [
'sphinx_markdown_tables',
'recommonmark',
'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx',
]

# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable

# The suffix of source filenames.
source_suffix = '.rst'
source_suffix = ['.rst', '.md']

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'kubernetes-python-client'
copyright = u'2017, Kubernetes'
project = 'kubernetes-python-client'
copyright = '2017-present, Kubernetes'

# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
Expand All @@ -78,33 +49,36 @@ def subf(subs):
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# -- Options for HTML output --------------------------------------------------

# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
# html_static_path = ['static']

# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index',
'%s.tex' % project,
u'%s Documentation' % project,
u'Kubernetes', 'manual'),
]

# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}
# Copy README.md, CONTRIBUTING.md to source/ directory and replace
# all paths to point github files.
def _copy_with_converting_link_to_repo(filename, new_filename):
base_url = 'https://github.com/kubernetes-client/python/blob/master/'

def subf(subs):
label, url = subs.groups()
if not url.startswith('http://') and not url.startswith('https://'):
url = base_url + url
return label + '(' + url + ')'

with open(filename, "r") as r:
data = re.sub("(\[[^\]]+\])\(([^\)]+)\)", subf, r.read())

with open(new_filename, "w") as w:
w.write(data)


_copy_with_converting_link_to_repo("../../README.md", "README.md")
_copy_with_converting_link_to_repo("../../CONTRIBUTING.md", "CONTRIBUTING.md")


def setup(app):
app.add_config_value('recommonmark_config', {
app.add_config_value(
'recommonmark_config',
{
'auto_toc_tree_section': 'Contents',
'enable_eval_rst': True,
}, True)
},
True,
)
app.add_transform(AutoStructify)

21 changes: 2 additions & 19 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
.. kubernetes-python-client documentation master file, created by
sphinx-quickstart on Tue Jul 9 22:26:36 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to kubernetes-python-client's documentation!
========================================================

Contents:
kubernetes-python-client
========================

.. toctree::
:maxdepth: 2

README <README.md>
installation
usage
examples
modules
contributing <CONTRIBUTING.md>

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.apiextensions_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.apiextensions_v1_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.apiregistration_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.apiregistration_v1_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.apis_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.apps_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.apps_v1_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.authentication_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.authentication_v1_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.authorization_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.authorization_v1_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.autoscaling_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.autoscaling_v1_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.autoscaling_v2_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.batch_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.batch_v1_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.certificates_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.certificates_v1_api.rst

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.certificates_v1beta1_api.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/kubernetes.client.api.coordination_api.rst

This file was deleted.

Loading