Skip to content

Commit

Permalink
Merge commit 'b86f9b8691702a91bd558cd2a94963d274a995d1' into site-bug
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/india_api/internal/service/regions.py
  • Loading branch information
peterdudfield committed Nov 12, 2024
2 parents cb5e972 + b86f9b8 commit dc62cb3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[bumpversion]
commit = True
tag = True
current_version = 0.1.43
current_version = 0.1.45
message = Bump version: {current_version} → {new_version}

[bumpversion:file:src/india_api/internal/service/server.py]
Expand Down
5 changes: 5 additions & 0 deletions src/india_api/internal/service/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class GetSourcesResponse(BaseModel):
@router.get(
"/sources",
status_code=status.HTTP_200_OK,
include_in_schema=False,
)
def get_sources_route(auth: dict = Depends(auth)) -> GetSourcesResponse:
"""Function for the sources route."""
Expand Down Expand Up @@ -60,6 +61,7 @@ def validate_source(source: str) -> str:
@router.get(
"/{source}/regions",
status_code=status.HTTP_200_OK,
include_in_schema=False,
)
def get_regions_route(
source: ValidSourceDependency,
Expand All @@ -85,6 +87,7 @@ class GetHistoricGenerationResponse(BaseModel):
@router.get(
"/{source}/{region}/generation",
status_code=status.HTTP_200_OK,
include_in_schema=False,
)
def get_historic_timeseries_route(
source: ValidSourceDependency,
Expand Down Expand Up @@ -126,6 +129,7 @@ class GetForecastGenerationResponse(BaseModel):
@router.get(
"/{source}/{region}/forecast",
status_code=status.HTTP_200_OK,
include_in_schema=False,
)
def get_forecast_timeseries_route(
source: ValidSourceDependency,
Expand Down Expand Up @@ -180,6 +184,7 @@ def get_forecast_timeseries_route(
@router.get(
"/{source}/{region}/forecast/csv",
response_class=FileResponse,
include_in_schema=False,
)
def get_forecast_da_csv(
source: ValidSourceDependency,
Expand Down
15 changes: 8 additions & 7 deletions src/india_api/internal/service/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
log = logging.getLogger(__name__)
version = "0.1.43"
version = "0.1.45"


tags_metadata = [
Expand All @@ -28,12 +28,13 @@
"Each site will have one source of energy "
"and there is forecast and generation data for each site. ",
},
{
"name": "Regions",
"description": "A region is an area of land e.g. Alaska in the USA. "
"There is forecast and generation data for each region "
"and there may be different sources of energy in one region.",
},
# I want to keep this here, as we might add this back in the future
# {
# "name": "Regions",
# "description": "A region is an area of land e.g. Alaska in the USA. "
# "There is forecast and generation data for each region "
# "and there may be different sources of energy in one region.",
# },
]

title = "India API"
Expand Down

0 comments on commit dc62cb3

Please sign in to comment.