Skip to content

Commit

Permalink
Merge pull request #107 from sbidoul/update-deps
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
sbidoul authored Jun 30, 2024
2 parents 8813f67 + 321d65b commit 4a00822
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 54 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.6
rev: v0.5.0
hooks:
- id: ruff
- id: ruff-format
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Home = "https://github.com/sbidoul/runboat"
[tool.ruff]
fix = true
target-version = "py310"

[tool.ruff.lint]
select = [
"F", # pyflakes
"E", # pycodestyle
Expand All @@ -59,10 +61,10 @@ select = [
"RUF",
]

[tool.ruff.mccabe]
[tool.ruff.lint.mccabe]
max-complexity = 15

[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["runboat"]

# pytest
Expand Down
2 changes: 1 addition & 1 deletion requirements-mypy.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# frozen requirements generated by pip-deepfreeze
mypy==1.7.0
mypy==1.10.1
mypy-extensions==1.0.0
types-urllib3==1.26.25.14
12 changes: 6 additions & 6 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen requirements generated by pip-deepfreeze
coverage==7.3.2
coverage==7.5.4
iniconfig==2.0.0
pluggy==1.3.0
pytest==7.4.3
pytest-asyncio==0.21.1
pytest-cov==4.1.0
pluggy==1.5.0
pytest==8.2.2
pytest-asyncio==0.23.7
pytest-cov==5.0.0
pytest-dotenv==0.5.2
pytest-mock==3.12.0
pytest-mock==3.14.0
80 changes: 46 additions & 34 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,43 +1,55 @@
# frozen requirements generated by pip-deepfreeze
annotated-types==0.6.0
ansi2html==1.8.0
anyio==3.7.1
cachetools==5.3.2
certifi==2023.11.17
annotated-types==0.7.0
ansi2html==1.9.2
anyio==4.4.0
cachetools==5.3.3
certifi==2024.6.2
charset-normalizer==3.3.2
click==8.1.7
fastapi==0.104.1
google-auth==2.23.4
gunicorn==21.2.0
dnspython==2.6.1
email-validator==2.2.0
fastapi==0.111.0
fastapi-cli==0.0.4
google-auth==2.30.0
gunicorn==22.0.0
h11==0.14.0
httpcore==1.0.2
httpx==0.25.1
idna==3.4
Jinja2==3.1.2
kubernetes==28.1.0
httpcore==1.0.5
httptools==0.6.1
httpx==0.27.0
idna==3.7
jinja2==3.1.4
kubernetes==30.1.0
markdown-it-py==3.0.0
MarkupSafe==2.1.3
markupsafe==2.1.5
mdurl==0.1.2
oauthlib==3.2.2
packaging==23.2
pyasn1==0.5.0
pyasn1-modules==0.3.0
pydantic==2.5.1
pydantic-settings==2.1.0
pydantic_core==2.14.3
Pygments==2.17.1
python-dateutil==2.8.2
python-dotenv==1.0.0
PyYAML==6.0.1
requests==2.31.0
requests-oauthlib==1.3.1
rich==13.7.0
orjson==3.10.5
packaging==24.1
pyasn1==0.6.0
pyasn1-modules==0.4.0
pydantic==2.7.4
pydantic-core==2.18.4
pydantic-settings==2.3.4
pygments==2.18.0
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-multipart==0.0.9
pyyaml==6.0.1
requests==2.32.3
requests-oauthlib==2.0.0
rich==13.7.1
rsa==4.9
shellingham==1.5.4
six==1.16.0
sniffio==1.3.0
sse-starlette==1.6.5
starlette==0.27.0
typing_extensions==4.8.0
urllib3==1.26.18
uvicorn==0.24.0.post1
websocket-client==1.6.4
sniffio==1.3.1
sse-starlette==2.1.2
starlette==0.37.2
typer==0.12.3
typing-extensions==4.12.2
ujson==5.10.0
urllib3==2.2.2
uvicorn==0.30.1
uvloop==0.19.0
watchfiles==0.22.0
websocket-client==1.8.0
websockets==12.0
1 change: 1 addition & 0 deletions src/runboat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""A simple Odoo runbot lookalike using kubernetes."""

__version__ = "0.2"
3 changes: 1 addition & 2 deletions src/runboat/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class SortOrder(Enum):


class BuildListener(Protocol):
def on_build_event(self, event: BuildEvent, build: Build) -> None:
...
def on_build_event(self, event: BuildEvent, build: Build) -> None: ...


class BuildsDb:
Expand Down
7 changes: 4 additions & 3 deletions src/runboat/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,10 @@ def _get_kubefiles_path(kubefiles_path: Path | None) -> Generator[Path, None, No
def _render_kubefiles(
kubefiles_path: Path | None, deployment_vars: DeploymentVars
) -> Generator[Path, None, None]:
with _get_kubefiles_path(
kubefiles_path
) as kubefiles_path, tempfile.TemporaryDirectory() as tmp_dir:
with (
_get_kubefiles_path(kubefiles_path) as kubefiles_path,
tempfile.TemporaryDirectory() as tmp_dir,
):
tmp_path = Path(tmp_dir)
_logger.debug("kubefiles path: %s", kubefiles_path)
# TODO async copytree, or make this whole _render_kubefiles run_in_executor
Expand Down
6 changes: 3 additions & 3 deletions src/runboat/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ class Settings(BaseSettings):
# The wildcard domain where the builds will be reacheable.
build_domain: str
# A dictionary of environment variables to set in the build container and jobs.
build_env: dict[str, str] = {} # noqa: RUF012
build_env: dict[str, str] = {}
# A dictionary of secret environment variables to set in the build container and
# jobs.
build_secret_env: dict[str, str] = {} # noqa: RUF012
build_secret_env: dict[str, str] = {}
# A dictionary of variables to be set in the jinja rendering context for the
# kubefiles.
build_template_vars: dict[str, str] = {} # noqa: RUF012
build_template_vars: dict[str, str] = {}
# The path of the default kubefiles to be used.
build_default_kubefiles_path: Annotated[
Path | None, BeforeValidator(validate_path)
Expand Down
2 changes: 1 addition & 1 deletion src/runboat/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def inner(*args: Any, **kwargs: Any) -> R:


def sync_to_async_iterator(
iterator_func: Callable[P, Generator[R, None, None]]
iterator_func: Callable[P, Generator[R, None, None]],
) -> Callable[P, AsyncGenerator[R, None]]:
@sync_to_async
def async_next(iterator: Iterator[R]) -> R:
Expand Down

0 comments on commit 4a00822

Please sign in to comment.