mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-08-26 11:29:55 +00:00
feat: remove excess dependencies leaves (#128)
This mr improves implicit dependencies processing by reducing tree leaves by using the following algorithm: * remove paths which belong to any base package * remove packages which are (opt)dependencies of one of the package which provides same path. It also tries to handle circular dependencies by excluding them from being "satisfied" * remove packages which are already satisfied by any children path
This commit is contained in:
@ -1,6 +1,13 @@
|
||||
from ahriman.models.dependencies import Dependencies
|
||||
|
||||
|
||||
def test_post_init() -> None:
|
||||
"""
|
||||
must remove empty leaves
|
||||
"""
|
||||
assert Dependencies({"path": ["package"], "empty": []}) == Dependencies({"path": ["package"]})
|
||||
|
||||
|
||||
def test_from_json_view() -> None:
|
||||
"""
|
||||
must construct and serialize dependencies to json
|
||||
|
Reference in New Issue
Block a user