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

Commit fa9b5ce

Browse files
Fix ecowitt service (#13)
- Update dependencies - Update to Py3.13 - Add `iotdevice_list` to Ecowitt Device model - Fix Solar, UVIndex and Wind graphs
1 parent 53b0bdf commit fa9b5ce

26 files changed

+381
-507
lines changed

.editorconfig

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,14 @@ trim_trailing_whitespace = true
99
insert_final_newline = true
1010
max_line_length = 100
1111

12-
[*.cs]
13-
indent_size = 4
14-
insert_final_newline = false
15-
1612
[{*.html,*.jte,*.kte,*.jinja}]
1713
indent_size = 4
1814
insert_final_newline = false
1915
max_line_length = off
2016

21-
[*.java]
22-
indent_size = 4
23-
insert_final_newline = false
24-
2517
[*.json]
2618
insert_final_newline = false
2719

28-
[{*.kt,*.kts}]
29-
ij_kotlin_allow_trailing_comma = true
30-
ij_kotlin_allow_trailing_comma_on_call_site = true
31-
ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
32-
ij_kotlin_packages_to_use_import_on_demand = unset
33-
indent_size = 4
34-
ktlint_code_style = ktlint_official
35-
ktlint_standard = enabled
36-
ktlint_experimental = disabled
37-
ktlint_standard_string-template-indent = disabled
38-
ktlint_standard_multiline-expression-wrapping = disabled
39-
ktlint_function_signature_body_expression_wrapping = multiline
40-
max_line_length = 140
41-
4220
[*.md]
4321
trim_trailing_whitespace = false
4422
max_line_length = off

.gitignore

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@
22
__pycache__/
33
__pypackages__/
44
.idea/
5-
.pytest_cache/
65
.ruff_cache/
7-
.tox/
86
.venv/
9-
.vscode/
107
build/
118
dist/
129
logs/
1310

1411
# =====Files=====
15-
*.csv
1612
*.iml
17-
.coverage
18-
.pdm.toml
13+
*.log
14+
.envrc
15+
.pdm-python
1916
.python-version
20-
21-
# =====Project=====
2217
pdm.lock
18+
uv.lock

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.5.2
3+
rev: v0.9.1
44
hooks:
55
- id: ruff-format
66
- id: ruff
77
- repo: https://github.com/executablebooks/mdformat
8-
rev: 0.7.17
8+
rev: 0.7.21
99
hooks:
1010
- id: mdformat
1111
additional_dependencies:
@@ -15,7 +15,7 @@ repos:
1515
- --number
1616
- --wrap=keep
1717
- repo: https://github.com/pre-commit/pre-commit-hooks
18-
rev: v4.6.0
18+
rev: v5.0.0
1919
hooks:
2020
- id: check-ast
2121
- id: check-builtin-literals
@@ -37,7 +37,7 @@ repos:
3737
args:
3838
- --markdown-linebreak-ext=md
3939
- repo: https://github.com/pappasam/toml-sort
40-
rev: v0.23.1
40+
rev: v0.24.2
4141
hooks:
4242
- id: toml-sort
4343
args:

Dockerfile

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
1-
FROM python:3.11
1+
FROM python:3.13
22

33
WORKDIR /app
44

55
COPY weatherdan /app/weatherdan
6-
COPY static /app/static
7-
COPY templates /app/templates
86
COPY pyproject.toml README.md run.py /app/
97

108
RUN pip install --no-cache-dir .[postgres]
119

12-
ENV XDG_CACHE_HOME /app/cache
13-
ENV XDG_CONFIG_HOME /app/config
14-
RUN mkdir -p $XDG_CONFIG_HOME/weatherdan
15-
ENV XDG_DATA_HOME /app/data
16-
RUN mkdir -p $XDG_DATA_HOME/weatherdan
10+
ENV XDG_CACHE_HOME=/app/cache \
11+
XDG_CONFIG_HOME=/app/config \
12+
XDG_DATA_HOME=/app/data \
13+
XDG_STATE_HOME=/app/state
14+
15+
RUN mkdir -p $XDG_CACHE_HOME \
16+
&& mkdir -p $XDG_CONFIG_HOME/weatherdan \
17+
&& mkdir -p $XDG_DATA_HOME/weatherdan \
18+
&& mkdir -p $XDG_STATE_HOME/weatherdan
19+
20+
COPY static /app/static
21+
COPY templates /app/templates
1722

1823
EXPOSE 25710
1924

README.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
<img src="./static/img/logo.png" align="left" width="128" height="128" alt="Weatherdan Logo"/>
2-
31
# Weatherdan
42

5-
![Python](https://img.shields.io/badge/Python-3.11-green?style=flat-square)
3+
![Python](https://img.shields.io/badge/Python-3.13-green?style=flat-square)
64
![Status](https://img.shields.io/badge/Status-Beta-yellowgreen?style=flat-square)
75

8-
[![Rye](https://img.shields.io/badge/Rye-informational?style=flat-square&logo=rye&labelColor=grey)](https://rye.astral.sh)
9-
[![Pre-Commit](https://img.shields.io/badge/Pre--Commit-informational?style=flat-square&logo=pre-commit&labelColor=grey)](https://github.com/pre-commit/pre-commit)
10-
[![Ruff](https://img.shields.io/badge/Ruff-informational?style=flat-square&logo=ruff&labelColor=grey)](https://github.com/astral-sh/ruff)
6+
[![Pre-Commit](https://img.shields.io/badge/pre--commit-enabled-informational?logo=pre-commit&style=flat-square)](https://github.com/pre-commit/pre-commit)
7+
[![Ruff](https://img.shields.io/badge/ruff-enabled-informational?logo=ruff&style=flat-square)](https://github.com/astral-sh/ruff)
118

129
[![Github - Version](https://img.shields.io/github/v/tag/Buried-In-Code/Weatherdan?logo=Github&label=Version&style=flat-square)](https://github.com/Buried-In-Code/Weatherdan/tags)
1310
[![Github - License](https://img.shields.io/github/license/Buried-In-Code/Weatherdan?logo=Github&label=License&style=flat-square)](https://opensource.org/licenses/MIT)
@@ -18,20 +15,14 @@ Currently, tracks total Rainfall and high, average and low for Solar, UV Index a
1815

1916
## Usage
2017

21-
### via Pip
18+
### via uv
2219

23-
1. Make sure you have a supported version of [Python](https://www.python.org/) installed: `python --version`
20+
1. Make sure you have [uv](https://docs.astral.sh/uv/) installed: `uv --version`
2421
2. Clone the repo: `git clone https://github.com/Buried-In-Code/Weatherdan`
25-
3. Install the project: `pip install .`
26-
4. Run using: `Weatherdan`
27-
28-
### via Pipx
29-
30-
1. Make sure you have [Pipx](https://github.com/pypa/pipx) installed: `pipx --version`
31-
2. Install the project `pipx install git+https://github.com/Buried-In-Code/Weatherdan.git`
32-
3. Run using: `Weatherdan`
22+
3. Install the project: `uv sync`
23+
4. Run using: `uv run run.py`
3324

34-
### via Docker-Compose
25+
### via Docker Compose
3526

3627
1. Make sure you have [Docker](https://www.docker.com/) installed: `docker --version`
3728
2. Make sure you have [Docker-Compose](https://github.com/docker/compose) installed: `docker-compose --version`
@@ -49,8 +40,10 @@ services:
4940
ports:
5041
- '25710:25710'
5142
volumes:
43+
- './cache:/app/cache'
5244
- './config:/app/config'
5345
- './data:/app/data'
46+
- './state:/app/state'
5447
```
5548
5649
4. Run using: `docker-compose up -d`

pyproject.toml

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,76 @@
22
build-backend = "hatchling.build"
33
requires = ["hatchling"]
44

5+
[dependency-groups]
6+
dev = [
7+
"pre-commit >= 4.0.1"
8+
]
9+
tests = [
10+
"pytest >= 8.3.4",
11+
"pytest-cov >= 6.0.0",
12+
"tox >= 4.23.2",
13+
"tox-uv >= 1.17.0"
14+
]
15+
516
[project]
617
authors = [
718
{email = "BuriedInCode@tuta.io", name = "BuriedInCode"}
819
]
920
classifiers = [
1021
"Development Status :: 4 - Beta",
22+
"Framework :: Pydantic :: 2",
1123
"Intended Audience :: End Users/Desktop",
1224
"License :: OSI Approved :: MIT License",
1325
"Natural Language :: English",
1426
"Operating System :: MacOS",
1527
"Operating System :: Microsoft :: Windows",
1628
"Operating System :: POSIX :: Linux",
17-
"Programming Language :: Python :: 3.11",
29+
"Programming Language :: Python :: 3.13",
1830
"Typing :: Typed"
1931
]
2032
dependencies = [
21-
"fastapi >= 0.104.1",
22-
"jinja2 >= 3.1.2",
23-
"pydantic >= 2.5.2",
33+
"fastapi >= 0.115.6",
34+
"jinja2 >= 3.1.5",
35+
"pydantic >= 2.10.5",
2436
"ratelimit >= 2.2.1",
25-
"requests >= 2.31.0",
26-
"rich >= 13.7.0",
27-
"sqlmodel>=0.0.19",
28-
"tomli-w >= 1.0.0",
29-
"uvicorn >= 0.24.0"
37+
"requests >= 2.32.3",
38+
"rich >= 13.9.4",
39+
"sqlmodel >= 0.0.22",
40+
"tomli-w >= 1.1.0",
41+
"uvicorn >= 0.34.0"
3042
]
3143
description = "Rainfall tracking system using Ecowitt."
3244
dynamic = ["version"]
3345
keywords = []
3446
license = {text = "MIT"}
3547
name = "weatherdan"
3648
readme = "README.md"
37-
requires-python = ">= 3.11"
49+
requires-python = ">= 3.13"
3850

3951
[project.optional-dependencies]
4052
postgres = [
41-
"psycopg >= 3.1.19"
53+
"psycopg >= 3.2.3"
4254
]
4355

44-
[project.scripts]
45-
Weatherdan = "run:main"
46-
4756
[project.urls]
4857
Issues = "https://github.com/Buried-In-Code/Weatherdan/issues"
4958
Source = "https://github.com/Buried-In-Code/Weatherdan"
5059

60+
[tool.coverage.report]
61+
show_missing = true
62+
63+
[tool.coverage.run]
64+
source = ["weatherdan"]
65+
66+
[tool.hatch.build.targets.sdist]
67+
exclude = [".github/"]
68+
5169
[tool.hatch.version]
5270
path = "weatherdan/__init__.py"
5371

72+
[tool.pytest.ini_options]
73+
addopts = ["--cov"]
74+
5475
[tool.ruff]
5576
fix = true
5677
line-length = 100
@@ -68,7 +89,6 @@ ignore = [
6889
"COM812",
6990
"D",
7091
"DTZ",
71-
"EXE",
7292
"FBT",
7393
"PLR2004",
7494
"TCH"
@@ -101,7 +121,5 @@ convention = "google"
101121
[tool.ruff.lint.pyupgrade]
102122
keep-runtime-typing = true
103123

104-
[tool.rye]
105-
dev-dependencies = [
106-
"pre-commit >= 3.7.1"
107-
]
124+
[tool.tomlsort]
125+
all = true

0 commit comments

Comments
 (0)