Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename to sheffield_solar_passiv #82

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nowcasting_datamodel/models/pv.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

logger = logging.getLogger(__name__)
pv_output = "pvoutput.org"
solar_sheffield_passiv = "solar_sheffield_passiv"
providers = [pv_output, solar_sheffield_passiv]
sheffield_solar_passiv = "sheffield_solar_passiv"
providers = [pv_output, sheffield_solar_passiv]

########
# 7. PV Metadata
Expand Down Expand Up @@ -85,7 +85,7 @@ def to_orm(self) -> PVSystemSQL:
orientation=self.orientation,
status_interval_minutes=self.status_interval_minutes,
correct_data=self.correct_data,
installed_capacity_kw=self.installed_capacity_kw
installed_capacity_kw=self.installed_capacity_kw,
)


Expand Down
10 changes: 8 additions & 2 deletions tests/read/test_read_pv.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import logging
from datetime import datetime

from nowcasting_datamodel.models import PVSystem, PVSystemSQL, PVYield, pv_output, solar_sheffield_passiv
from nowcasting_datamodel.models import (
PVSystem,
PVSystemSQL,
PVYield,
pv_output,
sheffield_solar_passiv,
)
from nowcasting_datamodel.read.read_pv import get_latest_pv_yield, get_pv_systems, get_pv_yield
from nowcasting_datamodel.save import save_pv_system

Expand Down Expand Up @@ -136,7 +142,7 @@ def test_read_pv_yield(db_session_pv, pv_yields_and_systems):

def test_read_pv_yield_providers(db_session_pv, pv_yields_and_systems):
assert len(get_pv_yield(session=db_session_pv, providers=[pv_output])) == 3
assert len(get_pv_yield(session=db_session_pv, providers=[solar_sheffield_passiv])) == 0
assert len(get_pv_yield(session=db_session_pv, providers=[sheffield_solar_passiv])) == 0


def test_read_pv_yield_correct_data(db_session_pv, pv_yields_and_systems):
Expand Down