diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index ff52c0f8a..c6858880f 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -149,7 +149,7 @@ jobs: shell: bash run: | oc login "${{ secrets.OPENSHIFT_CLUSTER }}" --token="${{ secrets.OC4_DEV_TOKEN }}" - MODULE_NAME=api SECOND_LEVEL_DOMAIN="apps.silver.devops.gov.bc.ca" VANITY_DOMAIN="${SUFFIX}-dev-psu.apps.silver.devops.gov.bc.ca" USE_WFWX="True" ENVIRONMENT="development" bash openshift/scripts/oc_deploy.sh ${SUFFIX} apply + MODULE_NAME=api SECOND_LEVEL_DOMAIN="apps.silver.devops.gov.bc.ca" VANITY_DOMAIN="${SUFFIX}-dev-psu.apps.silver.devops.gov.bc.ca" ENVIRONMENT="development" bash openshift/scripts/oc_deploy.sh ${SUFFIX} apply ## TODO: re-enable once crunchy is deployed: https://app.zenhub.com/workspaces/bcws---agile-psu-5e321393e038fba5bbe203b8/issues/gh/bcgov/wps/2340 - name: Hourly actuals cronjob diff --git a/api/app/.env.example b/api/app/.env.example index 2fbf297d4..19a0499e4 100644 --- a/api/app/.env.example +++ b/api/app/.env.example @@ -1,7 +1,6 @@ # This is a sample .env file that can be used for local development. ORIGINS="http://localhost http://localhost:3000 http://127.0.0.1 http://127.0.0.1:3000" HOSTNAME=localhost -USE_WFWX=False WFWX_AUTH_URL=https://somewhere WFWX_BASE_URL=https://somewhere WFWX_USER=someusear diff --git a/api/app/hourlies.py b/api/app/hourlies.py index 1efdcd2ac..bd8ea3964 100644 --- a/api/app/hourlies.py +++ b/api/app/hourlies.py @@ -77,14 +77,10 @@ async def get_hourly_readings( """ start_time_stamp, end_time_stamp = _get_time_interval(time_of_interest) - if wfwx_api.use_wfwx(): - # Limit the number of concurrent connections. - async with ClientSession(connector=TCPConnector(limit=10)) as session: - header = await wfwx_api.get_auth_header(session) - return await wfwx_api.get_hourly_readings( - session, header, station_codes, start_time_stamp, end_time_stamp) - - return await fetch_hourly_readings_from_db(station_codes, start_time_stamp, end_time_stamp) + # Limit the number of concurrent connections. + async with ClientSession(connector=TCPConnector(limit=10)) as session: + header = await wfwx_api.get_auth_header(session) + return await wfwx_api.get_hourly_readings(session, header, station_codes, start_time_stamp, end_time_stamp) async def get_hourly_readings_in_time_interval( diff --git a/api/app/stations.py b/api/app/stations.py index 6d03aef28..25d029b8a 100644 --- a/api/app/stations.py +++ b/api/app/stations.py @@ -20,10 +20,7 @@ import app.db.database from app.db.crud.stations import get_noon_forecast_observation_union from app.wildfire_one import wfwx_api -from app.wildfire_one.wfwx_api import (get_auth_header, - get_detailed_stations, - get_station_data, - use_wfwx) +from app.wildfire_one.wfwx_api import get_auth_header, get_detailed_stations, get_station_data logger = logging.getLogger(__name__) @@ -104,36 +101,16 @@ async def _get_detailed_stations(time_of_interest: datetime): return geojson_stations -def _get_stations_by_codes_local(station_codes: List[int]) -> List[WeatherStation]: - """ Get a list of stations by code, from local json files. """ - logger.info('Using pre-generated json to retrieve station by code') - with open(weather_stations_file_path, encoding="utf-8") as file_pointer: - stations = json.load(file_pointer) - results = [] - for station in stations['weather_stations']: - if int(station['code']) in station_codes: - results.append(WeatherStation(**station)) - return results - - async def get_stations_by_codes(station_codes: List[int]) -> List[WeatherStation]: - """ Get a list of stations by code, from WFWX Fireweather API. """ - if use_wfwx(): - logger.info('Fetching stations from WFWX') - return await wfwx_api.get_stations_by_codes(station_codes) - return _get_stations_by_codes_local(station_codes) + """Get a list of stations by code, from WFWX Fireweather API.""" + return await wfwx_api.get_stations_by_codes(station_codes) async def get_stations_from_source( station_source: StationSourceEnum = StationSourceEnum.WILDFIRE_ONE) -> List[WeatherStation]: """ Get list of stations from some source (ideally WFWX Fireweather API) """ - if station_source == StationSourceEnum.UNSPECIFIED: - # If station source is unspecified, check configuration: - if use_wfwx(): - return await get_stations_asynchronously() - elif station_source == StationSourceEnum.WILDFIRE_ONE: - # Get from wildfire one: + if station_source == StationSourceEnum.UNSPECIFIED or station_source == StationSourceEnum.WILDFIRE_ONE: return await get_stations_asynchronously() # Get from local: return _get_stations_local() @@ -145,8 +122,7 @@ async def fetch_detailed_stations_as_geojson( -> List[GeoJsonDetailedWeatherStation]: """ Fetch a detailed list of stations. i.e. more than just the fire station name and code, throw some observations and forecast in the mix. """ - if station_source == StationSourceEnum.WILDFIRE_ONE or ( - station_source == StationSourceEnum.UNSPECIFIED and use_wfwx()): + if station_source == StationSourceEnum.UNSPECIFIED or station_source == StationSourceEnum.WILDFIRE_ONE: # Get from wildfire one: logger.info('requesting detailed stations...') result = await get_detailed_stations(time_of_interest) diff --git a/api/app/tests/conftest.py b/api/app/tests/conftest.py index fe069c8fd..ea33578bc 100644 --- a/api/app/tests/conftest.py +++ b/api/app/tests/conftest.py @@ -42,7 +42,6 @@ def anyio_backend(): def mock_env(monkeypatch): """Automatically mock environment variable""" monkeypatch.setenv("BASE_URI", "https://python-test-base-uri") - monkeypatch.setenv("USE_WFWX", "False") monkeypatch.setenv("WFWX_USER", "user") monkeypatch.setenv("WFWX_SECRET", "secret") monkeypatch.setenv("WFWX_AUTH_URL", "https://wf1/pub/oauth2/v1/oauth/token") @@ -158,12 +157,6 @@ def mock_get_prediction_run(session, prediction_model_id: int, prediction_run_ti monkeypatch.setattr(app.jobs.env_canada, "get_prediction_run", mock_get_prediction_run) -@pytest.fixture() -def mock_env_with_use_wfwx(monkeypatch): - """Set environment variable USE_WFWX to 'True'""" - monkeypatch.setenv("USE_WFWX", "True") - - @pytest.fixture() def mock_jwt_decode(monkeypatch): """Mock pyjwt's decode method""" diff --git a/api/app/tests/fixtures/wf1/lookup.json b/api/app/tests/fixtures/wf1/lookup.json index 6d6a265c9..084f956ea 100644 --- a/api/app/tests/fixtures/wf1/lookup.json +++ b/api/app/tests/fixtures/wf1/lookup.json @@ -41,6 +41,33 @@ }, "{'size': '1000', 'sort': 'displayLabel', 'page': 0, 'query': 'stationCode==230 or stationCode==239'}": { "None": "wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==230_or_stationCode==239.json" + }, + "{'size': '1000', 'sort': 'displayLabel', 'page': 0, 'query': ''}": { + "None": "wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_.json" + }, + "{'size': '1000', 'sort': 'displayLabel', 'page': 0, 'query': 'stationCode==209 or stationCode==211 or stationCode==302'}": { + "None": "wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==209_or_stationCode==211_or_stationCode==302.json" + }, + "{'size': '1000', 'sort': 'displayLabel', 'page': 0, 'query': 'stationCode==322'}": { + "None": "wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==322.json" + }, + "{'size': '1000', 'sort': 'displayLabel', 'page': 0, 'query': 'stationCode==322 or stationCode==838'}": { + "None": "wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==322_or_stationCode==838.json" + }, + "{'size': '1000', 'sort': 'displayLabel', 'page': 0, 'query': 'stationCode==838'}": { + "None": "wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==838.json" + }, + "{'size': '1000', 'sort': 'displayLabel', 'page': 0, 'query': 'stationCode==838 or stationCode==209'}": { + "None": "wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==838_or_stationCode==209.json" + }, + "{'size': '1000', 'sort': 'displayLabel', 'page': 0, 'query': 'stationCode==956'}": { + "None": "wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==956.json" + }, + "{'size': '1000', 'sort': 'displayLabel', 'page': 0, 'query': 'stationCode==999'}": { + "None": "wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==999.json" + }, + "{'size': '1000', 'sort': 'displayLabel', 'page': 0, 'query': 'stationCode==209 or stationCode==322'}": { + "None": "wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==209_or_stationCode==322.json" } } }, diff --git a/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==209_or_stationCode==211_or_stationCode==302.json b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==209_or_stationCode==211_or_stationCode==302.json new file mode 100644 index 000000000..72c2d6f10 --- /dev/null +++ b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==209_or_stationCode==211_or_stationCode==302.json @@ -0,0 +1,434 @@ +{ + "_embedded": { + "stations": [ + { + "id": "bfe0a6e2-e269-0210-e053-259e228e58c7", + "displayLabel": "ALEXIS CREEK", + "createdBy": "LEGACY_DATA_LOAD", + "lastModifiedBy": "WFWX_WEATHER_API", + "lastEntityUpdateTimestamp": 1729024286768, + "updateDate": "2024-10-15T20:31:26.000+0000", + "stationCode": 209, + "stationAcronym": "FAC", + "stationStatus": { + "id": "ACTIVE", + "displayLabel": "Active", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "dataSource": { + "id": "AUTO_CALLR", + "displayLabel": "Auto-Caller", + "displayOrder": 1, + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "dataLoggerType": { + "id": "AXIOM_F6", + "displayLabel": "AXIOM/F6", + "displayOrder": 3, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "siteType": { + "id": "WXSTN_GOES", + "displayLabel": "Weather Station - GOES", + "displayOrder": 5, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "weatherZone": { + "id": 17, + "displayLabel": "Zone 17", + "dangerRegion": 2, + "displayOrder": 17 + }, + "stationAccessTypeCode": { + "id": "4WD", + "displayLabel": "4 Wheel Drive", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "hourly": true, + "pluvioSnowGuage": true, + "latitude": 52.08377, + "longitude": -123.2732667, + "geometry": { + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + }, + "coordinates": [ + -123.2732667, + 52.08377 + ], + "type": "Point" + }, + "elevation": 791, + "windspeedAdjRoughness": 1.0, + "windspeedHeight": { + "id": "9.0_11.9", + "displayLabel": "9.0 - 11.9 (m)", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "surfaceType": null, + "overWinterPrecipAdj": true, + "influencingSlope": 2, + "installationDate": 315558000000, + "decommissionDate": null, + "influencingAspect": null, + "owner": { + "id": "a9843bb7-0f44-4a80-8a62-79cca2a5c758", + "displayLabel": "BC Wildfire Service", + "displayOrder": 2, + "ownerName": "BCWS", + "ownerDisplayName": "BC Wildfire Service", + "ownerComment": null, + "createdBy": "DATA_LOAD", + "lastModifiedBy": "DATAFIX - WFWX-891", + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "fireCentre": { + "id": 2, + "displayLabel": "Cariboo Fire Centre", + "alias": 7, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "zone": { + "id": 7, + "displayLabel": "Chilcotin Zone", + "alias": 5, + "fireCentre": "Cariboo Fire Centre", + "fireCentreAlias": 7, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "comments": "1st Daily 19800501; coordinates updated 2007/10/03 (P2)", + "ecccFileBaseUrlTemplate": null, + "lastProcessedSourceTime": "2024-10-15T13:31:26", + "crdStationName": null, + "stationAccessDescription": "Alexis creek Wx station is located 150M N/W of the Chilcolin FLNRO field office. Head west on Highway 20 from Williams Lake for an hour and thirty minutes or 112 Kilometers turning right on to Stum Lake Road for 100m and turn right again.", + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/rsql/bfe0a6e2-e269-0210-e053-259e228e58c7" + } + } + }, + { + "id": "bfe0a6e2-e3bc-0210-e053-259e228e58c7", + "displayLabel": "ASPEN GROVE", + "createdBy": "LEGACY_DATA_LOAD", + "lastModifiedBy": "WFWX_WEATHER_API", + "lastEntityUpdateTimestamp": 1729024261163, + "updateDate": "2024-10-15T20:31:01.000+0000", + "stationCode": 302, + "stationAcronym": "FSG", + "stationStatus": { + "id": "ACTIVE", + "displayLabel": "Active", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "dataSource": { + "id": "AUTO_CALLR", + "displayLabel": "Auto-Caller", + "displayOrder": 1, + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "dataLoggerType": { + "id": "FWS12S", + "displayLabel": "FWS12S", + "displayOrder": 6, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "siteType": { + "id": "WXSTN_CELL", + "displayLabel": "Weather Station - Cell", + "displayOrder": 6, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "weatherZone": { + "id": 20, + "displayLabel": "Zone 20", + "dangerRegion": 3, + "displayOrder": 20 + }, + "stationAccessTypeCode": { + "id": "4WD", + "displayLabel": "4 Wheel Drive", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "hourly": true, + "pluvioSnowGuage": false, + "latitude": 49.94811, + "longitude": -120.62107, + "geometry": { + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + }, + "coordinates": [ + -120.62107, + 49.94811 + ], + "type": "Point" + }, + "elevation": 1065, + "windspeedAdjRoughness": 1.0, + "windspeedHeight": { + "id": "9.0_11.9", + "displayLabel": "9.0 - 11.9 (m)", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "surfaceType": null, + "overWinterPrecipAdj": false, + "influencingSlope": 0, + "installationDate": 912322800000, + "decommissionDate": null, + "influencingAspect": null, + "owner": { + "id": "a9843bb7-0f44-4a80-8a62-79cca2a5c758", + "displayLabel": "BC Wildfire Service", + "displayOrder": 2, + "ownerName": "BCWS", + "ownerDisplayName": "BC Wildfire Service", + "ownerComment": null, + "createdBy": "DATA_LOAD", + "lastModifiedBy": "DATAFIX - WFWX-891", + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "fireCentre": { + "id": 25, + "displayLabel": "Kamloops Fire Centre", + "alias": 5, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "zone": { + "id": 31, + "displayLabel": "Merritt Zone", + "alias": 6, + "fireCentre": "Kamloops Fire Centre", + "fireCentreAlias": 5, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "comments": "Installed Cell Modem June 2021.", + "ecccFileBaseUrlTemplate": null, + "lastProcessedSourceTime": "2024-10-15T13:31:01", + "crdStationName": null, + "stationAccessDescription": "Just off Hwy #5A by Aspen Grove near the junction with 97C, through the cattle gate over guard, 200m to site.", + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/rsql/bfe0a6e2-e3bc-0210-e053-259e228e58c7" + } + } + }, + { + "id": "bfe0a6e2-e26b-0210-e053-259e228e58c7", + "displayLabel": "NAZKO", + "createdBy": "LEGACY_DATA_LOAD", + "lastModifiedBy": "WFWX_WEATHER_API", + "lastEntityUpdateTimestamp": 1729024296549, + "updateDate": "2024-10-15T20:31:36.000+0000", + "stationCode": 211, + "stationAcronym": "FNZ", + "stationStatus": { + "id": "ACTIVE", + "displayLabel": "Active", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "dataSource": { + "id": "AUTO_CALLR", + "displayLabel": "Auto-Caller", + "displayOrder": 1, + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "dataLoggerType": { + "id": "FWS12S", + "displayLabel": "FWS12S", + "displayOrder": 6, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "siteType": { + "id": "WXSTN_GOES", + "displayLabel": "Weather Station - GOES", + "displayOrder": 5, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "weatherZone": { + "id": 17, + "displayLabel": "Zone 17", + "dangerRegion": 2, + "displayOrder": 17 + }, + "stationAccessTypeCode": { + "id": "4WD", + "displayLabel": "4 Wheel Drive", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "hourly": true, + "pluvioSnowGuage": false, + "latitude": 52.9575, + "longitude": -123.5958, + "geometry": { + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + }, + "coordinates": [ + -123.5958, + 52.9575 + ], + "type": "Point" + }, + "elevation": 910, + "windspeedAdjRoughness": 1.0, + "windspeedHeight": { + "id": "9.0_11.9", + "displayLabel": "9.0 - 11.9 (m)", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "surfaceType": null, + "overWinterPrecipAdj": true, + "influencingSlope": 0, + "installationDate": 801122400000, + "decommissionDate": null, + "influencingAspect": null, + "owner": { + "id": "a9843bb7-0f44-4a80-8a62-79cca2a5c758", + "displayLabel": "BC Wildfire Service", + "displayOrder": 2, + "ownerName": "BCWS", + "ownerDisplayName": "BC Wildfire Service", + "ownerComment": null, + "createdBy": "DATA_LOAD", + "lastModifiedBy": "DATAFIX - WFWX-891", + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "fireCentre": { + "id": 2, + "displayLabel": "Cariboo Fire Centre", + "alias": 7, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "zone": { + "id": 3, + "displayLabel": "Quesnel Zone", + "alias": 1, + "fireCentre": "Cariboo Fire Centre", + "fireCentreAlias": 7, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "comments": "1st daily 19810501; CRMP- GOES NESID BCF594CA F6 LOGGER (1M SP)", + "ecccFileBaseUrlTemplate": null, + "lastProcessedSourceTime": "2024-10-15T13:31:36", + "crdStationName": null, + "stationAccessDescription": "Nazko highway out of Quesnel.", + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/rsql/bfe0a6e2-e26b-0210-e053-259e228e58c7" + } + } + } + ] + }, + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1stations/rsql?query=stationCode%3D%3D209%20or%20stationCode%3D%3D211%20or%20stationCode%3D%3D302" + } + }, + "page": { + "size": 1000, + "totalElements": 3, + "totalPages": 1, + "number": 0 + } +} \ No newline at end of file diff --git a/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==322.json b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==322.json new file mode 100644 index 000000000..b6883c93c --- /dev/null +++ b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==322.json @@ -0,0 +1,166 @@ +{ + "_embedded": { + "stations": [ + { + "id": "bfe0a6e2-e3d0-0210-e053-259e228e58c7", + "displayLabel": "AFTON", + "createdBy": "LEGACY_DATA_LOAD", + "lastModifiedBy": "WFWX_WEATHER_API", + "lastEntityUpdateTimestamp": 1729027862973, + "updateDate": "2024-10-15T21:31:02.000+0000", + "stationCode": 322, + "stationAcronym": "FAF", + "stationStatus": { + "id": "ACTIVE", + "displayLabel": "Active", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "dataSource": { + "id": "AUTO_CALLR", + "displayLabel": "Auto-Caller", + "displayOrder": 1, + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "dataLoggerType": { + "id": "AXIOM_F6", + "displayLabel": "AXIOM/F6", + "displayOrder": 3, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "siteType": { + "id": "WXSTN_CELL", + "displayLabel": "Weather Station - Cell", + "displayOrder": 6, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "weatherZone": { + "id": 20, + "displayLabel": "Zone 20", + "dangerRegion": 3, + "displayOrder": 20 + }, + "stationAccessTypeCode": { + "id": "4WD", + "displayLabel": "4 Wheel Drive", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "hourly": true, + "pluvioSnowGuage": true, + "latitude": 50.6733333, + "longitude": -120.4816667, + "geometry": { + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + }, + "coordinates": [ + -120.4816667, + 50.6733333 + ], + "type": "Point" + }, + "elevation": 780, + "windspeedAdjRoughness": 1.0, + "windspeedHeight": { + "id": "9.0_11.9", + "displayLabel": "9.0 - 11.9 (m)", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "surfaceType": { + "id": "SMOOTH", + "displayLabel": "Smooth", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "overWinterPrecipAdj": true, + "influencingSlope": 1, + "installationDate": 606121200000, + "decommissionDate": null, + "influencingAspect": null, + "owner": { + "id": "a9843bb7-0f44-4a80-8a62-79cca2a5c758", + "displayLabel": "BC Wildfire Service", + "displayOrder": 2, + "ownerName": "BCWS", + "ownerDisplayName": "BC Wildfire Service", + "ownerComment": null, + "createdBy": "DATA_LOAD", + "lastModifiedBy": "DATAFIX - WFWX-891", + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "fireCentre": { + "id": 25, + "displayLabel": "Kamloops Fire Centre", + "alias": 5, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "zone": { + "id": 27, + "displayLabel": "Kamloops Zone (Kamloops)", + "alias": 2, + "fireCentre": "Kamloops Fire Centre", + "fireCentreAlias": 5, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "comments": "1st Daily 19880910; IP 96.1.73.189 - RMX Backup Grnstn 96.1.70.251-0141-0142 **Soil Moisture Test site", + "ecccFileBaseUrlTemplate": null, + "lastProcessedSourceTime": "2024-10-15T14:31:02", + "crdStationName": null, + "stationAccessDescription": "GPS track on wx tech drive. Located first right off Hwy #1, East of mine, 10km west of Kamloops. Through gate 2km to station.", + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/rsql/bfe0a6e2-e3d0-0210-e053-259e228e58c7" + } + } + } + ] + }, + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1stations/rsql?query=stationCode%3D%3D322" + } + }, + "page": { + "size": 1000, + "totalElements": 1, + "totalPages": 1, + "number": 0 + } +} \ No newline at end of file diff --git a/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==322_or_stationCode==838.json b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==322_or_stationCode==838.json new file mode 100644 index 000000000..db35c93c8 --- /dev/null +++ b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==322_or_stationCode==838.json @@ -0,0 +1,295 @@ +{ + "_embedded": { + "stations": [ + { + "id": "bfe0a6e2-e3d0-0210-e053-259e228e58c7", + "displayLabel": "AFTON", + "createdBy": "LEGACY_DATA_LOAD", + "lastModifiedBy": "WFWX_WEATHER_API", + "lastEntityUpdateTimestamp": 1729030249693, + "updateDate": "2024-10-15T22:10:49.000+0000", + "stationCode": 322, + "stationAcronym": "FAF", + "stationStatus": { + "id": "ACTIVE", + "displayLabel": "Active", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "dataSource": { + "id": "AUTO_CALLR", + "displayLabel": "Auto-Caller", + "displayOrder": 1, + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "dataLoggerType": { + "id": "AXIOM_F6", + "displayLabel": "AXIOM/F6", + "displayOrder": 3, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "siteType": { + "id": "WXSTN_CELL", + "displayLabel": "Weather Station - Cell", + "displayOrder": 6, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "weatherZone": { + "id": 20, + "displayLabel": "Zone 20", + "dangerRegion": 3, + "displayOrder": 20 + }, + "stationAccessTypeCode": { + "id": "4WD", + "displayLabel": "4 Wheel Drive", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "hourly": true, + "pluvioSnowGuage": true, + "latitude": 50.6733333, + "longitude": -120.4816667, + "geometry": { + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + }, + "coordinates": [ + -120.4816667, + 50.6733333 + ], + "type": "Point" + }, + "elevation": 780, + "windspeedAdjRoughness": 1.0, + "windspeedHeight": { + "id": "9.0_11.9", + "displayLabel": "9.0 - 11.9 (m)", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "surfaceType": { + "id": "SMOOTH", + "displayLabel": "Smooth", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "overWinterPrecipAdj": true, + "influencingSlope": 1, + "installationDate": 606121200000, + "decommissionDate": null, + "influencingAspect": null, + "owner": { + "id": "a9843bb7-0f44-4a80-8a62-79cca2a5c758", + "displayLabel": "BC Wildfire Service", + "displayOrder": 2, + "ownerName": "BCWS", + "ownerDisplayName": "BC Wildfire Service", + "ownerComment": null, + "createdBy": "DATA_LOAD", + "lastModifiedBy": "DATAFIX - WFWX-891", + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "fireCentre": { + "id": 25, + "displayLabel": "Kamloops Fire Centre", + "alias": 5, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "zone": { + "id": 27, + "displayLabel": "Kamloops Zone (Kamloops)", + "alias": 2, + "fireCentre": "Kamloops Fire Centre", + "fireCentreAlias": 5, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "comments": "1st Daily 19880910; IP 96.1.73.189 - RMX Backup Grnstn 96.1.70.251-0141-0142 **Soil Moisture Test site", + "ecccFileBaseUrlTemplate": null, + "lastProcessedSourceTime": "2024-10-15T15:10:49", + "crdStationName": null, + "stationAccessDescription": "GPS track on wx tech drive. Located first right off Hwy #1, East of mine, 10km west of Kamloops. Through gate 2km to station.", + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/rsql/bfe0a6e2-e3d0-0210-e053-259e228e58c7" + } + } + }, + { + "id": "bfe0a6e2-e2e0-0210-e053-259e228e58c7", + "displayLabel": "AKOKLI CREEK", + "createdBy": "LEGACY_DATA_LOAD", + "lastModifiedBy": "WFWX_WEATHER_API", + "lastEntityUpdateTimestamp": 1729030271645, + "updateDate": "2024-10-15T22:11:11.000+0000", + "stationCode": 838, + "stationAcronym": "FAE", + "stationStatus": { + "id": "ACTIVE", + "displayLabel": "Active", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "dataSource": { + "id": "AUTO_CALLR", + "displayLabel": "Auto-Caller", + "displayOrder": 1, + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "dataLoggerType": { + "id": "FWS12S", + "displayLabel": "FWS12S", + "displayOrder": 6, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "siteType": { + "id": "WXSTN_UHF", + "displayLabel": "Weather Station - UHF", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "weatherZone": { + "id": 26, + "displayLabel": "Zone 26", + "dangerRegion": 3, + "displayOrder": 26 + }, + "stationAccessTypeCode": null, + "hourly": true, + "pluvioSnowGuage": false, + "latitude": 49.4358, + "longitude": -116.7464, + "geometry": { + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + }, + "coordinates": [ + -116.7464, + 49.4358 + ], + "type": "Point" + }, + "elevation": 821, + "windspeedAdjRoughness": 1.0, + "windspeedHeight": { + "id": "9.0_11.9", + "displayLabel": "9.0 - 11.9 (m)", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "surfaceType": null, + "overWinterPrecipAdj": false, + "influencingSlope": 40, + "installationDate": 1041318000000, + "decommissionDate": null, + "influencingAspect": null, + "owner": { + "id": "a9843bb7-0f44-4a80-8a62-79cca2a5c758", + "displayLabel": "BC Wildfire Service", + "displayOrder": 2, + "ownerName": "BCWS", + "ownerDisplayName": "BC Wildfire Service", + "ownerComment": null, + "createdBy": "DATA_LOAD", + "lastModifiedBy": "DATAFIX - WFWX-891", + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "fireCentre": { + "id": 34, + "displayLabel": "Southeast Fire Centre", + "alias": 6, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "zone": { + "id": 40, + "displayLabel": "Kootenay Lake Zone", + "alias": 7, + "fireCentre": "Southeast Fire Centre", + "fireCentreAlias": 6, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "comments": "1st Daily 20030625;", + "ecccFileBaseUrlTemplate": null, + "lastProcessedSourceTime": "2024-10-15T15:11:11", + "crdStationName": null, + "stationAccessDescription": "Drive north of Crestion 42.9kms past the highway 3 3A junction (on highway 3A). Take the Akokli Creek road on the right. At 2km, left. At 3kms, right. At 3.6kms pull off. Trail to station starts on right, down the hill. You can see the station.", + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/rsql/bfe0a6e2-e2e0-0210-e053-259e228e58c7" + } + } + } + ] + }, + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1stations/rsql?query=stationCode%3D%3D322%20or%20stationCode%3D%3D838" + } + }, + "page": { + "size": 1000, + "totalElements": 2, + "totalPages": 1, + "number": 0 + } +} \ No newline at end of file diff --git a/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==838.json b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==838.json new file mode 100644 index 000000000..c227d762a --- /dev/null +++ b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==838.json @@ -0,0 +1,146 @@ +{ + "_embedded": { + "stations": [ + { + "id": "bfe0a6e2-e2e0-0210-e053-259e228e58c7", + "displayLabel": "AKOKLI CREEK", + "createdBy": "LEGACY_DATA_LOAD", + "lastModifiedBy": "WFWX_WEATHER_API", + "lastEntityUpdateTimestamp": 1729030874379, + "updateDate": "2024-10-15T22:21:14.000+0000", + "stationCode": 838, + "stationAcronym": "FAE", + "stationStatus": { + "id": "ACTIVE", + "displayLabel": "Active", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "dataSource": { + "id": "AUTO_CALLR", + "displayLabel": "Auto-Caller", + "displayOrder": 1, + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "dataLoggerType": { + "id": "FWS12S", + "displayLabel": "FWS12S", + "displayOrder": 6, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "siteType": { + "id": "WXSTN_UHF", + "displayLabel": "Weather Station - UHF", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "weatherZone": { + "id": 26, + "displayLabel": "Zone 26", + "dangerRegion": 3, + "displayOrder": 26 + }, + "stationAccessTypeCode": null, + "hourly": true, + "pluvioSnowGuage": false, + "latitude": 49.4358, + "longitude": -116.7464, + "geometry": { + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + }, + "coordinates": [ + -116.7464, + 49.4358 + ], + "type": "Point" + }, + "elevation": 821, + "windspeedAdjRoughness": 1.0, + "windspeedHeight": { + "id": "9.0_11.9", + "displayLabel": "9.0 - 11.9 (m)", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "surfaceType": null, + "overWinterPrecipAdj": false, + "influencingSlope": 40, + "installationDate": 1041318000000, + "decommissionDate": null, + "influencingAspect": null, + "owner": { + "id": "a9843bb7-0f44-4a80-8a62-79cca2a5c758", + "displayLabel": "BC Wildfire Service", + "displayOrder": 2, + "ownerName": "BCWS", + "ownerDisplayName": "BC Wildfire Service", + "ownerComment": null, + "createdBy": "DATA_LOAD", + "lastModifiedBy": "DATAFIX - WFWX-891", + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "fireCentre": { + "id": 34, + "displayLabel": "Southeast Fire Centre", + "alias": 6, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "zone": { + "id": 40, + "displayLabel": "Kootenay Lake Zone", + "alias": 7, + "fireCentre": "Southeast Fire Centre", + "fireCentreAlias": 6, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "comments": "1st Daily 20030625;", + "ecccFileBaseUrlTemplate": null, + "lastProcessedSourceTime": "2024-10-15T15:21:14", + "crdStationName": null, + "stationAccessDescription": "Drive north of Crestion 42.9kms past the highway 3 3A junction (on highway 3A). Take the Akokli Creek road on the right. At 2km, left. At 3kms, right. At 3.6kms pull off. Trail to station starts on right, down the hill. You can see the station.", + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/rsql/bfe0a6e2-e2e0-0210-e053-259e228e58c7" + } + } + } + ] + }, + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1stations/rsql?query=stationCode%3D%3D838" + } + }, + "page": { + "size": 1000, + "totalElements": 1, + "totalPages": 1, + "number": 0 + } +} \ No newline at end of file diff --git a/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==838_or_stationCode==209.json b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==838_or_stationCode==209.json new file mode 100644 index 000000000..0c23ec487 --- /dev/null +++ b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==838_or_stationCode==209.json @@ -0,0 +1,285 @@ +{ + "_embedded": { + "stations": [ + { + "id": "bfe0a6e2-e2e0-0210-e053-259e228e58c7", + "displayLabel": "AKOKLI CREEK", + "createdBy": "LEGACY_DATA_LOAD", + "lastModifiedBy": "WFWX_WEATHER_API", + "lastEntityUpdateTimestamp": 1729031477699, + "updateDate": "2024-10-15T22:31:17.000+0000", + "stationCode": 838, + "stationAcronym": "FAE", + "stationStatus": { + "id": "ACTIVE", + "displayLabel": "Active", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "dataSource": { + "id": "AUTO_CALLR", + "displayLabel": "Auto-Caller", + "displayOrder": 1, + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "dataLoggerType": { + "id": "FWS12S", + "displayLabel": "FWS12S", + "displayOrder": 6, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "siteType": { + "id": "WXSTN_UHF", + "displayLabel": "Weather Station - UHF", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "weatherZone": { + "id": 26, + "displayLabel": "Zone 26", + "dangerRegion": 3, + "displayOrder": 26 + }, + "stationAccessTypeCode": null, + "hourly": true, + "pluvioSnowGuage": false, + "latitude": 49.4358, + "longitude": -116.7464, + "geometry": { + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + }, + "coordinates": [ + -116.7464, + 49.4358 + ], + "type": "Point" + }, + "elevation": 821, + "windspeedAdjRoughness": 1.0, + "windspeedHeight": { + "id": "9.0_11.9", + "displayLabel": "9.0 - 11.9 (m)", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "surfaceType": null, + "overWinterPrecipAdj": false, + "influencingSlope": 40, + "installationDate": 1041318000000, + "decommissionDate": null, + "influencingAspect": null, + "owner": { + "id": "a9843bb7-0f44-4a80-8a62-79cca2a5c758", + "displayLabel": "BC Wildfire Service", + "displayOrder": 2, + "ownerName": "BCWS", + "ownerDisplayName": "BC Wildfire Service", + "ownerComment": null, + "createdBy": "DATA_LOAD", + "lastModifiedBy": "DATAFIX - WFWX-891", + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "fireCentre": { + "id": 34, + "displayLabel": "Southeast Fire Centre", + "alias": 6, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "zone": { + "id": 40, + "displayLabel": "Kootenay Lake Zone", + "alias": 7, + "fireCentre": "Southeast Fire Centre", + "fireCentreAlias": 6, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "comments": "1st Daily 20030625;", + "ecccFileBaseUrlTemplate": null, + "lastProcessedSourceTime": "2024-10-15T15:31:17", + "crdStationName": null, + "stationAccessDescription": "Drive north of Crestion 42.9kms past the highway 3 3A junction (on highway 3A). Take the Akokli Creek road on the right. At 2km, left. At 3kms, right. At 3.6kms pull off. Trail to station starts on right, down the hill. You can see the station.", + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/rsql/bfe0a6e2-e2e0-0210-e053-259e228e58c7" + } + } + }, + { + "id": "bfe0a6e2-e269-0210-e053-259e228e58c7", + "displayLabel": "ALEXIS CREEK", + "createdBy": "LEGACY_DATA_LOAD", + "lastModifiedBy": "WFWX_WEATHER_API", + "lastEntityUpdateTimestamp": 1729031481760, + "updateDate": "2024-10-15T22:31:21.000+0000", + "stationCode": 209, + "stationAcronym": "FAC", + "stationStatus": { + "id": "ACTIVE", + "displayLabel": "Active", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "dataSource": { + "id": "AUTO_CALLR", + "displayLabel": "Auto-Caller", + "displayOrder": 1, + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "dataLoggerType": { + "id": "AXIOM_F6", + "displayLabel": "AXIOM/F6", + "displayOrder": 3, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "siteType": { + "id": "WXSTN_GOES", + "displayLabel": "Weather Station - GOES", + "displayOrder": 5, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "weatherZone": { + "id": 17, + "displayLabel": "Zone 17", + "dangerRegion": 2, + "displayOrder": 17 + }, + "stationAccessTypeCode": { + "id": "4WD", + "displayLabel": "4 Wheel Drive", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "hourly": true, + "pluvioSnowGuage": true, + "latitude": 52.08377, + "longitude": -123.2732667, + "geometry": { + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + }, + "coordinates": [ + -123.2732667, + 52.08377 + ], + "type": "Point" + }, + "elevation": 791, + "windspeedAdjRoughness": 1.0, + "windspeedHeight": { + "id": "9.0_11.9", + "displayLabel": "9.0 - 11.9 (m)", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "surfaceType": null, + "overWinterPrecipAdj": true, + "influencingSlope": 2, + "installationDate": 315558000000, + "decommissionDate": null, + "influencingAspect": null, + "owner": { + "id": "a9843bb7-0f44-4a80-8a62-79cca2a5c758", + "displayLabel": "BC Wildfire Service", + "displayOrder": 2, + "ownerName": "BCWS", + "ownerDisplayName": "BC Wildfire Service", + "ownerComment": null, + "createdBy": "DATA_LOAD", + "lastModifiedBy": "DATAFIX - WFWX-891", + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "fireCentre": { + "id": 2, + "displayLabel": "Cariboo Fire Centre", + "alias": 7, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "zone": { + "id": 7, + "displayLabel": "Chilcotin Zone", + "alias": 5, + "fireCentre": "Cariboo Fire Centre", + "fireCentreAlias": 7, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "comments": "1st Daily 19800501; coordinates updated 2007/10/03 (P2)", + "ecccFileBaseUrlTemplate": null, + "lastProcessedSourceTime": "2024-10-15T15:31:21", + "crdStationName": null, + "stationAccessDescription": "Alexis creek Wx station is located 150M N/W of the Chilcolin FLNRO field office. Head west on Highway 20 from Williams Lake for an hour and thirty minutes or 112 Kilometers turning right on to Stum Lake Road for 100m and turn right again.", + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/rsql/bfe0a6e2-e269-0210-e053-259e228e58c7" + } + } + } + ] + }, + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1stations/rsql?query=stationCode%3D%3D838%20or%20stationCode%3D%3D209" + } + }, + "page": { + "size": 1000, + "totalElements": 2, + "totalPages": 1, + "number": 0 + } +} \ No newline at end of file diff --git a/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==956.json b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==956.json new file mode 100644 index 000000000..cb0ea8c0f --- /dev/null +++ b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==956.json @@ -0,0 +1,156 @@ +{ + "_embedded": { + "stations": [ + { + "id": "bfe0a6e2-e10a-0210-e053-259e228e58c7", + "displayLabel": "TS EFFINGHAM", + "createdBy": "LEGACY_DATA_LOAD", + "lastModifiedBy": "WFWX_WEATHER_API", + "lastEntityUpdateTimestamp": 1729031486917, + "updateDate": "2024-10-15T22:31:26.000+0000", + "stationCode": 956, + "stationAcronym": "FEH", + "stationStatus": { + "id": "ACTIVE", + "displayLabel": "Active", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "dataSource": { + "id": "AUTO_CALLR", + "displayLabel": "Auto-Caller", + "displayOrder": 1, + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "dataLoggerType": { + "id": "FWS12S", + "displayLabel": "FWS12S", + "displayOrder": 6, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "siteType": { + "id": "WXSTN_GOES", + "displayLabel": "Weather Station - GOES", + "displayOrder": 5, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "weatherZone": { + "id": 1, + "displayLabel": "Zone 1", + "dangerRegion": 1, + "displayOrder": 1 + }, + "stationAccessTypeCode": { + "id": "AIR", + "displayLabel": "Helicopter", + "displayOrder": 2, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "hourly": true, + "pluvioSnowGuage": false, + "latitude": 49.17, + "longitude": -125.2825, + "geometry": { + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + }, + "coordinates": [ + -125.2825, + 49.17 + ], + "type": "Point" + }, + "elevation": 632, + "windspeedAdjRoughness": null, + "windspeedHeight": { + "id": "9.0_11.9", + "displayLabel": "9.0 - 11.9 (m)", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "surfaceType": null, + "overWinterPrecipAdj": false, + "influencingSlope": 20, + "installationDate": 1162191600000, + "decommissionDate": null, + "influencingAspect": null, + "owner": { + "id": "a9843bb7-0f44-4a80-8a62-79cca2a5c758", + "displayLabel": "BC Wildfire Service", + "displayOrder": 2, + "ownerName": "BCWS", + "ownerDisplayName": "BC Wildfire Service", + "ownerComment": null, + "createdBy": "DATA_LOAD", + "lastModifiedBy": "DATAFIX - WFWX-891", + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "fireCentre": { + "id": 50, + "displayLabel": "Coastal Fire Centre", + "alias": 2, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "zone": { + "id": 55, + "displayLabel": "Mid Island Zone", + "alias": 7, + "fireCentre": "Coastal Fire Centre", + "fireCentreAlias": 2, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "comments": "1st Daily 20061031; 026 New station for BCTS SoG", + "ecccFileBaseUrlTemplate": null, + "lastProcessedSourceTime": "2024-10-15T15:31:26", + "crdStationName": null, + "stationAccessDescription": "Confirmed 2024: Last 2 kms of spur road is completely overgrown and has sections of rock slide. Site is now a heli fly in only. Old: Take Highway 4 West from Port Alberni for approx. 45km to Marion Main. Keep to main for approx 10km to site on left around switchback.", + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/rsql/bfe0a6e2-e10a-0210-e053-259e228e58c7" + } + } + } + ] + }, + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1stations/rsql?query=stationCode%3D%3D956" + } + }, + "page": { + "size": 1000, + "totalElements": 1, + "totalPages": 1, + "number": 0 + } +} \ No newline at end of file diff --git a/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==999.json b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==999.json new file mode 100644 index 000000000..6a84f08dd --- /dev/null +++ b/api/app/tests/fixtures/wf1/wfwx/v1/stations/rsql__size_1000_sort_displayLabel_page_0_query_stationCode==999.json @@ -0,0 +1,125 @@ +{ + "_embedded": { + "stations": [ + { + "id": "bfe0a6e2-e11f-0210-e053-259e228e58c7", + "displayLabel": "ZZ SEEDTREE", + "createdBy": "LEGACY_DATA_LOAD", + "lastModifiedBy": "LEGACY_DATA_LOAD", + "lastEntityUpdateTimestamp": 1618316982000, + "updateDate": "2021-04-13T19:29:42.000+0000", + "stationCode": 999, + "stationAcronym": null, + "stationStatus": { + "id": "ARCHIVED", + "displayLabel": "Archived", + "displayOrder": 3, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "dataSource": { + "id": "NON_REPORT", + "displayLabel": "Non-Reporting", + "displayOrder": 7, + "effectiveDate": "1950-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "dataLoggerType": { + "id": "NONE", + "displayLabel": "None", + "displayOrder": 1, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "siteType": null, + "weatherZone": { + "id": 26, + "displayLabel": "Zone 26", + "dangerRegion": 3, + "displayOrder": 26 + }, + "stationAccessTypeCode": null, + "hourly": false, + "pluvioSnowGuage": false, + "latitude": 49.6227778, + "longitude": -117.08, + "geometry": { + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + }, + "coordinates": [ + -117.08, + 49.6227778 + ], + "type": "Point" + }, + "elevation": 830, + "windspeedAdjRoughness": null, + "windspeedHeight": { + "id": "9.0_11.9", + "displayLabel": "9.0 - 11.9 (m)", + "displayOrder": 7, + "effectiveDate": "2000-01-01T08:00:00.000+0000", + "expiryDate": "9999-12-31T08:00:00.000+0000", + "createdBy": "DATA_LOAD", + "createdDate": "2020-02-25T08:00:00.000+0000", + "lastModifiedBy": "DATA_LOAD", + "lastModifiedDate": "2020-02-25T08:00:00.000+0000" + }, + "surfaceType": null, + "overWinterPrecipAdj": false, + "influencingSlope": null, + "installationDate": 1041404400000, + "decommissionDate": 1041490800000, + "influencingAspect": null, + "owner": null, + "fireCentre": { + "id": 34, + "displayLabel": "Southeast Fire Centre", + "alias": 6, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "zone": { + "id": 40, + "displayLabel": "Kootenay Lake Zone", + "alias": 7, + "fireCentre": "Southeast Fire Centre", + "fireCentreAlias": 6, + "expiryDate": "9999-12-31T08:00:00.000+0000" + }, + "comments": "never operational", + "ecccFileBaseUrlTemplate": null, + "lastProcessedSourceTime": "2021-04-16T12:00:00", + "crdStationName": null, + "stationAccessDescription": null, + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1/stations/rsql/bfe0a6e2-e11f-0210-e053-259e228e58c7" + } + } + } + ] + }, + "_links": { + "self": { + "href": "https://bcwsapi.nrs.gov.bc.ca/wfwx-fireweather-api/v1stations/rsql?query=stationCode%3D%3D999" + } + }, + "page": { + "size": 1000, + "totalElements": 1, + "totalPages": 1, + "number": 0 + } +} \ No newline at end of file diff --git a/api/app/tests/forecasts/test_noon_forecasts.py b/api/app/tests/forecasts/test_noon_forecasts.py index 80db9fd2f..dedb7bebb 100644 --- a/api/app/tests/forecasts/test_noon_forecasts.py +++ b/api/app/tests/forecasts/test_noon_forecasts.py @@ -40,7 +40,7 @@ def mock_query_noon_forecast_records(session: Session, return forecasts -@pytest.mark.usefixtures('mock_env_with_use_wfwx', 'mock_jwt_decode') +@pytest.mark.usefixtures("mock_jwt_decode") @scenario('test_noon_forecasts.feature', 'Get noon_forecasts') def test_noon_forecasts(): """ BDD Scenario. """ diff --git a/api/app/tests/forecasts/test_noon_forecasts_summaries.feature b/api/app/tests/forecasts/test_noon_forecasts_summaries.feature index 0b2616c46..11d0bf523 100644 --- a/api/app/tests/forecasts/test_noon_forecasts_summaries.feature +++ b/api/app/tests/forecasts/test_noon_forecasts_summaries.feature @@ -6,7 +6,6 @@ Feature: /noon_forecasts/summaries/ And and contain calculated percentiles for available stations Examples: | codes | status | num_summaries | - | [] | 200 | 0 | | [999] | 200 | 0 | | [322] | 200 | 1 | - | [209, 322] | 200 | 2 | \ No newline at end of file + | [322, 838] | 200 | 2 | \ No newline at end of file diff --git a/api/app/tests/forecasts/test_noon_forecasts_summaries.py b/api/app/tests/forecasts/test_noon_forecasts_summaries.py index e856ee007..8bc8399dc 100644 --- a/api/app/tests/forecasts/test_noon_forecasts_summaries.py +++ b/api/app/tests/forecasts/test_noon_forecasts_summaries.py @@ -3,6 +3,7 @@ from datetime import timedelta, datetime import json import logging +from aiohttp import ClientSession from typing import List from pytest_bdd import scenario, given, then, parsers from fastapi.testclient import TestClient @@ -12,6 +13,7 @@ from app.db.models.forecasts import NoonForecast import app.utils.time as time_utils from app.schemas.stations import StationCodeList +from app.tests.common import default_mock_client_get logger = logging.getLogger(__name__) @@ -69,6 +71,7 @@ def given_request(monkeypatch, codes: List): 'query_noon_forecast_records', mock_query_noon_forecast_records) client = TestClient(app.main.app) + monkeypatch.setattr(ClientSession, "get", default_mock_client_get) endpoint = '/api/forecasts/noon/summaries/' return client.post( endpoint, headers={'Authorization': 'Bearer token'}, json={'stations': codes}) diff --git a/api/app/tests/test_api.py b/api/app/tests/test_api.py index b4cfe998a..01ee1a964 100644 --- a/api/app/tests/test_api.py +++ b/api/app/tests/test_api.py @@ -1,74 +1,47 @@ """ Unit tests for API. """ -import unittest - +import pytest +from aiohttp import ClientSession from starlette.testclient import TestClient - -from app.main import app +import app.main +from app.tests.common import default_mock_client_get PERCENTILE_URL = '/api/percentiles/' -class BasicTestCase(unittest.TestCase): - """ Some basic unit tests. """ +""" Some basic unit tests. """ + + +def test_stations(monkeypatch: pytest.MonkeyPatch): + """Test that stations request returns 200/OK.""" + client = TestClient(app.main.app) + monkeypatch.setattr(ClientSession, "get", default_mock_client_get) + response = client.get("/api/stations") + assert response.status_code == 200 + + +def test_percentile(monkeypatch: pytest.MonkeyPatch): + """Test that a request for percentiles return 200/OK.""" + client = TestClient(app.main.app) + monkeypatch.setattr(ClientSession, "get", default_mock_client_get) + response = client.post(PERCENTILE_URL, headers={"Content-Type": "application/json"}, json={"stations": ["331", "328"], "percentile": 90, "year_range": {"start": 2014, "end": 2023}}) + assert response.status_code == 200 - def test_stations(self): - """ Test that stations request returns 200/OK. """ - client = TestClient(app) - response = client.get('/api/stations') - self.assertEqual(response.status_code, 200) - def test_percentile(self): - """ Test that a request for percentiles return 200/OK. """ - client = TestClient(app) - response = client.post(PERCENTILE_URL, - headers={'Content-Type': 'application/json'}, - json={ - "stations": [ - "331", - "328" - ], - "percentile": 90, - "year_range": { - "start": 2014, - "end": 2023 - } - }) - self.assertEqual(response.status_code, 200) +def test_percentile_no_stations_errors(monkeypatch: pytest.MonkeyPatch): + """Test to check for empty stations array. If no stations are provided in the request, + the expected behavious is to get back a 400 error.""" + client = TestClient(app.main.app) + monkeypatch.setattr(ClientSession, "get", default_mock_client_get) + response = client.post(PERCENTILE_URL, headers={"Content-Type": "application/json"}, json={"stations": [], "percentile": 90, "year_range": {"start": 2010, "end": 2019}}) + assert response.status_code == 400 - def test_percentile_no_stations_errors(self): - """ Test to check for empty stations array. If no stations are provided in the request, - the expected behavious is to get back a 400 error. """ - client = TestClient(app) - response = client.post(PERCENTILE_URL, - headers={'Content-Type': 'application/json'}, - json={ - "stations": [ - ], - "percentile": 90, - "year_range": { - "start": 2010, - "end": 2019 - } - }) - self.assertEqual(response.status_code, 400) - def test_percentile_no_invalid_year_errors(self): - """ Test to check for invalid year range. If an invalid year range is specified, the requested - behaviour is to get back a 400 error. """ - client = TestClient(app) - response = client.post(PERCENTILE_URL, - headers={'Content-Type': 'application/json'}, - json={ - "stations": [ - "331", - "328" - ], - "percentile": 90, - "year_range": { - "start": 2004, - "end": 2019 - } - }) - self.assertEqual(response.status_code, 400) +def test_percentile_no_invalid_year_errors(monkeypatch: pytest.MonkeyPatch): + """Test to check for invalid year range. If an invalid year range is specified, the requested + behaviour is to get back a 400 error.""" + client = TestClient(app.main.app) + monkeypatch.setattr(ClientSession, "get", default_mock_client_get) + response = client.post(PERCENTILE_URL, headers={"Content-Type": "application/json"}, json={"stations": ["331", "328"], "percentile": 90, "year_range": {"start": 2004, "end": 2019}}) + assert response.status_code == 400 diff --git a/api/app/tests/test_auth.py b/api/app/tests/test_auth.py index 200b7b358..3d901d525 100644 --- a/api/app/tests/test_auth.py +++ b/api/app/tests/test_auth.py @@ -73,8 +73,7 @@ def given_authenticated_user(monkeypatch, endpoint: str, verb: str): client = TestClient(app.main.app) monkeypatch.setattr(ClientSession, 'get', default_mock_client_get) if verb == 'post': - return client.post( - endpoint, headers={'Authorization': 'Bearer token'}, json={"stations": []}) + return client.post(endpoint, headers={"Authorization": "Bearer token"}, json={"stations": [838]}) if verb == 'get': return client.get( endpoint, headers={'Authorization': 'Bearer token'}) diff --git a/api/app/tests/test_stations.feature b/api/app/tests/test_stations.feature index 4b3d50b16..967fa47e0 100644 --- a/api/app/tests/test_stations.feature +++ b/api/app/tests/test_stations.feature @@ -1,17 +1,16 @@ Feature: /stations/ Scenario: Get weather stations - Given USE_WFWX= Given I request a list of weather stations from with Then the response status code is And there are at least 200 active weather stations And there is a station with , , and Examples: - | url | status | code | name | lat | long | use_wfwx | authentication | - | /api/stations/ | 200 | 1142 | 14G (CRD) | 48.494444 | -123.613889 | True | False | - | /api/stations/ | 200 | 322 | AFTON | 50.6733333 | -120.4816667 | True | False | - | /api/stations/ | 200 | 317 | ALLISON PASS | 49.0623139 | -120.7674194 | False | False | + | url | status | code | name | lat | long | authentication | + | /api/stations/ | 200 | 331 | ASHNOLA | 49.13905 | -120.1844 | False | + | /api/stations/ | 200 | 322 | AFTON | 50.6733333 | -120.4816667 | False | + | /api/stations/ | 200 | 317 | ALLISON PASS | 49.0623139 | -120.7674194 | False | Scenario: Get detailed weather stations Given A crud mapping diff --git a/api/app/tests/test_stations.py b/api/app/tests/test_stations.py index 9e437a986..8b85f4765 100644 --- a/api/app/tests/test_stations.py +++ b/api/app/tests/test_stations.py @@ -21,12 +21,6 @@ def test_detailed_stations_scenario(): """ BDD Scenario. """ -@given(parsers.parse("USE_WFWX={use_wfwx}"), converters=dict(use_wfwx=str)) -def given_wfwx(monkeypatch, use_wfwx: str): - """ Toggle between using wfwx or not """ - monkeypatch.setenv("USE_WFWX", use_wfwx) - - @given(parsers.parse("utc_time: {utc_time}"), converters=dict(utc_time=int)) def given_utc_time(monkeypatch, utc_time: int): """ Mock out utc time """ diff --git a/api/app/tests/weather_models/endpoints/test_models_endpoints.py b/api/app/tests/weather_models/endpoints/test_models_endpoints.py index 3071d4e2e..993a84470 100644 --- a/api/app/tests/weather_models/endpoints/test_models_endpoints.py +++ b/api/app/tests/weather_models/endpoints/test_models_endpoints.py @@ -5,11 +5,13 @@ import importlib import logging import pytest +from aiohttp import ClientSession from pytest_bdd import scenario, given, then, when, parsers from fastapi.testclient import TestClient import app.main -from app.tests import load_sqlalchemy_response_from_json -from app.tests import load_json_file +from app.tests import load_json_file, load_sqlalchemy_response_from_json +from app.tests.common import default_mock_client_get +from app.tests.utils.mock_jwt_decode_role import MockJWTDecodeWithRole logger = logging.getLogger(__name__) @@ -48,8 +50,16 @@ def given_a_database(monkeypatch, crud_mapping: dict): @when(parsers.parse("I call {endpoint} with {codes}"), converters={'endpoint': str, 'codes': json.loads}) -def when_prediction(database: dict, codes: str, endpoint: str): +def when_prediction(database: dict, codes: str, endpoint: str, monkeypatch: pytest.MonkeyPatch): """ Make call to endpoint """ + + def mock_admin_role_function(*_, **__): + return MockJWTDecodeWithRole("morecast2_write_forecast") + + decode_fn = "jwt.decode" + monkeypatch.setattr(decode_fn, mock_admin_role_function) + monkeypatch.setattr(ClientSession, "get", default_mock_client_get) + client = TestClient(app.main.app) response = client.post( endpoint, headers={'Authorization': 'Bearer token'}, json={'stations': codes}) diff --git a/api/app/tests/weather_models/endpoints/test_models_predictions_most_recent_GDPS_[838]_response.json b/api/app/tests/weather_models/endpoints/test_models_predictions_most_recent_GDPS_[838]_response.json index 00615c015..01c31f482 100644 --- a/api/app/tests/weather_models/endpoints/test_models_predictions_most_recent_GDPS_[838]_response.json +++ b/api/app/tests/weather_models/endpoints/test_models_predictions_most_recent_GDPS_[838]_response.json @@ -2,6 +2,7 @@ "stations": [ { "station": { + "zone_code": "N7", "code": 838, "name": "AKOKLI CREEK", "lat": 49.4358, @@ -14,8 +15,7 @@ "end_day": 31 }, "elevation": 821, - "wfwx_station_uuid": null, - "zone_code": null + "wfwx_station_uuid": "bfe0a6e2-e2e0-0210-e053-259e228e58c7" }, "model_runs": [ { diff --git a/api/app/tests/weather_models/endpoints/test_models_predictions_most_recent_GDPS_[956]_response.json b/api/app/tests/weather_models/endpoints/test_models_predictions_most_recent_GDPS_[956]_response.json index bc7cef97c..bf82d5a97 100644 --- a/api/app/tests/weather_models/endpoints/test_models_predictions_most_recent_GDPS_[956]_response.json +++ b/api/app/tests/weather_models/endpoints/test_models_predictions_most_recent_GDPS_[956]_response.json @@ -2,6 +2,7 @@ "stations": [ { "station": { + "zone_code": "V7", "code": 956, "name": "TS EFFINGHAM", "lat": 49.17, @@ -14,8 +15,7 @@ "end_day": 31 }, "elevation": 632, - "wfwx_station_uuid": null, - "zone_code": null + "wfwx_station_uuid": "bfe0a6e2-e10a-0210-e053-259e228e58c7" }, "model_runs": [ { diff --git a/api/app/tests/weather_models/endpoints/test_models_predictions_most_recent_RDPS_[838, 209]_response.json b/api/app/tests/weather_models/endpoints/test_models_predictions_most_recent_RDPS_[838, 209]_response.json index 5a5e6ff21..3e6475210 100644 --- a/api/app/tests/weather_models/endpoints/test_models_predictions_most_recent_RDPS_[838, 209]_response.json +++ b/api/app/tests/weather_models/endpoints/test_models_predictions_most_recent_RDPS_[838, 209]_response.json @@ -2,6 +2,7 @@ "stations": [ { "station": { + "zone_code": "C5", "code": 209, "name": "ALEXIS CREEK", "lat": 52.08377, @@ -14,8 +15,7 @@ "end_day": 31 }, "elevation": 791, - "wfwx_station_uuid": null, - "zone_code": null + "wfwx_station_uuid": "bfe0a6e2-e269-0210-e053-259e228e58c7" }, "model_runs": [ { @@ -142,6 +142,7 @@ }, { "station": { + "zone_code": "N7", "code": 838, "name": "AKOKLI CREEK", "lat": 49.4358, @@ -154,8 +155,7 @@ "end_day": 31 }, "elevation": 821, - "wfwx_station_uuid": null, - "zone_code": null + "wfwx_station_uuid": "bfe0a6e2-e2e0-0210-e053-259e228e58c7" }, "model_runs": [ { diff --git a/api/app/tests/weather_models/endpoints/test_models_predictions_summaries_response.json b/api/app/tests/weather_models/endpoints/test_models_predictions_summaries_response.json index 41969763e..556fc26b0 100644 --- a/api/app/tests/weather_models/endpoints/test_models_predictions_summaries_response.json +++ b/api/app/tests/weather_models/endpoints/test_models_predictions_summaries_response.json @@ -2,6 +2,7 @@ "summaries": [ { "station": { + "zone_code": "K2", "code": 322, "name": "AFTON", "lat": 50.6733333, @@ -14,8 +15,7 @@ "end_day": 15 }, "elevation": 780, - "wfwx_station_uuid": null, - "zone_code": null + "wfwx_station_uuid": "bfe0a6e2-e3d0-0210-e053-259e228e58c7" }, "model": { "name": "Global Deterministic Prediction System", diff --git a/api/app/tests/weather_models/endpoints/test_models_predictions_summaries_response_multiple.json b/api/app/tests/weather_models/endpoints/test_models_predictions_summaries_response_multiple.json index 37e633fa6..c1f84cbf2 100644 --- a/api/app/tests/weather_models/endpoints/test_models_predictions_summaries_response_multiple.json +++ b/api/app/tests/weather_models/endpoints/test_models_predictions_summaries_response_multiple.json @@ -2,6 +2,7 @@ "summaries": [ { "station": { + "zone_code": "K2", "code": 322, "name": "AFTON", "lat": 50.6733333, @@ -14,8 +15,7 @@ "end_day": 15 }, "elevation": 780, - "wfwx_station_uuid": null, - "zone_code": null + "wfwx_station_uuid": "bfe0a6e2-e3d0-0210-e053-259e228e58c7" }, "model": { "name": "Global Deterministic Prediction System", @@ -431,6 +431,7 @@ }, { "station": { + "zone_code": "N7", "code": 838, "name": "AKOKLI CREEK", "lat": 49.4358, @@ -443,8 +444,7 @@ "end_day": 31 }, "elevation": 821, - "wfwx_station_uuid": null, - "zone_code": null + "wfwx_station_uuid": "bfe0a6e2-e2e0-0210-e053-259e228e58c7" }, "model": { "name": "Global Deterministic Prediction System", diff --git a/api/app/tests/weather_models/test_process_grib.py b/api/app/tests/weather_models/test_process_grib.py index a2a011fb0..c7aa878e5 100644 --- a/api/app/tests/weather_models/test_process_grib.py +++ b/api/app/tests/weather_models/test_process_grib.py @@ -1,9 +1,12 @@ import os +from aiohttp import ClientSession from osgeo import gdal from pyproj import CRS import math +import pytest from app.geospatial import NAD83_CRS from app.stations import StationSourceEnum +from app.tests.common import default_mock_client_get from app.weather_models import process_grib @@ -18,11 +21,11 @@ def test_convert_mps_to_kph_zero_wind_speed(): kilometres_per_hour_speed = process_grib.convert_mps_to_kph(metres_per_second_speed) assert kilometres_per_hour_speed == 0 - -def test_read_single_raster_value(): +def test_read_single_raster_value(monkeypatch: pytest.MonkeyPatch): """ Verified with gdallocationinfo CMC_reg_RH_TGL_2_ps10km_2020110500_P034.grib2 -wgs84 -120.4816667 50.6733333 """ + monkeypatch.setattr(ClientSession, "get", default_mock_client_get) filename = os.path.join(os.path.dirname(__file__), 'CMC_reg_RH_TGL_2_ps10km_2020110500_P034.grib2') dataset = gdal.Open(filename, gdal.GA_ReadOnly) @@ -42,7 +45,7 @@ def test_read_single_raster_value(): raster_band = dataset.GetRasterBand(1) station, value = next(processor.yield_value_for_stations(raster_band)) - assert station.code == 3090 - assert math.isclose(value, 67.150, abs_tol=0.001) + assert station.code == 995 + assert math.isclose(value, 95.276, abs_tol=0.001) del dataset diff --git a/api/app/wildfire_one/wfwx_api.py b/api/app/wildfire_one/wfwx_api.py index ee372ac32..6416fa807 100644 --- a/api/app/wildfire_one/wfwx_api.py +++ b/api/app/wildfire_one/wfwx_api.py @@ -47,17 +47,9 @@ fetch_stations_by_group_id, ) - logger = logging.getLogger(__name__) -def use_wfwx(): - """Return True if configured to use WFWX""" - using_wfwx = config.get("USE_WFWX") == "True" - logger.info("USE_WFWX = %s", using_wfwx) - return using_wfwx - - async def get_auth_header(session: ClientSession) -> dict: """Get WFWX auth header""" # Fetch access token diff --git a/openshift/scripts/oc_deploy.sh b/openshift/scripts/oc_deploy.sh index 27eba2992..29e7a7183 100755 --- a/openshift/scripts/oc_deploy.sh +++ b/openshift/scripts/oc_deploy.sh @@ -46,7 +46,6 @@ OC_PROCESS="oc -n ${PROJ_TARGET} process -f ${PATH_DEPLOY} \ ${MEMORY_LIMIT:+ "-p MEMORY_LIMIT=${MEMORY_LIMIT}"} \ ${PROJ_TOOLS:+ "-p PROJ_TOOLS=${PROJ_TOOLS}"} \ ${IMAGE_REGISTRY:+ "-p IMAGE_REGISTRY=${IMAGE_REGISTRY}"} \ - ${USE_WFWX:+ "-p USE_WFWX=${USE_WFWX}"} \ ${ENVIRONMENT:+ "-p ENVIRONMENT=${ENVIRONMENT}"} \ ${REPLICAS:+ "-p REPLICAS=${REPLICAS}"}" diff --git a/openshift/scripts/oc_deploy_to_production.sh b/openshift/scripts/oc_deploy_to_production.sh index 9a4e0f4a8..dd4a0d25c 100755 --- a/openshift/scripts/oc_deploy_to_production.sh +++ b/openshift/scripts/oc_deploy_to_production.sh @@ -43,7 +43,7 @@ PROJ_TARGET=${PROJ_TARGET} BUCKET=lwzrin CPU_REQUEST=75m CPU_LIMIT=2000m MEMORY_ echo Provision NATS PROJ_TARGET=${PROJ_TARGET} bash $(dirname ${0})/oc_provision_nats.sh prod ${RUN_TYPE} echo Deploy API -MODULE_NAME=api GUNICORN_WORKERS=8 CPU_REQUEST=100m CPU_LIMIT=500m MEMORY_REQUEST=6Gi MEMORY_LIMIT=8Gi REPLICAS=3 PROJ_TARGET=${PROJ_TARGET} VANITY_DOMAIN=psu.nrs.gov.bc.ca SECOND_LEVEL_DOMAIN=apps.silver.devops.gov.bc.ca USE_WFWX="True" ENVIRONMENT="production" bash $(dirname ${0})/oc_deploy.sh prod ${RUN_TYPE} +MODULE_NAME=api GUNICORN_WORKERS=8 CPU_REQUEST=100m CPU_LIMIT=500m MEMORY_REQUEST=6Gi MEMORY_LIMIT=8Gi REPLICAS=3 PROJ_TARGET=${PROJ_TARGET} VANITY_DOMAIN=psu.nrs.gov.bc.ca SECOND_LEVEL_DOMAIN=apps.silver.devops.gov.bc.ca ENVIRONMENT="production" bash $(dirname ${0})/oc_deploy.sh prod ${RUN_TYPE} echo Env Canada Subscriber PROJ_TARGET=${PROJ_TARGET} bash $(dirname ${0})/oc_provision_ec_gdps_cronjob.sh prod ${RUN_TYPE} PROJ_TARGET=${PROJ_TARGET} bash $(dirname ${0})/oc_provision_ec_hrdps_cronjob.sh prod ${RUN_TYPE} diff --git a/openshift/templates/deploy.yaml b/openshift/templates/deploy.yaml index 323b540ae..3adb9a034 100644 --- a/openshift/templates/deploy.yaml +++ b/openshift/templates/deploy.yaml @@ -69,8 +69,6 @@ parameters: - name: ENVIRONMENT description: Used for specifying which environment sentry is running in value: "" - - name: USE_WFWX - value: "False" - name: VANITY_DOMAIN requests: True - name: GUNICORN_WORKERS @@ -180,8 +178,6 @@ objects: configMapKeyRef: name: ${GLOBAL_NAME} key: env.gunicorn.timeout - - name: USE_WFWX - value: ${USE_WFWX} - name: WFWX_MAX_PAGE_SIZE value: ${WFWX_MAX_PAGE_SIZE} - name: WFWX_AUTH_URL diff --git a/openshift/templates/env_canada_gdps.cronjob.yaml b/openshift/templates/env_canada_gdps.cronjob.yaml index 5460cd8f4..a10af1a30 100644 --- a/openshift/templates/env_canada_gdps.cronjob.yaml +++ b/openshift/templates/env_canada_gdps.cronjob.yaml @@ -124,11 +124,6 @@ objects: secretKeyRef: name: ${GLOBAL_NAME} key: rocket.chat-auth-token-secret - - name: USE_WFWX - valueFrom: - configMapKeyRef: - name: ${GLOBAL_NAME} - key: env.use-wfwx - name: WFWX_MAX_PAGE_SIZE value: ${WFWX_MAX_PAGE_SIZE} - name: WFWX_AUTH_URL diff --git a/openshift/templates/env_canada_hrdps.cronjob.yaml b/openshift/templates/env_canada_hrdps.cronjob.yaml index 0f10d2e7b..01527ef5c 100644 --- a/openshift/templates/env_canada_hrdps.cronjob.yaml +++ b/openshift/templates/env_canada_hrdps.cronjob.yaml @@ -124,11 +124,6 @@ objects: secretKeyRef: name: ${GLOBAL_NAME} key: rocket.chat-auth-token-secret - - name: USE_WFWX - valueFrom: - configMapKeyRef: - name: ${GLOBAL_NAME} - key: env.use-wfwx - name: WFWX_MAX_PAGE_SIZE value: ${WFWX_MAX_PAGE_SIZE} - name: WFWX_AUTH_URL diff --git a/openshift/templates/env_canada_rdps.cronjob.yaml b/openshift/templates/env_canada_rdps.cronjob.yaml index 28fcdcfdc..d2cb9a9b3 100644 --- a/openshift/templates/env_canada_rdps.cronjob.yaml +++ b/openshift/templates/env_canada_rdps.cronjob.yaml @@ -125,11 +125,6 @@ objects: secretKeyRef: name: ${GLOBAL_NAME} key: rocket.chat-auth-token-secret - - name: USE_WFWX - valueFrom: - configMapKeyRef: - name: ${GLOBAL_NAME} - key: env.use-wfwx - name: WFWX_MAX_PAGE_SIZE value: ${WFWX_MAX_PAGE_SIZE} - name: WFWX_AUTH_URL diff --git a/openshift/templates/global.config.yaml b/openshift/templates/global.config.yaml index 1513dbd18..f4d7cf830 100644 --- a/openshift/templates/global.config.yaml +++ b/openshift/templates/global.config.yaml @@ -12,9 +12,6 @@ parameters: - name: WFWX_USER description: The username to be used for authentication to the Wildfire One API required: true - - name: USE_WFWX - description: Boolean value indicating whether Wildfire One API should be used for data retrieval - required: true - name: WFWX_SECRET description: Password for authentication to access Wildfire One API required: true @@ -126,7 +123,6 @@ objects: env.wfwx-auth-url: ${WFWX_AUTH_URL} env.wfwx-base-url: ${WFWX_BASE_URL} env.wfwx-user: ${WFWX_USER} - env.use-wfwx: ${USE_WFWX} env.keycloak-public-key: ${KEYCLOAK_PUBLIC_KEY} bc-fire-weather-user: ${BC_FIRE_WEATHER_USER} bc-fire-weather-filter-id: ${BC_FIRE_WEATHER_FILTER_ID} diff --git a/openshift/templates/noaa_gfs.cronjob.yaml b/openshift/templates/noaa_gfs.cronjob.yaml index eeee4909b..d17388e24 100644 --- a/openshift/templates/noaa_gfs.cronjob.yaml +++ b/openshift/templates/noaa_gfs.cronjob.yaml @@ -117,11 +117,6 @@ objects: secretKeyRef: name: ${GLOBAL_NAME} key: rocket.chat-auth-token-secret - - name: USE_WFWX - valueFrom: - configMapKeyRef: - name: ${GLOBAL_NAME} - key: env.use-wfwx - name: WFWX_MAX_PAGE_SIZE value: ${WFWX_MAX_PAGE_SIZE} - name: WFWX_AUTH_URL diff --git a/openshift/templates/noaa_nam.cronjob.yaml b/openshift/templates/noaa_nam.cronjob.yaml index 69ac82dae..5d5a652a0 100644 --- a/openshift/templates/noaa_nam.cronjob.yaml +++ b/openshift/templates/noaa_nam.cronjob.yaml @@ -114,11 +114,6 @@ objects: secretKeyRef: name: ${GLOBAL_NAME} key: rocket.chat-auth-token-secret - - name: USE_WFWX - valueFrom: - configMapKeyRef: - name: ${GLOBAL_NAME} - key: env.use-wfwx - name: WFWX_MAX_PAGE_SIZE value: ${WFWX_MAX_PAGE_SIZE} - name: WFWX_AUTH_URL