Skip to content

Commit

Permalink
Merge pull request #80 from Haidra-Org/main
Browse files Browse the repository at this point in the history
fix: `GenMetadataEntry` adjustments
  • Loading branch information
tazlin authored Nov 11, 2023
2 parents f99fb1a + c7f20fc commit 6fd9497
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.11.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.290
rev: v0.1.5
hooks:
- id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.5.1'
rev: 'v1.6.1'
hooks:
- id: mypy
additional_dependencies: [pydantic, types-requests, types-pytz, types-setuptools, types-urllib3, StrEnum]
3 changes: 2 additions & 1 deletion horde_sdk/ai_horde_api/apimodels/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
AlchemyStatusResponse,
AlchemyUpscaleResult,
)
from horde_sdk.ai_horde_api.apimodels.base import LorasPayloadEntry, TIPayloadEntry
from horde_sdk.ai_horde_api.apimodels.base import GenMetadataEntry, LorasPayloadEntry, TIPayloadEntry
from horde_sdk.ai_horde_api.apimodels.generate._async import (
ImageGenerateAsyncDryRunResponse,
ImageGenerateAsyncRequest,
Expand Down Expand Up @@ -107,6 +107,7 @@
"StatsModelsResponse",
"StatsModelsTimeframe",
"TIPayloadEntry",
"GenMetadataEntry",
"UsageDetails",
"UserAmountRecords",
"UserKudosDetails",
Expand Down
2 changes: 1 addition & 1 deletion horde_sdk/ai_horde_api/apimodels/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,5 +210,5 @@ class GenMetadataEntry(BaseModel):
"""The relevance of the metadata field."""
value: METADATA_VALUE = Field()
"""The value of the metadata field."""
ref: str = Field(max_length=255)
ref: str | None = Field(default=None, max_length=255)
"""Optionally a reference for the metadata (e.g. a lora ID)"""
10 changes: 5 additions & 5 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pytest==7.4.2
mypy==1.5.1
black==23.9.1
ruff==0.0.290
pytest==7.4.3
mypy==1.6.1
black==23.11.0
ruff==0.1.5
tox~=4.11.3
pre-commit~=3.4.0
pre-commit~=3.5.0
build>=0.10.0
coverage>=7.2.7

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
horde_model_reference~=0.5.1
horde_model_reference~=0.5.3

pydantic
requests
Expand Down
1 change: 0 additions & 1 deletion tests/ai_horde_api/test_ai_horde_api_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ def test_AllWorkersDetailsResponse() -> None:
assert isinstance(test_all_workers_details_response.model_dump(), list)

print(test_all_workers_details_response.model_dump())
pass


def test_FindUserRequest(ai_horde_api_key: str) -> None:
Expand Down
2 changes: 1 addition & 1 deletion tests/ai_horde_worker/test_model_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ def test_image_models_unique_results_only(
)
all_model_names = image_model_load_resolver.resolve_all_model_names()

assert len(resolved_model_names) >= len(all_model_names)
assert len(resolved_model_names) >= (len(all_model_names) - 1) # FIXME: -1 is to account for SDXL beta

0 comments on commit 6fd9497

Please sign in to comment.