fix part of warnings for sphinx

This commit is contained in:
Evgenii Alekseev 2022-04-17 06:55:31 +03:00
parent e2f7e9cf28
commit 3016a919c5
8 changed files with 70 additions and 64 deletions

View File

@ -35,25 +35,25 @@ class JinjaTemplate:
It uses jinja2 templates for report generation, the following variables are allowed:
homepage - link to homepage, string, optional
link_path - prefix fo packages to download, string, required
has_package_signed - True in case if package sign enabled, False otherwise, required
has_repo_signed - True in case if repository database sign enabled, False otherwise, required
packages - sorted list of packages properties, required
* architecture, string
* archive_size, pretty printed size, string
* build_date, pretty printed datetime, string
* depends, sorted list of strings
* description, string
* filename, string,
* groups, sorted list of strings
* installed_size, pretty printed datetime, string
* licenses, sorted list of strings
* name, string
* url, string
* version, string
pgp_key - default PGP key ID, string, optional
repository - repository name, string, required
* homepage - link to homepage, string, optional
* link_path - prefix fo packages to download, string, required
* has_package_signed - True in case if package sign enabled, False otherwise, required
* has_repo_signed - True in case if repository database sign enabled, False otherwise, required
* packages - sorted list of packages properties, required
* architecture, string
* archive_size, pretty printed size, string
* build_date, pretty printed datetime, string
* depends, sorted list of strings
* description, string
* filename, string,
* groups, sorted list of strings
* installed_size, pretty printed datetime, string
* licenses, sorted list of strings
* name, string
* url, string
* version, string
* pgp_key - default PGP key ID, string, optional
* repository - repository name, string, required
Attributes:
homepage(Optional[str]): homepage link if any (for footer)

View File

@ -34,30 +34,30 @@ class IndexView(BaseView):
It uses jinja2 templates for report generation, the following variables are allowed:
architecture - repository architecture, string, required
auth - authorization descriptor, required
* authenticated - alias to check if user can see the page, boolean, required
* control - HTML to insert for login control, HTML string, required
* enabled - whether authorization is enabled by configuration or not, boolean, required
* username - authenticated username if any, string, null means not authenticated
index_url - url to the repository index, string, optional
packages - sorted list of packages properties, required
* base, string
* depends, sorted list of strings
* groups, sorted list of strings
* licenses, sorted list of strings
* packages, sorted list of strings
* status, string based on enum value
* status_color, string based on enum value
* timestamp, pretty printed datetime, string
* version, string
* web_url, string
repository - repository name, string, required
service - service status properties, required
* status, string based on enum value
* status_color, string based on enum value
* timestamp, pretty printed datetime, string
version - ahriman version, string, required
* architecture - repository architecture, string, required
* auth - authorization descriptor, required
* authenticated - alias to check if user can see the page, boolean, required
* control - HTML to insert for login control, HTML string, required
* enabled - whether authorization is enabled by configuration or not, boolean, required
* username - authenticated username if any, string, null means not authenticated
* index_url - url to the repository index, string, optional
* packages - sorted list of packages properties, required
* base, string
* depends, sorted list of strings
* groups, sorted list of strings
* licenses, sorted list of strings
* packages, sorted list of strings
* status, string based on enum value
* status_color, string based on enum value
* timestamp, pretty printed datetime, string
* version, string
* web_url, string
* repository - repository name, string, required
* service - service status properties, required
* status, string based on enum value
* status_color, string based on enum value
* timestamp, pretty printed datetime, string
* version - ahriman version, string, required
Attributes:
GET_PERMISSION(UserAccess): (class attribute) get permissions of self

View File

@ -38,9 +38,10 @@ class AddView(BaseView):
add new package
JSON body must be supplied, the following model is used:
{
"packages": "ahriman" # either list of packages or package name as in AUR
}
>>> {
>>> "packages": "ahriman" # either list of packages or package name as in AUR
>>> }
Raises:
HTTPBadRequest: if bad data is supplied

View File

@ -38,9 +38,10 @@ class RemoveView(BaseView):
remove existing packages
JSON body must be supplied, the following model is used:
{
"packages": "ahriman", # either list of packages or package name
}
>>> {
>>> "packages": "ahriman", # either list of packages or package name
>>> }
Raises:
HTTPBadRequest: if bad data is supplied

View File

@ -38,9 +38,10 @@ class RequestView(BaseView):
request to add new package
JSON body must be supplied, the following model is used:
{
"packages": "ahriman" # either list of packages or package name as in AUR
}
>>> {
>>> "packages": "ahriman" # either list of packages or package name as in AUR
>>> }
Raises:
HTTPBadRequest: if bad data is supplied

View File

@ -51,9 +51,10 @@ class AhrimanView(BaseView):
update service status
JSON body must be supplied, the following model is used:
{
"status": "unknown", # service status string, must be valid `BuildStatusEnum`
}
>>> {
>>> "status": "unknown", # service status string, must be valid `BuildStatusEnum`
>>> }
Raises:
HTTPBadRequest: if bad data is supplied

View File

@ -82,11 +82,12 @@ class PackageView(BaseView):
update package build status
JSON body must be supplied, the following model is used:
{
"status": "unknown", # package build status string, must be valid `BuildStatusEnum`
"package": {} # package body (use `dataclasses.asdict` to generate one), optional.
# Must be supplied in case if package base is unknown
}
>>> {
>>> "status": "unknown", # package build status string, must be valid `BuildStatusEnum`
>>> "package": {} # package body (use `dataclasses.asdict` to generate one), optional.
>>> # Must be supplied in case if package base is unknown
>>> }
Raises:
HTTPBadRequest: if bad data is supplied

View File

@ -72,10 +72,11 @@ class LoginView(BaseView):
login user to service
either JSON body or form data must be supplied the following fields are required:
{
"username": "username" # username to use for login
"password": "pa55w0rd" # password to use for login
}
>>> {
>>> "username": "username" # username to use for login
>>> "password": "pa55w0rd" # password to use for login
>>> }
Raises:
HTTPFound: on success response