Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: full endpoint support; refactor: numerous dev fixes and reworkings #184

Merged
merged 64 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
8422bc4
fix: write trailing newlines to response/payload docs json
tazlin Apr 16, 2024
5e3ab52
chore: update codegen swagger/output to latest
tazlin Apr 16, 2024
be4adfb
chore: move codegen to ai_horde sub folder
tazlin Apr 16, 2024
5e3bda6
fix: `ImageGeneration` now inherits from `HordeAPIObject`
tazlin Apr 17, 2024
c7571ab
tests: verify that api surface is fully exposed
tazlin Apr 17, 2024
2e2c7d6
fix: rename `logging` to a non-conflicting module name
tazlin Apr 17, 2024
9f4aac1
fix: missed import name for new horde_logging module
tazlin Apr 17, 2024
2d6d05e
fix: missed generic -> specific return type for two classes
tazlin Apr 17, 2024
841bb68
docs: rebuilt docs reflecting new/moved modules+mapped classes
tazlin Apr 17, 2024
d543626
fix: lingering missing import
tazlin Apr 17, 2024
45e89ff
fix: use dynamic version for `client_agent` string
tazlin Apr 17, 2024
fca98cb
tests: generalize surface checking to other types
tazlin Apr 17, 2024
c467af3
chore: adds missing type hints, sorts/prunes certain `__all__` vars
tazlin Apr 18, 2024
455c669
chore: comply with mypy `--strict`
tazlin Apr 18, 2024
9858185
feat: support getting requests/response models from swaggerdoc
tazlin Apr 18, 2024
9321190
feat: print image gen warnings to console
tazlin Apr 18, 2024
140ae52
tests: fix test run order
tazlin Apr 18, 2024
c6af9aa
refactor: standardize/clarify existing stats req/resp. models
tazlin Apr 18, 2024
4bb1570
chore: update test_data jsons from production
tazlin Apr 18, 2024
fb0c0c4
feat: support `/v2/stats/img/totals`
tazlin Apr 18, 2024
835a970
test: stage test to verify published models exist in SDK
tazlin Apr 18, 2024
7f97db1
feat: add all missing endpoints on current live API
tazlin Apr 18, 2024
175b316
fix: quiet protected namespace error for img stat req.
tazlin Apr 19, 2024
5597bb2
test: use mapped python<->api_name for headers+queries
tazlin Apr 19, 2024
247f630
refactor: more pythonic `_validate_and_prepare_request`
tazlin Apr 19, 2024
88b047f
fix: handle `extra_query_keys`
tazlin Apr 19, 2024
9e3d88a
tests: add `Unhashable` decorator
tazlin Apr 19, 2024
1626e10
tests: `Unequatable` decorator
tazlin Apr 19, 2024
0820015
tests: apply Unhashable/Unequatable where appropriate
tazlin Apr 19, 2024
569b80e
test: use (soon to be) latest production test data
tazlin Apr 19, 2024
26c87b9
docs: update docs to latest prod. data
tazlin Apr 20, 2024
ef88bbe
fix: use pythonic dunder overrides; `NotImplemented`
tazlin Apr 20, 2024
8de1274
refactor: minor change to bridge data warning logs
tazlin Apr 20, 2024
02c1571
refactor: reduce cog. complex. for dl `ExtraSourceImage`s
tazlin Apr 20, 2024
5404a21
refactor: remove leading `_` from `PROGRESS_STATE`
tazlin Apr 20, 2024
cd03e84
fix: use conventional `cls` where appropriate
tazlin Apr 20, 2024
cabfb54
refactor: more pythonic `_validate_and_prepare_request`
tazlin Apr 20, 2024
85290c0
fix: typo in docstring; misnamed `cls` classmethod args
tazlin Apr 20, 2024
abf6369
fix: rely on functools cache over naive module cache
tazlin Apr 20, 2024
d17d178
tests: stage test to check all endpoints have a request
tazlin Apr 20, 2024
042e85d
fix: remove unnecessary hash from workers/all response
tazlin Apr 20, 2024
dabaef1
feat: all stats+status endpoints; fix: various fixes
tazlin Apr 20, 2024
ea8721a
fix: rc/warning code; standardize known enum checking
tazlin May 5, 2024
2c7266a
tests/fix: make an import more specific; fix minor typo
tazlin May 5, 2024
1a65763
fix: more specific import for generic nested objects
tazlin May 5, 2024
f8aa64a
build(deps-dev): bump the python-packages group across 1 directory wi…
dependabot[bot] Apr 29, 2024
1f99cf3
chore: update pre-commit deps
tazlin May 5, 2024
54bad00
fix: use latest api models
tazlin May 6, 2024
ea4326a
tests: run api surface checks sooner
tazlin May 6, 2024
d574258
feat: text endpoints; chore: two file moves, renames
tazlin May 9, 2024
14fcf9c
docs: auto-update docs
tazlin May 9, 2024
3deca95
fix: missing field for textgen status
tazlin May 9, 2024
51d3128
chore: update docs maps
tazlin May 9, 2024
48f3d6e
feat: Adds support for extra_texts and workflow keys
db0 May 19, 2024
6a636a8
feat: worker `allow_sdxl_controlnet` bridge data option
db0 May 21, 2024
a68cfb9
tests: updated test data
tazlin May 22, 2024
f4218eb
tests: custom mark `object_verify`
tazlin May 22, 2024
a984a80
refactor: generalize to `RequestUsesWorkerMixin`
tazlin May 22, 2024
b24e722
tests: skip api surface tests for now
tazlin May 22, 2024
0f9ea4a
feat: /worker/{worker_id} endpoint
tazlin May 22, 2024
fd77aa4
refactor: extract `ExtraSourceImageMixin` (for reuse w/ text)
tazlin May 22, 2024
c6639b2
feat: adds the remaining text endpoints
tazlin May 22, 2024
103085a
docs: brings docs up to date
tazlin May 22, 2024
97b7d0e
chore: minor clean up of indev files/content
tazlin May 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.3.0
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
rev: v0.4.3
hooks:
- id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.9.0'
rev: 'v1.10.0'
hooks:
- id: mypy
additional_dependencies: [pydantic, types-requests, types-pytz, types-setuptools, types-urllib3, StrEnum]
args: [., --strict, --ignore-missing-imports, --exclude=^codegen]
pass_filenames: false
additional_dependencies: [
pytest,
pydantic,
types-Pillow,
types-requests,
types-pytz,
types-setuptools,
types-urllib3,
StrEnum
]
4 changes: 2 additions & 2 deletions codegen/README.md → codegen/ai_horde/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ python codegen/codegen_regex_fixes.py codegen/ai_horde_codegen.py

Format again, this time truncating the lines with `--preview`, and auto-fix lint problems
```bash
black codegen/ai_horde_codegen.py --preview
black codegen/ai_horde_codegen.py --unstable --enable-unstable-feature string_processing
ruff codegen/ai_horde_codegen.py --fix
black codegen/ai_horde_codegen.py
black codegen/ai_horde_codegen.py --unstable --enable-unstable-feature string_processing # for good measure
ruff codegen/ai_horde_codegen.py --fix # for good measure
```

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ def main(path: str) -> None:
contents = re.sub(r"example=\"(.*)\"(,)", r'examples=["\1"]\2', contents)
contents = re.sub(r"example=(\d*)(,|$|\))", r"examples=[\1]\2", contents)
contents = re.sub(r"example=(\d*\.\d)(,|$|\))", r"examples=[\1]\2", contents)
contents = re.sub(r"id: ", r"id_: ", contents)
contents = re.sub(r"type: ", r"type_: ", contents)

contents = contents.replace("id: ", "id_: ")
contents = contents.replace("type: ", "type_: ")
# Replace the literal string `\n` with a newline

with open(path, "w", encoding="utf-8") as f:
Expand Down
Loading
Loading