Skip to content

Commit

Permalink
Upgrade numpy, pydantic and nowcasting_datamodel (#79)
Browse files Browse the repository at this point in the history
* cast to float

* lock greater than 2

* or equal to

* convert column to datetime
  • Loading branch information
mduffin95 authored Jul 2, 2024
1 parent bae506d commit b04aea8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions gspconsumer/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def pull_data_and_save(
# need columns datetime_utc, solar_generation_kw
gsp_yield_df["solar_generation_kw"] = 1000 * gsp_yield_df["generation_mw"]
gsp_yield_df["datetime_utc"] = gsp_yield_df["datetime_gmt"]
gsp_yield_df["pvlive_updated_utc"] = gsp_yield_df["updated_gmt"]
gsp_yield_df["pvlive_updated_utc"] = pd.to_datetime(gsp_yield_df["updated_gmt"])
gsp_yield_df = gsp_yield_df[
[
"solar_generation_kw",
Expand All @@ -228,7 +228,7 @@ def pull_data_and_save(
# update installed capacity
if len(gsp_yield_df) > 0:
current_installed_capacity = gsp_yield_sql.location.installed_capacity_mw
new_installed_capacity = gsp_yield_df["installedcapacity_mwp"].iloc[0]
new_installed_capacity = float(gsp_yield_df["installedcapacity_mwp"].iloc[0])
if current_installed_capacity != new_installed_capacity:
logger.debug(
f"Going to update the capacity from "
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
numpy
pydantic<2.0
numpy>=2
pydantic>=2
pandas
pyyaml
urllib3
requests
nowcasting_datamodel==1.4.6
nowcasting_datamodel==1.5.46
#git+https://github.com/SheffieldSolar/PV_Live-API#pvlive_api
click

0 comments on commit b04aea8

Please sign in to comment.