Compare commits

..

4 Commits

Author SHA1 Message Date
33e9fea47c Docs update (#61)
* Improve sphinx documentation

* update faq formatting

* fix setup doc

* fix docs according to the generated htmls
2022-05-06 02:54:37 +03:00
304690e0d0 correct archllinux wording in readme 2022-05-06 02:54:37 +03:00
3d9fae5415 add __all__ attribute 2022-05-06 02:54:37 +03:00
b7dca2d797 add note about ahriman to index page 2022-05-06 02:54:37 +03:00
7 changed files with 27 additions and 9 deletions

View File

@ -43,7 +43,6 @@ push: spec archlinux
spec: spec:
# make sure that old files are removed # make sure that old files are removed
find docs -type f -name "$(PROJECT)*.rst" -delete find docs -type f -name "$(PROJECT)*.rst" -delete
rm -f docs/modules.rst
tox -e docs tox -e docs
spec-html: spec spec-html: spec

View File

@ -13,7 +13,7 @@ Packages have strict rules of importing:
Full dependency diagram: Full dependency diagram:
.. image:: ahriman-architecture.svg .. image:: ahriman-architecture.svg
:target: ahriman-architecture.svg :target: _images/ahriman-architecture.svg
:alt: architecture :alt: architecture
``ahriman.application`` package ``ahriman.application`` package
@ -178,7 +178,7 @@ Mapping (aka configuration) provider uses hashed passwords with salt from the da
Passwords must be stored in database as ``hash(password + salt)``\ , where ``password`` is user defined password (taken from user input), ``salt`` is random string (any length) defined globally in configuration and ``hash`` is secure hash function. Thus, the following configuration Passwords must be stored in database as ``hash(password + salt)``\ , where ``password`` is user defined password (taken from user input), ``salt`` is random string (any length) defined globally in configuration and ``hash`` is secure hash function. Thus, the following configuration
.. code-block:: csv .. code-block::
"username","password","access" "username","password","access"
"username","$6$rounds=656000$mWBiecMPrHAL1VgX$oU4Y5HH8HzlvMaxwkNEJjK13ozElyU1wAHBoO/WW5dAaE4YEfnB0X3FxbynKMl4FBdC3Ovap0jINz4LPkNADg0","read" "username","$6$rounds=656000$mWBiecMPrHAL1VgX$oU4Y5HH8HzlvMaxwkNEJjK13ozElyU1wAHBoO/WW5dAaE4YEfnB0X3FxbynKMl4FBdC3Ovap0jINz4LPkNADg0","read"

View File

@ -14,14 +14,32 @@ import os
import sys import sys
from pathlib import Path from pathlib import Path
from unittest import mock
from ahriman.version import __version__
basedir = Path(__file__).resolve().parent.parent / "src" basedir = Path(__file__).resolve().parent.parent / "src"
sys.path.insert(0, str(basedir)) sys.path.insert(0, str(basedir))
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
from ahriman.version import __version__ for module in (
on_rtd = os.environ.get('READTHEDOCS', None) == 'True' "aioauth_client",
"aiohttp",
"aiohttp.web",
"aiohttp.web_exceptions",
"aiohttp.web_response",
"aiohttp.web_urldispatcher",
"aiohttp_jinja2",
"aiohttp_security",
"aiohttp_session",
"aiohttp_session.cookie_storage",
"boto3",
"cryptography",
"pyalpm",
):
sys.modules[module] = mock.Mock()
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------

View File

@ -27,6 +27,7 @@ Contents
faq faq
architecture architecture
advanced-usage advanced-usage
modules
Indices and tables Indices and tables
------------------ ------------------

View File

@ -1,5 +1,5 @@
src Modules
=== =======
.. toctree:: .. toctree::
:maxdepth: 4 :maxdepth: 4

View File

@ -86,7 +86,7 @@ SigLevel = Database{% if has_repo_signed %}Required{% else %}Never{% endif %} Pa
{% endif %} {% endif %}
</ul> </ul>
<ul class="nav"> <ul class="nav">
<li><a class="nav-link" href="https://github.com/arcan1s/ahriman" title="sources">powered by ahriman</a></li> <li><a class="nav-link" href="https://github.com/arcan1s/ahriman" title="sources">ahriman</a></li>
</ul> </ul>
</footer> </footer>
</div> </div>

View File

@ -37,7 +37,7 @@ setenv =
commands = commands =
argparse-manpage --module ahriman.application.ahriman --function _parser --author "ahriman team" --project-name ahriman --author-email "" --url https://github.com/arcan1s/ahriman --output ../docs/ahriman.1 argparse-manpage --module ahriman.application.ahriman --function _parser --author "ahriman team" --project-name ahriman --author-email "" --url https://github.com/arcan1s/ahriman --output ../docs/ahriman.1
pydeps ahriman -o ../docs/ahriman-architecture.svg --no-config --no-show --cluster pydeps ahriman -o ../docs/ahriman-architecture.svg --no-config --no-show --cluster
sphinx-apidoc --force -o ../docs . sphinx-apidoc -o ../docs .
[testenv:docs-html] [testenv:docs-html]
deps = deps =