rename test/nodes to test/aa_nodes to ensure these tests run first

This commit is contained in:
Lincoln Stein 2023-11-26 09:38:30 -05:00
parent 8aefe2cefe
commit dc5c452ef9
9 changed files with 7 additions and 4 deletions

View File

@ -35,7 +35,7 @@ class ModelInstallJob(BaseModel):
inplace: bool = Field(default=False, description="Leave model in its current location; otherwise install under models directory")
source: ModelSource = Field(description="Source (URL, repo_id, or local path) of model")
local_path: Path = Field(description="Path to locally-downloaded model; may be the same as the source")
key: Optional[str] = Field(default=None, description="After model is installed, this is its config record key")
key: str = Field(default="<NO KEY>", description="After model is installed, this is its config record key")
error_type: str = Field(default="", description="Class name of the exception that led to status==ERROR")
error: str = Field(default="", description="Error traceback") # noqa #501

View File

@ -178,14 +178,15 @@ class ModelInstallService(ModelInstallServiceBase):
self._install_queue.put(job)
return job
else: # waiting for download queue implementation
else: # here is where we'd download a URL or repo_id. Implementation pending download queue.
raise NotImplementedError
def list_jobs(self, source: Optional[ModelSource]=None) -> List[ModelInstallJob]: # noqa D102
jobs = self._install_jobs
if not source:
return jobs.values()
return list(jobs.values())
else:
source = str(source)
return [jobs[x] for x in jobs if source in str(x)]
def get_job(self, source: ModelSource) -> ModelInstallJob: # noqa D102

View File

@ -69,6 +69,7 @@ def mock_services() -> InvocationServices:
logger=logging, # type: ignore
model_manager=None, # type: ignore
model_records=None, # type: ignore
model_install=None, # type: ignore
names=None, # type: ignore
performance_statistics=InvocationStatsService(),
processor=DefaultInvocationProcessor(),

View File

@ -74,6 +74,7 @@ def mock_services() -> InvocationServices:
logger=logging, # type: ignore
model_manager=None, # type: ignore
model_records=None, # type: ignore
model_install=None, # type: ignore
names=None, # type: ignore
performance_statistics=InvocationStatsService(),
processor=DefaultInvocationProcessor(),

View File

@ -12,7 +12,7 @@ from invokeai.app.services.session_queue.session_queue_common import (
prepare_values_to_insert,
)
from invokeai.app.services.shared.graph import Graph, GraphExecutionState, GraphInvocation
from tests.nodes.test_nodes import PromptTestInvocation
from tests.aa_nodes.test_nodes import PromptTestInvocation
@pytest.fixture