Merge pull request #107 from sbidoul/update-deps

Update deps
This commit is contained in:
Stéphane Bidoul 2024-06-30 10:29:54 +02:00 committed by GitHub
commit 4a00822d4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 69 additions and 54 deletions

View file

@ -2,14 +2,14 @@ default_language_version:
python: python3 python: python3
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 rev: v4.6.0
hooks: hooks:
- id: check-toml - id: check-toml
- id: check-yaml - id: check-yaml
- id: end-of-file-fixer - id: end-of-file-fixer
- id: trailing-whitespace - id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit - repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.6 rev: v0.5.0
hooks: hooks:
- id: ruff - id: ruff
- id: ruff-format - id: ruff-format

View file

@ -46,6 +46,8 @@ Home = "https://github.com/sbidoul/runboat"
[tool.ruff] [tool.ruff]
fix = true fix = true
target-version = "py310" target-version = "py310"
[tool.ruff.lint]
select = [ select = [
"F", # pyflakes "F", # pyflakes
"E", # pycodestyle "E", # pycodestyle
@ -59,10 +61,10 @@ select = [
"RUF", "RUF",
] ]
[tool.ruff.mccabe] [tool.ruff.lint.mccabe]
max-complexity = 15 max-complexity = 15
[tool.ruff.isort] [tool.ruff.lint.isort]
known-first-party = ["runboat"] known-first-party = ["runboat"]
# pytest # pytest

View file

@ -1,4 +1,4 @@
# frozen requirements generated by pip-deepfreeze # frozen requirements generated by pip-deepfreeze
mypy==1.7.0 mypy==1.10.1
mypy-extensions==1.0.0 mypy-extensions==1.0.0
types-urllib3==1.26.25.14 types-urllib3==1.26.25.14

View file

@ -1,9 +1,9 @@
# frozen requirements generated by pip-deepfreeze # frozen requirements generated by pip-deepfreeze
coverage==7.3.2 coverage==7.5.4
iniconfig==2.0.0 iniconfig==2.0.0
pluggy==1.3.0 pluggy==1.5.0
pytest==7.4.3 pytest==8.2.2
pytest-asyncio==0.21.1 pytest-asyncio==0.23.7
pytest-cov==4.1.0 pytest-cov==5.0.0
pytest-dotenv==0.5.2 pytest-dotenv==0.5.2
pytest-mock==3.12.0 pytest-mock==3.14.0

View file

@ -1,43 +1,55 @@
# frozen requirements generated by pip-deepfreeze # frozen requirements generated by pip-deepfreeze
annotated-types==0.6.0 annotated-types==0.7.0
ansi2html==1.8.0 ansi2html==1.9.2
anyio==3.7.1 anyio==4.4.0
cachetools==5.3.2 cachetools==5.3.3
certifi==2023.11.17 certifi==2024.6.2
charset-normalizer==3.3.2 charset-normalizer==3.3.2
click==8.1.7 click==8.1.7
fastapi==0.104.1 dnspython==2.6.1
google-auth==2.23.4 email-validator==2.2.0
gunicorn==21.2.0 fastapi==0.111.0
fastapi-cli==0.0.4
google-auth==2.30.0
gunicorn==22.0.0
h11==0.14.0 h11==0.14.0
httpcore==1.0.2 httpcore==1.0.5
httpx==0.25.1 httptools==0.6.1
idna==3.4 httpx==0.27.0
Jinja2==3.1.2 idna==3.7
kubernetes==28.1.0 jinja2==3.1.4
kubernetes==30.1.0
markdown-it-py==3.0.0 markdown-it-py==3.0.0
MarkupSafe==2.1.3 markupsafe==2.1.5
mdurl==0.1.2 mdurl==0.1.2
oauthlib==3.2.2 oauthlib==3.2.2
packaging==23.2 orjson==3.10.5
pyasn1==0.5.0 packaging==24.1
pyasn1-modules==0.3.0 pyasn1==0.6.0
pydantic==2.5.1 pyasn1-modules==0.4.0
pydantic-settings==2.1.0 pydantic==2.7.4
pydantic_core==2.14.3 pydantic-core==2.18.4
Pygments==2.17.1 pydantic-settings==2.3.4
python-dateutil==2.8.2 pygments==2.18.0
python-dotenv==1.0.0 python-dateutil==2.9.0.post0
PyYAML==6.0.1 python-dotenv==1.0.1
requests==2.31.0 python-multipart==0.0.9
requests-oauthlib==1.3.1 pyyaml==6.0.1
rich==13.7.0 requests==2.32.3
requests-oauthlib==2.0.0
rich==13.7.1
rsa==4.9 rsa==4.9
shellingham==1.5.4
six==1.16.0 six==1.16.0
sniffio==1.3.0 sniffio==1.3.1
sse-starlette==1.6.5 sse-starlette==2.1.2
starlette==0.27.0 starlette==0.37.2
typing_extensions==4.8.0 typer==0.12.3
urllib3==1.26.18 typing-extensions==4.12.2
uvicorn==0.24.0.post1 ujson==5.10.0
websocket-client==1.6.4 urllib3==2.2.2
uvicorn==0.30.1
uvloop==0.19.0
watchfiles==0.22.0
websocket-client==1.8.0
websockets==12.0

View file

@ -1,2 +1,3 @@
"""A simple Odoo runbot lookalike using kubernetes.""" """A simple Odoo runbot lookalike using kubernetes."""
__version__ = "0.2" __version__ = "0.2"

View file

@ -19,8 +19,7 @@ class SortOrder(Enum):
class BuildListener(Protocol): 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: class BuildsDb:

View file

@ -193,9 +193,10 @@ def _get_kubefiles_path(kubefiles_path: Path | None) -> Generator[Path, None, No
def _render_kubefiles( def _render_kubefiles(
kubefiles_path: Path | None, deployment_vars: DeploymentVars kubefiles_path: Path | None, deployment_vars: DeploymentVars
) -> Generator[Path, None, None]: ) -> Generator[Path, None, None]:
with _get_kubefiles_path( with (
kubefiles_path _get_kubefiles_path(kubefiles_path) as kubefiles_path,
) as kubefiles_path, tempfile.TemporaryDirectory() as tmp_dir: tempfile.TemporaryDirectory() as tmp_dir,
):
tmp_path = Path(tmp_dir) tmp_path = Path(tmp_dir)
_logger.debug("kubefiles path: %s", kubefiles_path) _logger.debug("kubefiles path: %s", kubefiles_path)
# TODO async copytree, or make this whole _render_kubefiles run_in_executor # TODO async copytree, or make this whole _render_kubefiles run_in_executor

View file

@ -59,13 +59,13 @@ class Settings(BaseSettings):
# The wildcard domain where the builds will be reacheable. # The wildcard domain where the builds will be reacheable.
build_domain: str build_domain: str
# A dictionary of environment variables to set in the build container and jobs. # 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 # A dictionary of secret environment variables to set in the build container and
# jobs. # 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 # A dictionary of variables to be set in the jinja rendering context for the
# kubefiles. # kubefiles.
build_template_vars: dict[str, str] = {} # noqa: RUF012 build_template_vars: dict[str, str] = {}
# The path of the default kubefiles to be used. # The path of the default kubefiles to be used.
build_default_kubefiles_path: Annotated[ build_default_kubefiles_path: Annotated[
Path | None, BeforeValidator(validate_path) Path | None, BeforeValidator(validate_path)

View file

@ -28,7 +28,7 @@ def sync_to_async(func: Callable[P, R]) -> Callable[P, Awaitable[R]]:
def sync_to_async_iterator( 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]]: ) -> Callable[P, AsyncGenerator[R, None]]:
@sync_to_async @sync_to_async
def async_next(iterator: Iterator[R]) -> R: def async_next(iterator: Iterator[R]) -> R: