Compare commits
9
Commits
develop
...
3297a66153
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3297a66153 | ||
|
|
d55c945dcd | ||
|
|
2c10f81008 | ||
|
|
c513c2a7a7 | ||
|
|
234d9c33d4 | ||
|
|
32956af5f0 | ||
|
|
57112793e7 | ||
|
|
ecfa9caecc | ||
|
|
c0ae3f3be8 |
@@ -13,10 +13,11 @@ jobs:
|
||||
- uses: appleboy/ssh-action@v1
|
||||
with:
|
||||
host: ${{ secrets.DEPLOY_HOST }}
|
||||
port: ${{ secrets.DEPLOY_PORT }}
|
||||
username: ${{ secrets.DEPLOY_USERNAME }}
|
||||
key: ${{ secrets.DEPLOY_KEY }}
|
||||
passphrase: ${{ secrets.DEPLOY_PASSPHRASE }}
|
||||
script: |
|
||||
cd /opt/gallery
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
/Volume1/@apps/DockerEngine/dockerd/bin/docker-compose pull
|
||||
/Volume1/@apps/DockerEngine/dockerd/bin/docker-compose up -d
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ ENV PATH="$POETRY_HOME/bin:$PATH"
|
||||
RUN apt update && \
|
||||
apt install -y gettext
|
||||
WORKDIR /app
|
||||
RUN curl -sSL https://install.python-poetry.org | python3 -
|
||||
RUN pip install poetry
|
||||
COPY pyproject.toml poetry.lock README.md ./
|
||||
RUN poetry config virtualenvs.in-project true
|
||||
RUN --mount=type=cache,target=/root/.cache/pypoetry/cache \
|
||||
|
||||
@@ -29,6 +29,7 @@ def cloudness_icon(sky: Sky, date: datetime.datetime, period: str) -> list[str]:
|
||||
Precipitation.RAIN: "thunderstorm",
|
||||
Precipitation.HEAVY_RAIN: "thunderstorm",
|
||||
Precipitation.SHOWER: "thunderstorm",
|
||||
Precipitation.SMALL_SNOW: "storm-showers",
|
||||
Precipitation.SNOW: "storm-showers",
|
||||
Precipitation.HEAVY_SNOW: "storm-showers",
|
||||
}[sky.precipitation]
|
||||
@@ -47,6 +48,7 @@ def cloudness_icon(sky: Sky, date: datetime.datetime, period: str) -> list[str]:
|
||||
Precipitation.RAIN: "rain-mix",
|
||||
Precipitation.HEAVY_RAIN: "rain",
|
||||
Precipitation.SHOWER: "rain",
|
||||
Precipitation.SMALL_SNOW: "snow",
|
||||
Precipitation.SNOW: "snow",
|
||||
Precipitation.HEAVY_SNOW: "snow",
|
||||
Precipitation.HAIL: "hail",
|
||||
|
||||
@@ -81,6 +81,8 @@ class SkyParser(TableValueParser[Sky]):
|
||||
"небольшой снег с дождём": Precipitation.SNOW,
|
||||
"небольшой мокрый снег": Precipitation.SNOW,
|
||||
"град": Precipitation.HAIL,
|
||||
"небольшая морось": Precipitation.SMALL_RAIN,
|
||||
"морось": Precipitation.SMALL_RAIN,
|
||||
}
|
||||
|
||||
THUNDER = {"гроза"}
|
||||
|
||||
@@ -86,6 +86,10 @@ class PrecipitationParser(TableValueParser[tuple[Precipitation, float]]):
|
||||
"Явления погоды отсутствуют": Precipitation.NO,
|
||||
"Cлабый дождь": Precipitation.SMALL_RAIN,
|
||||
"Умеренный дождь": Precipitation.RAIN,
|
||||
"Cлабый дождь со снегом": Precipitation.SMALL_SNOW,
|
||||
"Слабый снег с дождём": Precipitation.SMALL_SNOW,
|
||||
"Cлабый снег": Precipitation.SMALL_SNOW,
|
||||
"Снег": Precipitation.SNOW,
|
||||
}
|
||||
|
||||
def extract(self, data: Tag) -> tuple[Precipitation, float]:
|
||||
|
||||
@@ -61,7 +61,7 @@ class TemperatureParser(TableValueParser[list[int]]):
|
||||
model_key = "temperature"
|
||||
|
||||
def extract(self, data: Tag) -> list[int]:
|
||||
return [int(data.text.strip().rstrip("°"))]
|
||||
return [int(data.text.strip().rstrip("°").replace("−", "-"))]
|
||||
|
||||
|
||||
class SkyParser(TableValueParser[Sky]):
|
||||
@@ -79,6 +79,8 @@ class SkyParser(TableValueParser[Sky]):
|
||||
"небольшой дождь": Precipitation.SMALL_RAIN,
|
||||
"дождь": Precipitation.RAIN,
|
||||
"ливень": Precipitation.SHOWER,
|
||||
"дождь со снегом": Precipitation.SNOW,
|
||||
"снег": Precipitation.SNOW,
|
||||
}
|
||||
|
||||
def extract(self, data: Tag) -> Sky:
|
||||
|
||||
@@ -40,6 +40,7 @@ class Precipitation(StrEnum):
|
||||
RAIN = auto()
|
||||
HEAVY_RAIN = auto()
|
||||
SHOWER = auto()
|
||||
SMALL_SNOW = auto()
|
||||
SNOW = auto()
|
||||
HEAVY_SNOW = auto()
|
||||
HAIL = auto()
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "gallery"
|
||||
description = ""
|
||||
version = "0.10.6"
|
||||
version = "0.10.10"
|
||||
readme = "README.md"
|
||||
authors = [{ name = "shmyga", email = "shmyga.z@gmail.com" }]
|
||||
requires-python = ">=3.14,<4.0"
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "gallery",
|
||||
"version": "0.10.6",
|
||||
"version": "0.10.10",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "gallery",
|
||||
"version": "0.10.6",
|
||||
"version": "0.10.10",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@popperjs/core": "^2.11.8",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gallery",
|
||||
"version": "0.10.6",
|
||||
"version": "0.10.10",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "webpack --mode production",
|
||||
|
||||
Reference in New Issue
Block a user