Skip to content

Commit

Permalink
Merge pull request #195 from Haidra-Org/main
Browse files Browse the repository at this point in the history
feat: many more endpoints are now supported; QR code workers support
  • Loading branch information
tazlin authored May 22, 2024
2 parents df21d59 + 122cdc6 commit 425a370
Show file tree
Hide file tree
Showing 96 changed files with 12,020 additions and 8,163 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/maintests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.10"]
python: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand All @@ -38,5 +38,7 @@ jobs:
pip install --upgrade -r requirements.dev.txt
- name: Run pre-commit
uses: pre-commit/action@v3.0.0
with:
extra_args: --all-files
- name: Run unit tests
run: tox -e tests-no-api-calls
4 changes: 3 additions & 1 deletion .github/workflows/prtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.10"]
python: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand All @@ -43,5 +43,7 @@ jobs:
pip install --upgrade -r requirements.dev.txt
- name: Run pre-commit
uses: pre-commit/action@v3.0.0
with:
extra_args: --all-files
- name: Run unit tests
run: tox -e tests-no-api-calls
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

0 comments on commit 425a370

Please sign in to comment.