Skip to content

Commit

Permalink
use brewblox_tilt_ prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
steersbob committed Jan 5, 2024
1 parent e50c344 commit c3d68bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions brewblox_tilt/models.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from typing import Literal

from pydantic import BaseModel
from pydantic import BaseModel, Field
from pydantic_settings import BaseSettings, SettingsConfigDict


class ServiceConfig(BaseSettings):
model_config = SettingsConfigDict(
env_file='.appenv',
env_prefix='brewblox_',
env_prefix='brewblox_tilt_',
case_sensitive=False,
json_schema_extra='ignore',
)
Expand All @@ -24,7 +24,7 @@ class ServiceConfig(BaseSettings):
scan_duration: float = 5
inactive_scan_interval: float = 5
active_scan_interval: float = 10
simulate: list[str] | None = None
simulate: list[str] = Field(default_factory=list)


class TiltEvent(BaseModel):
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ services:
image: ghcr.io/brewblox/brewblox-tilt:local
privileged: true
environment:
- BREWBLOX_DEBUG=True
- UVICORN_RELOAD=True
# - BREWBLOX_SIMULATE=["Mauve", "Lila"]
- BREWBLOX_TILT_DEBUG=True
# - BREWBLOX_TILT_SIMULATE=["Mauve","Lila"]
restart: unless-stopped
volumes:
- type: bind
Expand Down
4 changes: 2 additions & 2 deletions parse_appenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def parse_cmd_args(raw_args: list[str]) -> tuple[argparse.Namespace, list[str]]:
args, unknown = parse_cmd_args(sys.argv[1:])
if unknown:
print(f'WARNING: ignoring unknown CMD arguments: {unknown}', file=sys.stderr)
output = [f'brewblox_{k}={shlex.quote(str(v))}'
output = [f'brewblox_tilt_{k}={shlex.quote(str(v))}'
for k, v in vars(args).items()
if v is not None
and v is not False
Expand All @@ -40,4 +40,4 @@ def parse_cmd_args(raw_args: list[str]) -> tuple[argparse.Namespace, list[str]]:
# Special exception for list variables
if args.simulate:
sim_names = json.dumps(list(args.simulate))
print(f"brewblox_simulate='{sim_names}'")
print(f"brewblox_tilt_simulate='{sim_names}'")

0 comments on commit c3d68bb

Please sign in to comment.