Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#262)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.2.2](astral-sh/ruff-pre-commit@v0.1.9...v0.2.2)
- [github.com/psf/black: 23.12.1 → 24.2.0](psf/black@23.12.1...24.2.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Mar 8, 2024
1 parent 4ae9dc2 commit da3510f
Show file tree
Hide file tree
Showing 57 changed files with 61 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ repos:
# python code formatting/linting
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: "v0.1.9"
rev: "v0.2.2"
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.2.0
hooks:
- id: black
args: [--line-length, "100"]
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Init file """

__version__ = "1.5.30"

N_GSP = 317
1 change: 1 addition & 0 deletions nowcasting_datamodel/connection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Database Connection class"""

import logging

from sqlalchemy import create_engine
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/fake.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Functions used to make fake forecasts"""

from datetime import datetime, time, timedelta, timezone
from typing import List, Optional

Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/migrations/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" App for running database migrations """

import logging
import os
import time
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/migrations/forecast/env.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" run migrations on Forecast Database """

import os
from logging.config import fileConfig

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-05-25 15:14:41.470270
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-06-23 13:56:35.495237
"""

import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-03-08 11:57:23.566779
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-03-11 13:39:18.824128
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-03-03 10:26:15.127508
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-12-07 11:26:09.780570
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-11-01 21:33:13.458726
"""

import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Create Date: 2023-04-14 15:05:00.205258
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-08-24 09:36:13.958479
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-09-21 08:25:53.202001
"""

import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Create Date: 2023-04-05 12:10:16.432811
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-11-15 11:50:10.675940
"""

from alembic import op

# revision identifiers, used by Alembic.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-09-05 16:23:05.072073
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-05-09 12:47:37.931766
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Create Date: 2022-05-26 07:50:23.497661
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-07-03 11:00:31.216789
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Create Date: 2022-05-09 21:42:38.179441
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-10-02 13:44:28.142008
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Create Date: 2023-04-14 15:45:13.418891
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-03-21 15:56:09.757720
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-11-14 18:56:23.171628
"""

import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-05-11 15:07:43.373248
"""

import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Create Date: 2023-09-07 12:55:37.559371
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-04-26 11:49:37.117564
"""

from alembic import op

# revision identifiers, used by Alembic.
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/migrations/pv/env.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" run migrations on PV Database """

import os
from logging.config import fileConfig

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Create Date: 2022-07-07 10:40:36.952739
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-03-11 13:39:18.848072
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-05-20 10:36:41.016224
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-06-08 18:42:48.890956
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2022-03-21 09:05:41.512769
"""

import sqlalchemy as sa
from alembic import op

Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/models/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Base files for SQL sqlalchemy """

from sqlalchemy.orm import declarative_base

Base_Forecast = declarative_base() # noqa
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/models/gsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
8. GSP yield for storing GSP yield data
"""

import logging
from datetime import datetime
from typing import ClassVar, List, Optional
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
6. Forecasts, a forecast that is made for one gsp, for several time steps into the future
"""

import logging
from datetime import datetime
from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/models/pv.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
8. PV yield for storing PV data (pv.py)
"""

import logging
from datetime import datetime
from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/models/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" General Models"""

from datetime import datetime

from pydantic import BaseModel
Expand Down
7 changes: 4 additions & 3 deletions nowcasting_datamodel/national.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Make national forecasts """

import logging
from typing import List

Expand Down Expand Up @@ -57,9 +58,9 @@ def make_national_forecast(
forecast_values_flat.append(one_gsp)

forecast_values_df = pd.concat(forecast_values_flat)
forecast_values_df[
"count"
] = 1 # this will be used later to check that there are 338 forecasts for each target_time
forecast_values_df["count"] = (
1 # this will be used later to check that there are 338 forecasts for each target_time
)

# group by target time
forecast_values_df = forecast_values_df.groupby(["target_time"]).sum()
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/read/blend/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utils for blending forecasts together"""

from datetime import datetime, timedelta, timezone
from typing import List, Union

Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/read/blend/weights.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions to make weights for blending"""

from datetime import datetime, timedelta, timezone
from typing import List, Optional

Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/read/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
2. get the latest forecasts for all gsp ids
3. get all forecast values
"""

from datetime import datetime, timedelta, timezone
from typing import List, Optional, Union

Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/read/read_gsp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Read pv functions """

import logging
from datetime import datetime, timezone
from typing import List, Optional, Union
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/read/read_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
1. Get the one metric
2. get datetime interval
"""

import logging
from datetime import datetime, timezone
from typing import List, Optional
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/read/read_pv.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Read pv functions """

import logging
from datetime import datetime, timezone
from typing import List, Optional, Union
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/read/read_user.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Read user"""

import logging
from datetime import datetime
from typing import List, Optional
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/save/adjust.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Methods for adding adjust values to the forecast"""

import logging
from datetime import datetime, timedelta
from typing import List, Optional, Union
Expand Down
1 change: 1 addition & 0 deletions nowcasting_datamodel/save/save.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Save forecasts to the database """

import logging
import os
from typing import List, Optional
Expand Down
Loading

0 comments on commit da3510f

Please sign in to comment.