Skip to content

Commit

Permalink
Fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
TimOrme committed Mar 20, 2023
1 parent 98b9287 commit 8687256
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: elm-format install
run: npm install -g elm-format
- name: Install dev dependencies
run: poetry install --only=dev
run: poetry install --no-root
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Check linting
Expand Down
15 changes: 0 additions & 15 deletions aqimon/config.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
"""Config module."""
import os.path
from dataclasses import dataclass
from serde import serde
from serde.toml import to_toml, from_toml

DEFAULT_DB_PATH = "~/.aqimon/db.sqlite"


@serde
@dataclass(frozen=True)
class Config:
"""Config data for the application."""
Expand Down Expand Up @@ -41,18 +38,6 @@ class Config:
)


def _load_config(path: str) -> Config:
"""Load config data from a toml file."""
with open(path, "r") as file:
return from_toml(Config, file.read())


def save_config(config: Config, path: str):
"""Save config data to a given path as a toml file."""
with open(path, "w") as file:
file.write(to_toml(config))


def get_config_from_env() -> Config:
"""Get the config from environment variables."""
return Config(
Expand Down
73 changes: 3 additions & 70 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ uvicorn = "^0.21.0"
databases = {extras = ["aiosqlite"], version = "^0.7.0"}
jinja2 = "^3.1.2"
fastapi-utils = "^0.2.1"
pyserde = {extras = ["toml"], version = "^0.10.2"}


[tool.poetry.group.dev.dependencies]
Expand Down

0 comments on commit 8687256

Please sign in to comment.