diff --git a/docs/_static/disqus.js b/docs/_static/disqus.js new file mode 100644 index 00000000..881ab6de --- /dev/null +++ b/docs/_static/disqus.js @@ -0,0 +1,10 @@ +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); +}})(); diff --git a/docs/api/containers.rst b/docs/api/containers.rst index 79678008..9433d480 100644 --- a/docs/api/containers.rst +++ b/docs/api/containers.rst @@ -4,3 +4,6 @@ .. automodule:: dependency_injector.containers :members: :special-members: + + +.. disqus:: diff --git a/docs/api/errors.rst b/docs/api/errors.rst index c37ad8f7..8c3d3036 100644 --- a/docs/api/errors.rst +++ b/docs/api/errors.rst @@ -3,3 +3,6 @@ .. automodule:: dependency_injector.errors :members: + + +.. disqus:: diff --git a/docs/api/providers.rst b/docs/api/providers.rst index b5f3ecc1..ef30f154 100644 --- a/docs/api/providers.rst +++ b/docs/api/providers.rst @@ -5,3 +5,6 @@ :members: :inherited-members: :show-inheritance: + + +.. disqus:: diff --git a/docs/api/top_level.rst b/docs/api/top_level.rst index e679d4de..8b9d52da 100644 --- a/docs/api/top_level.rst +++ b/docs/api/top_level.rst @@ -3,3 +3,6 @@ .. automodule:: dependency_injector :members: VERSION + + +.. disqus:: diff --git a/docs/conf.py b/docs/conf.py index 018f77c3..f310c444 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,7 +29,8 @@ sys.path.insert(0, os.path.abspath('..')) # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['sphinx.ext.autodoc'] +extensions = ['sphinx.ext.autodoc', + 'sphinxcontrib.disqus'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -140,7 +141,7 @@ html_theme = 'default' # 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 = [] +html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied @@ -298,3 +299,5 @@ texinfo_documents = [ #texinfo_no_detailmenu = False autodoc_member_order = 'bysource' + +disqus_shortname = 'python-dependency-injector' diff --git a/docs/containers/declarative.rst b/docs/containers/declarative.rst index 8d64c1ce..2f9f994c 100644 --- a/docs/containers/declarative.rst +++ b/docs/containers/declarative.rst @@ -53,3 +53,6 @@ Example of declarative containers's provider injections: .. literalinclude:: ../../examples/containers/declarative_injections.py :language: python :linenos: + + +.. disqus:: diff --git a/docs/containers/dynamic.rst b/docs/containers/dynamic.rst index ed296d4f..85224916 100644 --- a/docs/containers/dynamic.rst +++ b/docs/containers/dynamic.rst @@ -25,3 +25,6 @@ configuration: .. literalinclude:: ../../examples/containers/dynamic_runtime_creation.py :language: python :linenos: + + +.. disqus:: diff --git a/docs/containers/overriding.rst b/docs/containers/overriding.rst index 7937e46a..b2b501b1 100644 --- a/docs/containers/overriding.rst +++ b/docs/containers/overriding.rst @@ -38,3 +38,6 @@ properties that help to work with container overridings: :py:class:`DynamicContainer` has exactly the same functionality, except of :py:func:`override` decorator. + + +.. disqus:: diff --git a/docs/containers/specialization.rst b/docs/containers/specialization.rst index 3fb4dcd0..1c8c1bf0 100644 --- a/docs/containers/specialization.rst +++ b/docs/containers/specialization.rst @@ -22,3 +22,6 @@ as well: .. literalinclude:: ../../examples/containers/dynamic_provider_type.py :language: python :linenos: + + +.. disqus:: diff --git a/docs/examples/movie_lister.rst b/docs/examples/movie_lister.rst index c982746d..331c6abf 100644 --- a/docs/examples/movie_lister.rst +++ b/docs/examples/movie_lister.rst @@ -123,4 +123,8 @@ Listing of ``app_db_csv.py``: :language: python :linenos: + +.. disqus:: + + .. _GitHub: https://github.com/ets-labs/python-dependency-injector/tree/master/examples/miniapps/movie_lister diff --git a/docs/examples/services_miniapp.rst b/docs/examples/services_miniapp.rst index 33ea11ac..b274e8bc 100644 --- a/docs/examples/services_miniapp.rst +++ b/docs/examples/services_miniapp.rst @@ -71,3 +71,6 @@ Listing of ``run.py``: .. literalinclude:: ../../examples/miniapps/services/run.py :language: python :linenos: + + +.. disqus:: diff --git a/docs/introduction/di_in_python.rst b/docs/introduction/di_in_python.rst index 710d6f1e..81fa0dc1 100644 --- a/docs/introduction/di_in_python.rst +++ b/docs/introduction/di_in_python.rst @@ -129,3 +129,6 @@ using :doc:`Dependency Injector <../index>`: .. literalinclude:: ../../examples/miniapps/engines_cars/example_ioc_containers.py :language: python :linenos: + + +.. disqus:: diff --git a/docs/introduction/key_features.rst b/docs/introduction/key_features.rst index 0209c6ab..928da18b 100644 --- a/docs/introduction/key_features.rst +++ b/docs/introduction/key_features.rst @@ -43,3 +43,6 @@ Components of *Dependency Injector* framework could be used: Main idea of *Dependency Injector* framework is to be useful tool for the right thing. + + +.. disqus:: diff --git a/docs/introduction/structure.rst b/docs/introduction/structure.rst index c085138e..195b3d39 100644 --- a/docs/introduction/structure.rst +++ b/docs/introduction/structure.rst @@ -45,3 +45,6 @@ Containers could be: + Overridden by each other. + Copied from each other. + Extended. + + +.. disqus:: diff --git a/docs/introduction/what_is_di.rst b/docs/introduction/what_is_di.rst index 0f1cf595..fb9caa62 100644 --- a/docs/introduction/what_is_di.rst +++ b/docs/introduction/what_is_di.rst @@ -116,6 +116,9 @@ And `John Munsch`_ provided absolutely Great answer: down to eat. +.. disqus:: + + .. _Dependency injection: http://en.wikipedia.org/wiki/Dependency_injection .. _Inversion of control: https://en.wikipedia.org/wiki/Inversion_of_control .. _Dependency inversion: https://en.wikipedia.org/wiki/Dependency_inversion_principle diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index 83d77953..df4bcd66 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -470,4 +470,7 @@ Previous versions - While *Objects* was in alpha state, changes were not tracked. +.. disqus:: + + .. _Semantic versioning: http://semver.org/ diff --git a/docs/main/feedback.rst b/docs/main/feedback.rst index c5a60c18..dc51dae2 100644 --- a/docs/main/feedback.rst +++ b/docs/main/feedback.rst @@ -7,3 +7,6 @@ Feel free to post questions, bugs, feature requests, proposals etc. on https://github.com/ets-labs/python-dependency-injector/issues Your feedback is quite important! + + +.. disqus:: diff --git a/docs/main/installation.rst b/docs/main/installation.rst index b3956207..0ef7403e 100644 --- a/docs/main/installation.rst +++ b/docs/main/installation.rst @@ -40,3 +40,6 @@ Verification of currently installed version could be done using .. _PyPi: https://pypi.python.org/pypi/dependency_injector .. _GitHub: https://github.com/ets-labs/python-dependency-injector .. _GitHub releases page: https://github.com/ets-labs/python-dependency-injector/releases + + +.. disqus:: diff --git a/docs/providers/callable.rst b/docs/providers/callable.rst index 15857ca4..9497641f 100644 --- a/docs/providers/callable.rst +++ b/docs/providers/callable.rst @@ -56,3 +56,6 @@ Delegation of :py:class:`Callable` providers is the same as :ref:`factory_providers_delegation` section for examples (with exception about using :py:class:`DelegatedCallable` instead of :py:class:`DelegatedFactory`). + + +.. disqus:: diff --git a/docs/providers/custom.rst b/docs/providers/custom.rst index 7eb319a3..6cfdcbc3 100644 --- a/docs/providers/custom.rst +++ b/docs/providers/custom.rst @@ -33,3 +33,6 @@ Example: .. literalinclude:: ../../examples/providers/custom_factory.py :language: python :linenos: + + +.. disqus:: diff --git a/docs/providers/external_dependency.rst b/docs/providers/external_dependency.rst index 949622bb..94c845bb 100644 --- a/docs/providers/external_dependency.rst +++ b/docs/providers/external_dependency.rst @@ -40,3 +40,6 @@ Example: .. literalinclude:: ../../examples/providers/external_dependency.py :language: python :linenos: + + +.. disqus:: diff --git a/docs/providers/factory.rst b/docs/providers/factory.rst index 46c61ebf..e626f218 100644 --- a/docs/providers/factory.rst +++ b/docs/providers/factory.rst @@ -105,3 +105,6 @@ provided type: .. literalinclude:: ../../examples/providers/factory_provided_type.py :language: python :linenos: + + +.. disqus:: diff --git a/docs/providers/object.rst b/docs/providers/object.rst index f48a5ffc..00bae167 100644 --- a/docs/providers/object.rst +++ b/docs/providers/object.rst @@ -10,3 +10,6 @@ Example: .. literalinclude:: ../../examples/providers/object.py :language: python :linenos: + + +.. disqus:: diff --git a/docs/providers/overriding.rst b/docs/providers/overriding.rst index 9673050c..a21a9926 100644 --- a/docs/providers/overriding.rst +++ b/docs/providers/overriding.rst @@ -44,3 +44,6 @@ Example: .. literalinclude:: ../../examples/providers/overriding_users_model.py :language: python :linenos: + + +.. disqus:: diff --git a/docs/providers/singleton.rst b/docs/providers/singleton.rst index 81573319..0b3f00f4 100644 --- a/docs/providers/singleton.rst +++ b/docs/providers/singleton.rst @@ -98,3 +98,6 @@ Example: .. literalinclude:: ../../examples/providers/singleton_thread_locals.py :language: python :linenos: + + +.. disqus:: diff --git a/requirements-dev.txt b/requirements-dev.txt index 87d34508..598f82de 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,10 +1,6 @@ cython tox unittest2 -sphinx -sphinx_rtd_theme -sphinx_autobuild -autodoc coverage flake8 pydocstyle diff --git a/requirements-doc.txt b/requirements-doc.txt new file mode 100644 index 00000000..2a3b9cb6 --- /dev/null +++ b/requirements-doc.txt @@ -0,0 +1,5 @@ +sphinx +sphinx_rtd_theme +sphinx_autobuild +sphinxcontrib-disqus +autodoc