Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Commit f6434c4

Browse files
Fix settings.py
1 parent dc79683 commit f6434c4

4 files changed

Lines changed: 5 additions & 14 deletions

File tree

weatherdan/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from rich.theme import Theme
2121
from rich.traceback import install
2222

23-
__version__ = "0.6.0"
23+
__version__ = "0.6.1"
2424
CONSOLE = Console(
2525
theme=Theme(
2626
{

weatherdan/models.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
__all__ = [
2-
"GraphData",
3-
"Rainfall",
4-
"Reading",
5-
"Solar",
6-
"UVIndex",
7-
"WeekReading",
8-
"Wind",
9-
]
1+
__all__ = ["GraphData", "Rainfall", "Reading", "Solar", "UVIndex", "WeekReading", "Wind"]
102

113
from datetime import date
124
from decimal import Decimal

weatherdan/routers/html.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from typing import Annotated
44

5-
from fastapi import APIRouter, Cookie, Request, Depends
5+
from fastapi import APIRouter, Cookie, Depends, Request
66
from fastapi.responses import HTMLResponse, Response
77
from fastapi.templating import Jinja2Templates
88
from sqlmodel import Session, select
@@ -139,4 +139,3 @@ def wind(
139139
"month": month,
140140
},
141141
)
142-

weatherdan/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import tomli_w as tomlwriter
1010
from pydantic import BaseModel
1111

12-
from weatherdan import get_config_root
12+
from weatherdan import get_config_root, get_data_root
1313

1414

1515
class SettingsModel(
@@ -29,8 +29,8 @@ class Source(str, Enum):
2929

3030

3131
class DatabaseSettings(SettingsModel):
32+
database_name: str = str(get_data_root() / "weatherdan.sqlite")
3233
host: str = ""
33-
name: str = "freyr.sqlite"
3434
password: str = ""
3535
source: Source = Source.SQLITE
3636
user: str = ""

0 commit comments

Comments
 (0)