From f54604fc140f10f65e85787fb07d5524e3809ec9 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Thu, 8 Aug 2024 21:29:02 -0400 Subject: [PATCH 1/6] Fix the bug in the docs step of the publishing job --- .github/workflows/publishing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publishing.yml b/.github/workflows/publishing.yml index c8eabbab..63247568 100644 --- a/.github/workflows/publishing.yml +++ b/.github/workflows/publishing.yml @@ -115,8 +115,8 @@ jobs: - uses: actions/setup-python@v4 with: python-version: 3.12 - - run: pip install -r requirements-doc.txt - run: pip install awscli + - run: pip install -r requirements-doc.txt - run: pip install -e . - run: (cd docs && make clean html) - run: | From 39ac098ca270e0262ab172a0d5e6c786954c7816 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Mon, 9 Sep 2024 21:52:11 -0400 Subject: [PATCH 2/6] Fix the Disqus comment widget --- docs/conf.py | 2 +- docs/main/changelog.rst | 5 +++++ requirements-doc.txt | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 5e4769ae..3a6f1db3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -33,7 +33,7 @@ extensions = [ "alabaster", "sphinx.ext.autodoc", - "sphinxcontrib.disqus", + "sphinx_disqus.disqus", ] # Add any paths that contain templates here, relative to this directory. diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index f3289210..37cbd7fb 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -7,6 +7,11 @@ that were made in every particular version. From version 0.7.6 *Dependency Injector* framework strictly follows `Semantic versioning`_ +4.42.0 +-------- +- Promote release ``4.42.0b1`` to a production release. +- Fix the Disqus comment widget. + 4.42.0b1 -------- diff --git a/requirements-doc.txt b/requirements-doc.txt index 292c0cba..1c520497 100644 --- a/requirements-doc.txt +++ b/requirements-doc.txt @@ -4,6 +4,6 @@ sphinx # TODO: unpin jinja2 after sphinx update to 4+ jinja2 --e git+https://github.com/rmk135/sphinxcontrib-disqus.git#egg=sphinxcontrib-disqus +sphinx-disqus==1.3.0 -r requirements-ext.txt From 46034cbeb1871b80beacdd70ccb3d1f2cabbe12c Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Mon, 9 Sep 2024 21:53:37 -0400 Subject: [PATCH 3/6] Update the copuright in the docs --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 3a6f1db3..497c28a5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -52,7 +52,7 @@ # General information about the project. project = "Dependency Injector" -copyright = "2022, Roman Mogylatov" +copyright = "2024, Roman Mogylatov" author = "Roman Mogylatov" # The version info for the project you"re documenting, acts as replacement for From 4bda5105c204d01888a2a19e152841e43aad0954 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Mon, 9 Sep 2024 22:22:09 -0400 Subject: [PATCH 4/6] Remove obsolete disqus javascript file --- docs/_static/disqus.js | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 docs/_static/disqus.js diff --git a/docs/_static/disqus.js b/docs/_static/disqus.js deleted file mode 100644 index fbd2644f..00000000 --- a/docs/_static/disqus.js +++ /dev/null @@ -1,11 +0,0 @@ -var disqus_shortname; -var disqus_identifier; - -$(function() { - var disqus_thread = $("#disqus_thread"); - disqus_shortname = disqus_thread.data('disqus-shortname'); - disqus_identifier = disqus_thread.data('disqus-identifier'); - var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; - dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; - (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); -}); From 938091b6ea3878fc2d97f1e6cfe431a71bbe0a20 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Mon, 9 Sep 2024 22:23:19 -0400 Subject: [PATCH 5/6] Add Github Sponsors button --- docs/_static/custom.css | 9 +++++++++ docs/_static/sponsor.html | 1 + docs/conf.py | 4 ++++ docs/examples/aiohttp.rst | 2 ++ docs/examples/application-multiple-containers.rst | 2 ++ docs/examples/application-single-container.rst | 2 ++ docs/examples/boto3.rst | 2 ++ docs/examples/decoupled-packages.rst | 2 ++ docs/examples/django.rst | 2 ++ docs/examples/fastapi-redis.rst | 2 ++ docs/examples/fastapi-sqlalchemy.rst | 2 ++ docs/examples/fastapi.rst | 2 ++ docs/examples/flask-blueprints.rst | 2 ++ docs/examples/flask.rst | 2 ++ docs/examples/sanic.rst | 2 ++ docs/index.rst | 10 +++++----- docs/introduction/di_in_python.rst | 2 ++ docs/sponsor.rst | 7 +++++++ docs/tutorials/aiohttp.rst | 2 ++ docs/tutorials/asyncio-daemon.rst | 2 ++ docs/tutorials/cli.rst | 2 ++ docs/tutorials/flask.rst | 1 + 22 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 docs/_static/custom.css create mode 100644 docs/_static/sponsor.html create mode 100644 docs/sponsor.rst diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 00000000..ad112595 --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,9 @@ +.no-border { + border: 0 !important; + box-shadow: none !important; + -webkit-box-shadow: none !important; +} +.no-border td { + border: 0px !important; + padding: 0px 10px 0px 0px !important; +} diff --git a/docs/_static/sponsor.html b/docs/_static/sponsor.html new file mode 100644 index 00000000..474f3ec0 --- /dev/null +++ b/docs/_static/sponsor.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 497c28a5..380da2da 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -147,6 +147,9 @@ # 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_css_files = [ + "custom.css", +] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied @@ -306,4 +309,5 @@ "description": "Dependency injection framework for Python by Roman Mogylatov", "code_font_size": "10pt", "analytics_id": "UA-67012059-1", + "donate_url": "https://github.com/sponsors/rmk135", } diff --git a/docs/examples/aiohttp.rst b/docs/examples/aiohttp.rst index a9446fe8..7600b282 100644 --- a/docs/examples/aiohttp.rst +++ b/docs/examples/aiohttp.rst @@ -78,4 +78,6 @@ Sources Explore the sources on the `Github `_. +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/examples/application-multiple-containers.rst b/docs/examples/application-multiple-containers.rst index d49f999a..4cc0921b 100644 --- a/docs/examples/application-multiple-containers.rst +++ b/docs/examples/application-multiple-containers.rst @@ -84,4 +84,6 @@ Run the application You can find the source code and instructions for running on the `Github `_. +.. include:: ../sponsor.rst + .. disqus:: \ No newline at end of file diff --git a/docs/examples/application-single-container.rst b/docs/examples/application-single-container.rst index 2f6c1c42..526a08e1 100644 --- a/docs/examples/application-single-container.rst +++ b/docs/examples/application-single-container.rst @@ -90,4 +90,6 @@ Run the application You can find the source code and instructions for running on the `Github `_. +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/examples/boto3.rst b/docs/examples/boto3.rst index 8ca76724..21d07c4b 100644 --- a/docs/examples/boto3.rst +++ b/docs/examples/boto3.rst @@ -17,4 +17,6 @@ Listing of ``boto3_session_example.py``: .. literalinclude:: ../../examples/miniapps/boto3-session/boto3_session_example.py :language: python +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/examples/decoupled-packages.rst b/docs/examples/decoupled-packages.rst index abb4c6ab..12375a67 100644 --- a/docs/examples/decoupled-packages.rst +++ b/docs/examples/decoupled-packages.rst @@ -129,4 +129,6 @@ Run the application You can find the source code and instructions for running on the `Github `_. +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/examples/django.rst b/docs/examples/django.rst index 15fa0520..08e6e757 100644 --- a/docs/examples/django.rst +++ b/docs/examples/django.rst @@ -94,4 +94,6 @@ Sources Explore the sources on the `Github `_. +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/examples/fastapi-redis.rst b/docs/examples/fastapi-redis.rst index 2e120cc8..abde9289 100644 --- a/docs/examples/fastapi-redis.rst +++ b/docs/examples/fastapi-redis.rst @@ -95,4 +95,6 @@ See also: - Resource provider :ref:`resource-async-initializers` - Wiring :ref:`async-injections-wiring` +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/examples/fastapi-sqlalchemy.rst b/docs/examples/fastapi-sqlalchemy.rst index 653fd50f..398bc148 100644 --- a/docs/examples/fastapi-sqlalchemy.rst +++ b/docs/examples/fastapi-sqlalchemy.rst @@ -116,4 +116,6 @@ Sources The source code is available on the `Github `_. +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/examples/fastapi.rst b/docs/examples/fastapi.rst index eaa51b78..fcd92500 100644 --- a/docs/examples/fastapi.rst +++ b/docs/examples/fastapi.rst @@ -76,4 +76,6 @@ Sources Explore the sources on the `Github `_. +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/examples/flask-blueprints.rst b/docs/examples/flask-blueprints.rst index c3a8f14f..53d7ba5f 100644 --- a/docs/examples/flask-blueprints.rst +++ b/docs/examples/flask-blueprints.rst @@ -86,4 +86,6 @@ Sources Explore the sources on the `Github `_. +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/examples/flask.rst b/docs/examples/flask.rst index a1a312b2..59d84ccc 100644 --- a/docs/examples/flask.rst +++ b/docs/examples/flask.rst @@ -84,4 +84,6 @@ Sources Explore the sources on the `Github `_. +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/examples/sanic.rst b/docs/examples/sanic.rst index 3688e80f..5eca88d3 100644 --- a/docs/examples/sanic.rst +++ b/docs/examples/sanic.rst @@ -77,4 +77,6 @@ Sources Explore the sources on the `Github `_. +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/index.rst b/docs/index.rst index 93203043..33b6e9b0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,11 +9,11 @@ Dependency Injector --- Dependency injection framework for Python :description: Dependency Injector is a dependency injection framework for Python. It helps to maintain you application structure. It was designed to be unified, developer-friendly - tool that helps to implement dependency injection design - pattern in formal, pretty, Pythonic way. Dependency Injector - provides implementations of such popular design patterns - like IoC container, Factory and Singleton. Dependency - Injector providers are implemented as C extension types + tool that helps to implement dependency injection design + pattern in formal, pretty, Pythonic way. Dependency Injector + provides implementations of such popular design patterns + like IoC container, Factory and Singleton. Dependency + Injector providers are implemented as C extension types using Cython. .. _index: diff --git a/docs/introduction/di_in_python.rst b/docs/introduction/di_in_python.rst index 5e300840..08d911b1 100644 --- a/docs/introduction/di_in_python.rst +++ b/docs/introduction/di_in_python.rst @@ -310,4 +310,6 @@ A few useful links related to a dependency injection design pattern for further + https://github.com/ets-labs/python-dependency-injector + https://pypi.org/project/dependency-injector/ +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/sponsor.rst b/docs/sponsor.rst new file mode 100644 index 00000000..590abd15 --- /dev/null +++ b/docs/sponsor.rst @@ -0,0 +1,7 @@ +.. list-table:: + :class: no-border + :align: left + + * - Sponsor the project on GitHub: + - .. raw:: html + :file: _static/sponsor.html diff --git a/docs/tutorials/aiohttp.rst b/docs/tutorials/aiohttp.rst index f77bb4d8..57b1c959 100644 --- a/docs/tutorials/aiohttp.rst +++ b/docs/tutorials/aiohttp.rst @@ -859,4 +859,6 @@ What's next? - Know more about the :ref:`providers` - Go to the :ref:`contents` +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/tutorials/asyncio-daemon.rst b/docs/tutorials/asyncio-daemon.rst index 5e641739..0c6d552a 100644 --- a/docs/tutorials/asyncio-daemon.rst +++ b/docs/tutorials/asyncio-daemon.rst @@ -1028,4 +1028,6 @@ What's next? - Know more about the :ref:`providers` - Go to the :ref:`contents` +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/tutorials/cli.rst b/docs/tutorials/cli.rst index 4f33d31e..8b108e08 100644 --- a/docs/tutorials/cli.rst +++ b/docs/tutorials/cli.rst @@ -1034,4 +1034,6 @@ What's next? - Know more about the :ref:`providers` - Go to the :ref:`contents` +.. include:: ../sponsor.rst + .. disqus:: diff --git a/docs/tutorials/flask.rst b/docs/tutorials/flask.rst index a0075502..8c22aa5a 100644 --- a/docs/tutorials/flask.rst +++ b/docs/tutorials/flask.rst @@ -998,5 +998,6 @@ What's next? - Know more about the :ref:`providers` - Go to the :ref:`contents` +.. include:: ../sponsor.rst .. disqus:: From 7a88a8ee8d6c0bdb0956634ae37905238d6b2f01 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Mon, 9 Sep 2024 22:23:27 -0400 Subject: [PATCH 6/6] Update version --- src/dependency_injector/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dependency_injector/__init__.py b/src/dependency_injector/__init__.py index 42f7dbe2..a179668b 100644 --- a/src/dependency_injector/__init__.py +++ b/src/dependency_injector/__init__.py @@ -1,6 +1,6 @@ """Top-level package.""" -__version__ = "4.42.0b1" +__version__ = "4.42.0" """Version number. :type: str