Compare commits
3
Commits
0.5.3
...
ca08bc282d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca08bc282d | ||
|
|
a19de3e01d | ||
|
|
f79f754f1b |
@@ -173,7 +173,7 @@
|
|||||||
{% for value in response.values %}
|
{% for value in response.values %}
|
||||||
<td class="humidity"
|
<td class="humidity"
|
||||||
style="background-color: rgba(128, 128, 255, {{value.humidity * 0.005}});">
|
style="background-color: rgba(128, 128, 255, {{value.humidity * 0.005}});">
|
||||||
<span class="value">{{value.humidity}}</span>
|
{% if value.humidity > -1%}<span class="value">{{value.humidity}}</span>{% endif %}
|
||||||
</td>
|
</td>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class ForecastItemParser:
|
|||||||
# TODO parse temperature interval flag
|
# TODO parse temperature interval flag
|
||||||
value.temperature = [round(item.main.temp)]
|
value.temperature = [round(item.main.temp)]
|
||||||
# value.temperature = [round(item.main.temp_max), round(item.main.temp_min)]
|
# value.temperature = [round(item.main.temp_max), round(item.main.temp_min)]
|
||||||
value.pressure = [round(item.main.pressure / 133.3 * 100)]
|
value.pressure = [round(item.main.pressure * 0.75006)]
|
||||||
value.humidity = item.main.humidity
|
value.humidity = item.main.humidity
|
||||||
value.wind_speed = round(item.wind.speed)
|
value.wind_speed = round(item.wind.speed)
|
||||||
value.wind_gust = round(item.wind.gust)
|
value.wind_gust = round(item.wind.gust)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import datetime
|
|||||||
from enum import StrEnum, auto
|
from enum import StrEnum, auto
|
||||||
from typing import Self
|
from typing import Self
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
class Model(BaseModel):
|
class Model(BaseModel):
|
||||||
@@ -116,8 +116,8 @@ class WeatherValue(Model):
|
|||||||
wind_gust: int
|
wind_gust: int
|
||||||
wind_direction: float
|
wind_direction: float
|
||||||
precipitation: float
|
precipitation: float
|
||||||
pressure: list[int]
|
pressure: list[int] = Field(default=[])
|
||||||
humidity: int
|
humidity: int = Field(default=-1)
|
||||||
|
|
||||||
|
|
||||||
class WeatherResponse(Model):
|
class WeatherResponse(Model):
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "gallery"
|
name = "gallery"
|
||||||
description = ""
|
description = ""
|
||||||
version = "0.5.3"
|
version = "0.5.4"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [{ name = "shmyga", email = "shmyga.z@gmail.com" }]
|
authors = [{ name = "shmyga", email = "shmyga.z@gmail.com" }]
|
||||||
requires-python = '>=3.14,<4.0'
|
requires-python = '>=3.14,<4.0'
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "gallery",
|
"name": "gallery",
|
||||||
"version": "0.5.3",
|
"version": "0.5.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "gallery",
|
"name": "gallery",
|
||||||
"version": "0.5.3",
|
"version": "0.5.4",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.8",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gallery",
|
"name": "gallery",
|
||||||
"version": "0.5.3",
|
"version": "0.5.4",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack --mode production",
|
"build": "webpack --mode production",
|
||||||
|
|||||||
Reference in New Issue
Block a user