Removed holy aboba test

This commit is contained in:
MaXFeeD
2025-06-09 18:16:29 +03:00
parent d540119334
commit 89f2013122
2 changed files with 0 additions and 69 deletions
-38
View File
@@ -115,44 +115,6 @@ def run(argv: Optional[list[str]] = None):
startup_millis = time() - startup_millis
debug(f"* Tasks successfully completed in {startup_millis:.2f}s!")
from .language import AbobaConfig
project_config = AbobaConfig("1")
graph = ProjectGraph(project_config)
node1 = graph.obtain_edge(project_config)
node2 = graph.obtain_edge(AbobaConfig("2"))
graph.depend_on(node1, node2)
node3 = graph.obtain_edge(AbobaConfig("3"))
graph.depend_on(node2, node3)
node4 = graph.obtain_edge(AbobaConfig("4"))
graph.depend_on(node3, node4)
graph.depend_on(node4, node2)
node5 = graph.obtain_edge(AbobaConfig("5"))
graph.depend_on(node1, node5)
node6 = graph.obtain_edge(AbobaConfig("6"))
graph.depend_on(node5, node6)
graph.depend_on(node6, node3)
node7 = graph.obtain_edge(AbobaConfig("7"))
graph.depend_on(node6, node7)
node8 = graph.obtain_edge(AbobaConfig("8"))
graph.depend_on(node1, node8)
graph.depend_on(node6, node8)
print("Cross references")
print(f"Node 1: {graph.find_circular_reference(node1)}")
print(f"Node 2: {graph.find_circular_reference(node2)}")
print(f"Node 3: {graph.find_circular_reference(node3)}")
print(f"Node 4: {graph.find_circular_reference(node4)}")
print(f"Node 5: {graph.find_circular_reference(node5)}")
print(f"Node 6: {graph.find_circular_reference(node6)}")
print(f"Node 7: {graph.find_circular_reference(node7)}")
print(f"Node 8: {graph.find_circular_reference(node8)}")
print(f"Looped by cross references? {'No' if not graph.find_circular_reference() else 'Yes'}")
unresolved_artifacts = graph.resolve_dependencies()
show_unresolved_dependencies(unresolved_artifacts)
resolve_circular_references(graph)
print(f"Order: {', '.join([edge.project.key if isinstance(edge.project, AbobaConfig) else str(edge) for edge in graph.traverse_dependencies()])}")
def run_test():
import asyncio
from itertools import cycle
-31
View File
@@ -387,34 +387,3 @@ class MakeDataConfig(FileConfig, metaclass=ABCMeta):
continue
from . import GLOBALS
return config_type(config_file, defaults=GLOBALS.TOOLCHAIN_CONFIG)
class AbobaConfig(MakeDataConfig):
def __init__(self, key: str) -> None:
from . import GLOBALS
if not isfile(GLOBALS.TOOLCHAIN_CONFIG.path):
from os import makedirs
from os.path import dirname
makedirs(dirname(GLOBALS.TOOLCHAIN_CONFIG.path))
with open(GLOBALS.TOOLCHAIN_CONFIG.path, "x") as file:
file.write("{}")
super().__init__(GLOBALS.TOOLCHAIN_CONFIG.path, GLOBALS.TOOLCHAIN_CONFIG)
self.key = key
def __hash__(self):
return hash(frozenset(self)) ^ hash(self.key)
@property
def is_pack(self) -> bool:
return False
def iterate_dependencies(self) -> Iterable[Union['MakeDataConfig', 'Artifact']]:
return []
def obtain_project_data(self) -> Optional[Union[MakeModData, MakePackData]]:
pass
def iterate_assets(self) -> Iterable[MakeAssetData]:
return []
def __repr__(self) -> str:
return self.key