diff --git a/.github/.readthedocs.yaml b/.github/.readthedocs.yaml deleted file mode 100644 index 1fc8e2398..000000000 --- a/.github/.readthedocs.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# .readthedocs.yaml -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -# Required -version: 2 - -build: - os: ubuntu-22.04 - tools: - python: "3.11" - -python: - install: - - method: pip - path: . - extra_requirements: - - docs -sphinx: - builder: html - configuration: docs/conf.py - fail_on_warning: false diff --git a/docs/.readthedocs.yaml b/docs/.readthedocs.yaml new file mode 100644 index 000000000..f9fd46e76 --- /dev/null +++ b/docs/.readthedocs.yaml @@ -0,0 +1,20 @@ +version: 2 + +build: + os: "ubuntu-22.04" + tools: + python: "3.11" + jobs: + post_create_environment: + # Install poetry + # https://python-poetry.org/docs/#installing-manually + - pip install poetry + # Tell poetry to not use a virtual environment + - poetry config virtualenvs.create false + post_install: + # Install dependencies with 'docs' dependency group + # https://python-poetry.org/docs/managing-dependencies/#dependency-groups + - poetry install --with docs + +sphinx: + configuration: docs/conf.py diff --git a/pyproject.toml b/pyproject.toml index fdf4b30b0..deb7259cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,8 @@ +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + + [tool.poetry] name = "iamlistening" version = "0.2.7" @@ -23,13 +28,30 @@ telethon= "^1.28.5" py-cord= "^2.4.1" simplematrixbotlib= "^2.9.0" + [tool.poetry.dev-dependencies] python-semantic-release = "^7.34.3" + + +[tool.poetry.group.test.dependencies] pytest = "^7.0" pytest-cov = "^4.1" pytest-asyncio = "^0.21.0" pytest-mock = "^3.11.1" + +[tool.poetry.group.docs] +optional = true + +[tool.poetry.group.docs.dependencies] +sphinx = "^6.0.0" +sphinx_bootstrap_theme = "^0.8.1" +sphinx-autoapi = "^2.1.1" +sphinx-copybutton= "^0.5.2" +myst-parser = "^2.0.0" +sphinx-notfound-page = "*" + + [tool.pytest.ini_options] pythonpath = "." testpaths = "tests" @@ -45,15 +67,6 @@ omit = [ "*/config.py" ] -[tool.poetry.group.docs.dependencies] -sphinx = "^7.0.1" -sphinx-autoapi = "^2.1.0" -furo = "^2023.5.20" - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" - [tool.semantic_release] version_variable = ["pyproject.toml:version","iamlistening/__init__.py:__version__"] branch = "main"