Skip to content

Commit

Permalink
config: read the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
FahimFBA committed Sep 15, 2024
1 parent 11f6506 commit f0b0d26
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 17 deletions.
27 changes: 14 additions & 13 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# .readthedocs.yaml
# Read the Docs configuration file for MkDocs projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
python: "3.12"

# Build documentation in the docs/ directory with MkDocs
mkdocs:
configuration: mkdocs.yml
sphinx:
configuration: docs/conf.py

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
install:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- docs

# Optional but recommended:
formats:
- pdf
- epub
13 changes: 13 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
API Reference
=============

.. automodule:: ytubeinsight
:members:
:undoc-members:
:show-inheritance:

.. autofunction:: ytubeinsight.analyze_channel

.. autoexception:: ytubeinsight.YTubeInsightError
:members:

29 changes: 28 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
"""Configuration file for the Sphinx documentation builder."""

import os
import sys
import datetime

# Add the project root directory to the Python path
sys.path.insert(0, os.path.abspath('..'))

current_year = datetime.datetime.now().year

# -- Project information -----------------------------------------------------
Expand All @@ -20,6 +25,10 @@
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx_rtd_theme',
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -29,6 +38,10 @@
# directories to ignore when looking for source files.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
language = 'en'

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

# The theme to use for HTML and HTML Help pages.
Expand All @@ -37,4 +50,18 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
# html_static_path = ['_static']

# -- Extension configuration -------------------------------------------------

# Napoleon settings
napoleon_google_docstring = True
napoleon_include_init_with_doc = False
napoleon_include_private_with_doc = False
napoleon_include_special_with_doc = True
napoleon_use_admonition_for_examples = False
napoleon_use_admonition_for_notes = False
napoleon_use_admonition_for_references = False
napoleon_use_ivar = False
napoleon_use_param = True
napoleon_use_rtype = True
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ YTubeInsight is a Python package for effortless YouTube channel analytics. It al
:caption: Contents:

usage
api_reference
api

Indices and tables
==================
Expand Down
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sphinx
sphinx_rtd_theme
sphinx>=5.0
sphinx_rtd_theme>=1.0

0 comments on commit f0b0d26

Please sign in to comment.