start create docs

This commit is contained in:
2025-10-14 22:34:19 +03:00
parent a5e72161ef
commit 0fca3af35d
129 changed files with 10325 additions and 381 deletions
View File
@@ -0,0 +1,4 @@
.. _Autocompleter:
Autocompleter
****************
@@ -0,0 +1,4 @@
.. _DividingLines:
DividingLines
****************
@@ -0,0 +1,4 @@
.. _DividingLines:
DividingLines
****************
+6
View File
@@ -0,0 +1,6 @@
App
****************
.. toctree::
Autocompleter
DividingLines
View File
+4
View File
@@ -0,0 +1,4 @@
.. _Flags:
Flags
****************
@@ -0,0 +1,4 @@
.. _PossibleValues:
Input
****************
@@ -0,0 +1,6 @@
.. _PossibleValues:
PossibleValues
****************
mda
@@ -0,0 +1,6 @@
.. _ValidationStatus:
ValidationStatus
****************
case
+7
View File
@@ -0,0 +1,7 @@
Command
****************
.. toctree::
Flags
PossibleValues
ValidationStatus
@@ -0,0 +1,6 @@
.. _Argparser:
Argparser
****************
nu
@@ -0,0 +1,6 @@
.. _Arguments:
Arguments
****************
prikol
@@ -0,0 +1,6 @@
Orchestrator
****************
.. toctree::
Argparser
Arguments
@@ -0,0 +1,6 @@
.. _Argparser:
Argparser
****************
nu
@@ -0,0 +1,6 @@
.. _Arguments:
Arguments
****************
prikol
@@ -0,0 +1,6 @@
Orchestrator
****************
.. toctree::
Argparser
Arguments
+4
View File
@@ -0,0 +1,4 @@
.. _Response:
Response
****************
+4
View File
@@ -0,0 +1,4 @@
.. _Router:
Router
****************
+9
View File
@@ -0,0 +1,9 @@
Public API
****************
.. toctree::
App/index
Router
Orchestrator/index
Command/index
Response
+119
View File
@@ -0,0 +1,119 @@
Contributing
***************************
``dishka`` is an opensource project and we are welcome the new developers to join us.
Getting started
========================
1. Clone project:
.. code-block::
git clone git@github.com:reagento/dishka.git
cd dishka
2. Create and activate virtual environment:
.. code-block::
python3 -m venv .venv
source .venv/bin/activate
3. Install development tools and project itself:
.. code-block::
pip install -r requirements_dev.txt
uv pip install -e .
Running linters
=====================
Currently we use ``ruff`` to check code. To run it do
.. code-block::
ruff check
We do not use ruff formatter for all code, so ensure that you formatted only your part of code proposing new changes.
We have a lot of checks enabled and some of them can be false positive. Double check your code before suppressing any linter warning.
Running type checker
=====================
Currently we use ``mypy`` to check types. To run it do
.. code-block::
mypy
Running tests
========================
Project contains several types of tests:
* unit tests of library itself
* integration with other libraries
* tests of example app.
All of them can be run using nox:
.. code-block::
nox
You can run integration tests for all specified versions of library:
.. code-block::
nox -t aiohttp
All integration tests are using specific versions of libraries by default. You can run them with latest version specifying it explicitly. E.g.:
.. code-block::
nox -s aiohttp_latest
All requirement files for tests are located in ``/requirements`` dir
Building documentation
==============================
Documentation is created using sphinx. First of all you might need ``make`` installed on your system.
Then install documentation requirements:
.. code-block::
pip install -r requirements_doc.txt
Compile docs:
.. code-block::
sphinx-build -M html docs docs-build -W
Open file ``docs-build/html/index.html`` in your browser
Running security audit for GitHub Actions
==========================================
We use ``zizmor`` to audit our GitHub Actions workflows for security issues. To run it locally:
.. code-block::
zizmor .github
Submitting changes
============================
We welcome new contributors, but we want to keep the library design as simple as possible, so new approaches may require some discussion. Here are some requirements:
1. Compatibility matters. If proposed changes introduce new parameters, they should not be required. Changes in behavior can be introduced under a toggle.
2. Bugfixes are always welcome.
3. New features should be discussed beforehand. They should not exceed the scope of the IoC container and should fit into the overall API design.
4. New integrations are never accepted into the library. You are free to publish them as a separate project.
5. New translations are accepted if we have at least three (3) maintainers who are eager to support them and can translate all documentation changes in a short period.
When submitting new pull request, ensure that you have run all tests and linters.
+20 -8
View File
@@ -3,15 +3,27 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Argenta documentation
=====================
Add your content using ``reStructuredText`` syntax. See the
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
documentation for details.
Argenta
=============================================
Cute DI framework with scopes and agreeable API.
.. toctree::
:maxdepth: 2
:caption: Contents:
:hidden:
:caption: Contents:
quickstart
api/index
.. toctree::
:hidden:
:caption: For developers:
contributing
.. toctree::
:hidden:
:caption: Project Links
GitHub <https://github.com/koloideal/argenta>
PyPI <https://pypi.org/project/argenta>
+8
View File
@@ -0,0 +1,8 @@
Quickstart
********************
1. **Install Argenta**
.. code-block:: shell
pip install argenta