From ab2f1293ea9118159f1a8c9e3ac7757baf47c82b Mon Sep 17 00:00:00 2001 From: Subhash Bhushan Date: Sat, 23 Mar 2024 10:07:12 -0700 Subject: [PATCH] Move docs to docs-sphinx folder --- .bumpversion.cfg | 4 ++-- .editorconfig | 2 +- .flake8 | 2 +- .gitignore | 4 ++-- .readthedocs.yaml | 6 +++--- CONTRIBUTING.rst | 2 +- Makefile | 2 +- {docs => docs-sphinx}/Makefile | 0 {docs => docs-sphinx}/adapters/database.rst | 0 {docs => docs-sphinx}/api.rst | 0 {docs => docs-sphinx}/community/changelog.rst | 0 {docs => docs-sphinx}/community/code-of-conduct.rst | 0 {docs => docs-sphinx}/community/contributing.rst | 0 {docs => docs-sphinx}/conf.py | 3 ++- {docs => docs-sphinx}/images/consuming-events.jpg | Bin {docs => docs-sphinx}/images/raising-events.jpg | Bin {docs => docs-sphinx}/index.rst | 0 {docs => docs-sphinx}/make.bat | 0 docs-sphinx/requirements.txt | 3 +++ {docs => docs-sphinx}/static/custom.css | 0 {docs => docs-sphinx}/user/cli.rst | 0 {docs => docs-sphinx}/user/composing-a-domain.rst | 0 {docs => docs-sphinx}/user/config.rst | 0 {docs => docs-sphinx}/user/domain-definition.rst | 0 {docs => docs-sphinx}/user/entities-and-vos.rst | 0 {docs => docs-sphinx}/user/event-sourcing.rst | 0 {docs => docs-sphinx}/user/eventing.rst | 0 {docs => docs-sphinx}/user/fields.rst | 0 {docs => docs-sphinx}/user/foreword.rst | 0 {docs => docs-sphinx}/user/installation.rst | 0 {docs => docs-sphinx}/user/persistence.rst | 0 {docs => docs-sphinx}/user/quickstart.rst | 0 {docs => docs-sphinx}/user/services.rst | 0 docs/requirements.txt | 1 - src/protean/cli.py | 2 +- tox.ini | 10 +++++----- 36 files changed, 22 insertions(+), 19 deletions(-) rename {docs => docs-sphinx}/Makefile (100%) rename {docs => docs-sphinx}/adapters/database.rst (100%) rename {docs => docs-sphinx}/api.rst (100%) rename {docs => docs-sphinx}/community/changelog.rst (100%) rename {docs => docs-sphinx}/community/code-of-conduct.rst (100%) rename {docs => docs-sphinx}/community/contributing.rst (100%) rename {docs => docs-sphinx}/conf.py (96%) rename {docs => docs-sphinx}/images/consuming-events.jpg (100%) rename {docs => docs-sphinx}/images/raising-events.jpg (100%) rename {docs => docs-sphinx}/index.rst (100%) rename {docs => docs-sphinx}/make.bat (100%) create mode 100644 docs-sphinx/requirements.txt rename {docs => docs-sphinx}/static/custom.css (100%) rename {docs => docs-sphinx}/user/cli.rst (100%) rename {docs => docs-sphinx}/user/composing-a-domain.rst (100%) rename {docs => docs-sphinx}/user/config.rst (100%) rename {docs => docs-sphinx}/user/domain-definition.rst (100%) rename {docs => docs-sphinx}/user/entities-and-vos.rst (100%) rename {docs => docs-sphinx}/user/event-sourcing.rst (100%) rename {docs => docs-sphinx}/user/eventing.rst (100%) rename {docs => docs-sphinx}/user/fields.rst (100%) rename {docs => docs-sphinx}/user/foreword.rst (100%) rename {docs => docs-sphinx}/user/installation.rst (100%) rename {docs => docs-sphinx}/user/persistence.rst (100%) rename {docs => docs-sphinx}/user/quickstart.rst (100%) rename {docs => docs-sphinx}/user/services.rst (100%) delete mode 100644 docs/requirements.txt diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a4bbfc01..6800aec2 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -5,10 +5,10 @@ tag = True [bumpversion:file:pyproject.toml] -[bumpversion:file:docs/conf.py] +[bumpversion:file:docs-sphinx/conf.py] [bumpversion:file:src/protean/__init__.py] [bumpversion:file:src/protean/template/{{package_name}}/setup.py.jinja] -[bumpversion:file:docs/user/installation.rst] +[bumpversion:file:docs-sphinx/user/installation.rst] diff --git a/.editorconfig b/.editorconfig index 5d8cda6d..cbdfe491 100644 --- a/.editorconfig +++ b/.editorconfig @@ -18,5 +18,5 @@ end_of_line = crlf [*.py] max_line_length = 119 -[docs/**.rst] +[docs-sphinx/**.rst] max_line_length = 119 diff --git a/.flake8 b/.flake8 index 468976ea..74f46851 100644 --- a/.flake8 +++ b/.flake8 @@ -7,7 +7,7 @@ exclude = .tox, .git, __pycache__, - docs/source/conf.py, + docs-sphinx/source/conf.py, build, dist, conftest.py, diff --git a/.gitignore b/.gitignore index d34515a3..71a2d4c6 100644 --- a/.gitignore +++ b/.gitignore @@ -66,7 +66,7 @@ instance/ .scrapy # Sphinx documentation -docs/_build/ +docs-sphinx/_build/ # PyBuilder target/ @@ -136,7 +136,7 @@ output/*/index.html .vscode # Sphinx -docs/.doctrees +docs-sphinx/.doctrees # TODOs TODO diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 80e38133..140db4a8 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -11,12 +11,12 @@ build: tools: python: "3.11" -# Build documentation in the docs/ directory with Sphinx +# Build documentation in the docs-sphinx/ directory with Sphinx sphinx: - configuration: docs/conf.py + configuration: docs-sphinx/conf.py # Explicitly set the version of Python and its requirements # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html python: install: - - requirements: docs/requirements.txt \ No newline at end of file + - requirements: docs-sphinx/requirements.txt \ No newline at end of file diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index f29b0da1..9aea609a 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -207,7 +207,7 @@ Read more about `coverage `__. Building the docs ````````````````` -Build the docs in the ``docs`` directory using Sphinx. +Build the docs in the ``docs-sphinx`` directory using Sphinx. .. code-block:: text diff --git a/Makefile b/Makefile index 8fcd8b36..5459845a 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ down: docker-compose down --remove-orphans html: - @cd docs; $(MAKE) html + @cd docs-sphinx; $(MAKE) html test-full: up protean test diff --git a/docs/Makefile b/docs-sphinx/Makefile similarity index 100% rename from docs/Makefile rename to docs-sphinx/Makefile diff --git a/docs/adapters/database.rst b/docs-sphinx/adapters/database.rst similarity index 100% rename from docs/adapters/database.rst rename to docs-sphinx/adapters/database.rst diff --git a/docs/api.rst b/docs-sphinx/api.rst similarity index 100% rename from docs/api.rst rename to docs-sphinx/api.rst diff --git a/docs/community/changelog.rst b/docs-sphinx/community/changelog.rst similarity index 100% rename from docs/community/changelog.rst rename to docs-sphinx/community/changelog.rst diff --git a/docs/community/code-of-conduct.rst b/docs-sphinx/community/code-of-conduct.rst similarity index 100% rename from docs/community/code-of-conduct.rst rename to docs-sphinx/community/code-of-conduct.rst diff --git a/docs/community/contributing.rst b/docs-sphinx/community/contributing.rst similarity index 100% rename from docs/community/contributing.rst rename to docs-sphinx/community/contributing.rst diff --git a/docs/conf.py b/docs-sphinx/conf.py similarity index 96% rename from docs/conf.py rename to docs-sphinx/conf.py index bfaeff0c..e6fdd284 100644 --- a/docs/conf.py +++ b/docs-sphinx/conf.py @@ -3,6 +3,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals +import datetime import os extensions = [ @@ -25,7 +26,7 @@ source_suffix = ".rst" master_doc = "index" project = "Protean" -year = "2021" +year = datetime.date.today().strftime("%Y") author = "Subhash Bhushan C" copyright = "{0}, {1}".format(year, author) version = release = "0.11.0" diff --git a/docs/images/consuming-events.jpg b/docs-sphinx/images/consuming-events.jpg similarity index 100% rename from docs/images/consuming-events.jpg rename to docs-sphinx/images/consuming-events.jpg diff --git a/docs/images/raising-events.jpg b/docs-sphinx/images/raising-events.jpg similarity index 100% rename from docs/images/raising-events.jpg rename to docs-sphinx/images/raising-events.jpg diff --git a/docs/index.rst b/docs-sphinx/index.rst similarity index 100% rename from docs/index.rst rename to docs-sphinx/index.rst diff --git a/docs/make.bat b/docs-sphinx/make.bat similarity index 100% rename from docs/make.bat rename to docs-sphinx/make.bat diff --git a/docs-sphinx/requirements.txt b/docs-sphinx/requirements.txt new file mode 100644 index 00000000..9a5ba035 --- /dev/null +++ b/docs-sphinx/requirements.txt @@ -0,0 +1,3 @@ +livereload = ">=2.6.3" +sphinx = ">=7.2.6" +sphinx-tabs = ">=3.4.4" \ No newline at end of file diff --git a/docs/static/custom.css b/docs-sphinx/static/custom.css similarity index 100% rename from docs/static/custom.css rename to docs-sphinx/static/custom.css diff --git a/docs/user/cli.rst b/docs-sphinx/user/cli.rst similarity index 100% rename from docs/user/cli.rst rename to docs-sphinx/user/cli.rst diff --git a/docs/user/composing-a-domain.rst b/docs-sphinx/user/composing-a-domain.rst similarity index 100% rename from docs/user/composing-a-domain.rst rename to docs-sphinx/user/composing-a-domain.rst diff --git a/docs/user/config.rst b/docs-sphinx/user/config.rst similarity index 100% rename from docs/user/config.rst rename to docs-sphinx/user/config.rst diff --git a/docs/user/domain-definition.rst b/docs-sphinx/user/domain-definition.rst similarity index 100% rename from docs/user/domain-definition.rst rename to docs-sphinx/user/domain-definition.rst diff --git a/docs/user/entities-and-vos.rst b/docs-sphinx/user/entities-and-vos.rst similarity index 100% rename from docs/user/entities-and-vos.rst rename to docs-sphinx/user/entities-and-vos.rst diff --git a/docs/user/event-sourcing.rst b/docs-sphinx/user/event-sourcing.rst similarity index 100% rename from docs/user/event-sourcing.rst rename to docs-sphinx/user/event-sourcing.rst diff --git a/docs/user/eventing.rst b/docs-sphinx/user/eventing.rst similarity index 100% rename from docs/user/eventing.rst rename to docs-sphinx/user/eventing.rst diff --git a/docs/user/fields.rst b/docs-sphinx/user/fields.rst similarity index 100% rename from docs/user/fields.rst rename to docs-sphinx/user/fields.rst diff --git a/docs/user/foreword.rst b/docs-sphinx/user/foreword.rst similarity index 100% rename from docs/user/foreword.rst rename to docs-sphinx/user/foreword.rst diff --git a/docs/user/installation.rst b/docs-sphinx/user/installation.rst similarity index 100% rename from docs/user/installation.rst rename to docs-sphinx/user/installation.rst diff --git a/docs/user/persistence.rst b/docs-sphinx/user/persistence.rst similarity index 100% rename from docs/user/persistence.rst rename to docs-sphinx/user/persistence.rst diff --git a/docs/user/quickstart.rst b/docs-sphinx/user/quickstart.rst similarity index 100% rename from docs/user/quickstart.rst rename to docs-sphinx/user/quickstart.rst diff --git a/docs/user/services.rst b/docs-sphinx/user/services.rst similarity index 100% rename from docs/user/services.rst rename to docs-sphinx/user/services.rst diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 142b6ca3..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e .[docs] diff --git a/src/protean/cli.py b/src/protean/cli.py index 9152ee3c..89464fca 100644 --- a/src/protean/cli.py +++ b/src/protean/cli.py @@ -267,7 +267,7 @@ def livereload_docs(): from livereload import Server, shell server = Server() - server.watch("docs/**/*.rst", shell("make html")) + server.watch("docs-sphinx/**/*.rst", shell("make html")) server.watch("./*.rst", shell("make html")) server.serve(root="build/html", debug=True) diff --git a/tox.ini b/tox.ini index 3f5bb349..8c99f7b2 100644 --- a/tox.ini +++ b/tox.ini @@ -34,19 +34,19 @@ commands = setenv = SPELLCHECK=1 commands = - sphinx-build -b spelling docs dist/docs + sphinx-build -b spelling docs-sphinx docs-sphinx/docs skip_install = true deps = - -r{toxinidir}/docs/requirements.txt + -r{toxinidir}/docs-sphinx/requirements.txt sphinxcontrib-spelling pyenchant [testenv:docs] deps = - -r{toxinidir}/docs/requirements.txt + -r{toxinidir}/docs-sphinx/requirements.txt commands = - sphinx-build {posargs:-E} -b html docs dist/docs - sphinx-build -b linkcheck docs dist/docs + sphinx-build {posargs:-E} -b html docs-sphinx dist/docs-sphinx + sphinx-build -b linkcheck docs-sphinx dist/docs-sphinx [testenv:check] deps =