mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-04-12 04:43:38 +00:00
Compare commits
2 Commits
feature/br
...
09350e88ab
| Author | SHA1 | Date | |
|---|---|---|---|
| 09350e88ab | |||
| 2feaa14f46 |
1145
docs/_static/architecture.dot
vendored
1145
docs/_static/architecture.dot
vendored
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
pkgbase='ahriman'
|
pkgbase='ahriman'
|
||||||
pkgname=('ahriman' 'ahriman-core' 'ahriman-triggers' 'ahriman-web')
|
pkgname=('ahriman' 'ahriman-core' 'ahriman-triggers' 'ahriman-web')
|
||||||
pkgver=2.17.1
|
pkgver=2.18.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="ArcH linux ReposItory MANager"
|
pkgdesc="ArcH linux ReposItory MANager"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
|
|||||||
@@ -635,6 +635,7 @@ _set_new_action() {
|
|||||||
# ${!x} -> ${hello} -> "world"
|
# ${!x} -> ${hello} -> "world"
|
||||||
_shtab_ahriman() {
|
_shtab_ahriman() {
|
||||||
local completing_word="${COMP_WORDS[COMP_CWORD]}"
|
local completing_word="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
local previous_word="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
local completed_positional_actions
|
local completed_positional_actions
|
||||||
local current_action
|
local current_action
|
||||||
local current_action_args_start_index
|
local current_action_args_start_index
|
||||||
@@ -691,6 +692,10 @@ _shtab_ahriman() {
|
|||||||
if [[ $pos_only = 0 && "${completing_word}" == -* ]]; then
|
if [[ $pos_only = 0 && "${completing_word}" == -* ]]; then
|
||||||
# optional argument started: use option strings
|
# optional argument started: use option strings
|
||||||
COMPREPLY=( $(compgen -W "${current_option_strings[*]}" -- "${completing_word}") )
|
COMPREPLY=( $(compgen -W "${current_option_strings[*]}" -- "${completing_word}") )
|
||||||
|
elif [[ "${previous_word}" == ">" || "${previous_word}" == ">>" ||
|
||||||
|
"${previous_word}" =~ ^[12]">" || "${previous_word}" =~ ^[12]">>" ]]; then
|
||||||
|
# handle redirection operators
|
||||||
|
COMPREPLY=( $(compgen -f -- "${completing_word}") )
|
||||||
else
|
else
|
||||||
# use choices & compgen
|
# use choices & compgen
|
||||||
local IFS=$'\n' # items may contain spaces, so delimit using newline
|
local IFS=$'\n' # items may contain spaces, so delimit using newline
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.TH AHRIMAN "1" "2025\-01\-05" "ahriman" "Generated Python Manual"
|
.TH AHRIMAN "1" "2025\-06\-13" "ahriman" "Generated Python Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
ahriman
|
ahriman
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@@ -17,4 +17,4 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
__version__ = "2.17.1"
|
__version__ = "2.18.0"
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class Remote(SyncHttpClient):
|
|||||||
>>> package = AUR.info("ahriman")
|
>>> package = AUR.info("ahriman")
|
||||||
>>> search_result = Official.multisearch("pacman", "manager", pacman=pacman)
|
>>> search_result = Official.multisearch("pacman", "manager", pacman=pacman)
|
||||||
|
|
||||||
Differnece between :func:`search()` and :func:`multisearch()` is that :func:`search()` passes all arguments to
|
Difference between :func:`search()` and :func:`multisearch()` is that :func:`search()` passes all arguments to
|
||||||
underlying wrapper directly, whereas :func:`multisearch()` splits search one by one and finds intersection
|
underlying wrapper directly, whereas :func:`multisearch()` splits search one by one and finds intersection
|
||||||
between search results.
|
between search results.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class JinjaTemplate:
|
|||||||
|
|
||||||
* homepage - link to homepage, string, optional
|
* homepage - link to homepage, string, optional
|
||||||
* last_update - report generation time, pretty printed datetime, required
|
* last_update - report generation time, pretty printed datetime, required
|
||||||
* link_path - prefix fo packages to download, string, required
|
* link_path - prefix of packages to download, string, required
|
||||||
* has_package_signed - ``True`` in case if package sign enabled, ``False`` otherwise, 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
|
* has_repo_signed - ``True`` in case if repository database sign enabled, ``False`` otherwise, required
|
||||||
* packages - sorted list of packages properties, required
|
* packages - sorted list of packages properties, required
|
||||||
@@ -64,7 +64,7 @@ class JinjaTemplate:
|
|||||||
Attributes:
|
Attributes:
|
||||||
default_pgp_key(str | None): default PGP key
|
default_pgp_key(str | None): default PGP key
|
||||||
homepage(str | None): homepage link if any (for footer)
|
homepage(str | None): homepage link if any (for footer)
|
||||||
link_path(str): prefix fo packages to download
|
link_path(str): prefix of packages to download
|
||||||
name(str): repository name
|
name(str): repository name
|
||||||
rss_url(str | None): link to the RSS feed
|
rss_url(str | None): link to the RSS feed
|
||||||
sign_targets(set[SignSettings]): targets to sign enabled in configuration
|
sign_targets(set[SignSettings]): targets to sign enabled in configuration
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class EventLogger:
|
|||||||
>>> with self.in_event(package_base, EventType.PackageUpdated):
|
>>> with self.in_event(package_base, EventType.PackageUpdated):
|
||||||
>>> do_something()
|
>>> do_something()
|
||||||
|
|
||||||
Additional parameter ``failure`` can be set in order to emit an event on exception occured. If none set
|
Additional parameter ``failure`` can be set in order to emit an event on exception occurred. If none set
|
||||||
(default), then no event will be recorded on exception
|
(default), then no event will be recorded on exception
|
||||||
"""
|
"""
|
||||||
with MetricsTimer() as timer:
|
with MetricsTimer() as timer:
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class Package(LazyLogging):
|
|||||||
:attr:`ahriman.models.package_source.PackageSource.Archive`,
|
:attr:`ahriman.models.package_source.PackageSource.Archive`,
|
||||||
:attr:`ahriman.models.package_source.PackageSource.AUR`,
|
:attr:`ahriman.models.package_source.PackageSource.AUR`,
|
||||||
:attr:`ahriman.models.package_source.PackageSource.Local` and
|
:attr:`ahriman.models.package_source.PackageSource.Local` and
|
||||||
:attr:`ahriman.models.package_source.PackageSource.Repository` repsectively:
|
:attr:`ahriman.models.package_source.PackageSource.Repository` respectively:
|
||||||
|
|
||||||
>>> ahriman_package = Package.from_aur("ahriman")
|
>>> ahriman_package = Package.from_aur("ahriman")
|
||||||
>>> pacman_package = Package.from_official("pacman", pacman)
|
>>> pacman_package = Package.from_official("pacman", pacman)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class RemoteSchema(Schema):
|
|||||||
"example": ".",
|
"example": ".",
|
||||||
})
|
})
|
||||||
source = fields.Enum(PackageSource, by_value=True, required=True, metadata={
|
source = fields.Enum(PackageSource, by_value=True, required=True, metadata={
|
||||||
"description": "Pacakge source",
|
"description": "Package source",
|
||||||
})
|
})
|
||||||
web_url = fields.String(metadata={
|
web_url = fields.String(metadata={
|
||||||
"description": "Package repository page",
|
"description": "Package repository page",
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ class PackageView(StatusViewGuard, BaseView):
|
|||||||
@apidocs(
|
@apidocs(
|
||||||
tags=["Packages"],
|
tags=["Packages"],
|
||||||
summary="Update package",
|
summary="Update package",
|
||||||
description="Update package status and set its descriptior optionally",
|
description="Update package status and set its descriptor optionally",
|
||||||
permission=POST_PERMISSION,
|
permission=POST_PERMISSION,
|
||||||
error_400_enabled=True,
|
error_400_enabled=True,
|
||||||
error_404_description="Repository is unknown",
|
error_404_description="Repository is unknown",
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def test_remote_git_url(remote: Remote) -> None:
|
|||||||
must raise NotImplemented for missing remote git url
|
must raise NotImplemented for missing remote git url
|
||||||
"""
|
"""
|
||||||
with pytest.raises(NotImplementedError):
|
with pytest.raises(NotImplementedError):
|
||||||
remote.remote_git_url("package", "repositorys")
|
remote.remote_git_url("package", "repositories")
|
||||||
|
|
||||||
|
|
||||||
def test_remote_web_url(remote: Remote) -> None:
|
def test_remote_web_url(remote: Remote) -> None:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from ahriman.core.exceptions import PacmanError
|
|||||||
|
|
||||||
def test_copy(mocker: MockerFixture) -> None:
|
def test_copy(mocker: MockerFixture) -> None:
|
||||||
"""
|
"""
|
||||||
must copy loca database file
|
must copy local database file
|
||||||
"""
|
"""
|
||||||
copy_mock = mocker.patch("shutil.copy")
|
copy_mock = mocker.patch("shutil.copy")
|
||||||
PacmanDatabase.copy(Path("remote"), Path("local"))
|
PacmanDatabase.copy(Path("remote"), Path("local"))
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ def test_set_unknown(client: Client, package_ahriman: Package, mocker: MockerFix
|
|||||||
|
|
||||||
def test_set_unknown_skip(client: Client, package_ahriman: Package, mocker: MockerFixture) -> None:
|
def test_set_unknown_skip(client: Client, package_ahriman: Package, mocker: MockerFixture) -> None:
|
||||||
"""
|
"""
|
||||||
must skip unknown status update in case if pacakge is already known
|
must skip unknown status update in case if package is already known
|
||||||
"""
|
"""
|
||||||
mocker.patch("ahriman.core.status.Client.package_get", return_value=[(package_ahriman, None)])
|
mocker.patch("ahriman.core.status.Client.package_get", return_value=[(package_ahriman, None)])
|
||||||
update_mock = mocker.patch("ahriman.core.status.Client.package_update")
|
update_mock = mocker.patch("ahriman.core.status.Client.package_update")
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ def test_configuration_sections(configuration: Configuration) -> None:
|
|||||||
|
|
||||||
def test_on_result(trigger: Trigger) -> None:
|
def test_on_result(trigger: Trigger) -> None:
|
||||||
"""
|
"""
|
||||||
must pass execution nto run method
|
must pass execution to run method
|
||||||
"""
|
"""
|
||||||
trigger.on_result(Result(), [])
|
trigger.on_result(Result(), [])
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ from ahriman.models.log_record_id import LogRecordId
|
|||||||
|
|
||||||
def test_init() -> None:
|
def test_init() -> None:
|
||||||
"""
|
"""
|
||||||
must correctly assign proces identifier if not set
|
must correctly assign process identifier if not set
|
||||||
"""
|
"""
|
||||||
assert LogRecordId("1", "2").process_id == LogRecordId.DEFAULT_PROCESS_ID
|
assert LogRecordId("1", "2").process_id == LogRecordId.DEFAULT_PROCESS_ID
|
||||||
assert LogRecordId("1", "2", "3").process_id == "3"
|
assert LogRecordId("1", "2", "3").process_id == "3"
|
||||||
|
|||||||
Reference in New Issue
Block a user