Skip to content

Commit

Permalink
Merge pull request #4 from NOAA-GSL/add-nwsc-gateway
Browse files Browse the repository at this point in the history
feat: add nwsc-gateway subdirectory
  • Loading branch information
mackenzie-grimes-noaa authored Dec 10, 2024
2 parents 4a082e6 + e42a4b9 commit f393d1c
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ The complete twelve-factors methodologies that the IDSS Engine Project adheres t
To support some standardization and best practices for IDSS Engine, developers should following the logging guide found under the docs directory [here](https://github.com/NOAA-GSL/idss-engine-commons)

## Build, Release, and Install
The subsections below outline how to build the package within this project.
The subsections below outline how to build the package within this project.

#### Build
From the IDSS Engine Testing project python directory `idsse-testing/pythom/`:
From the IDSS Engine Testing project python directory `idsse-testing/python/`:

`$ pip imstall .`
`$ pip install .`
Empty file.
62 changes: 62 additions & 0 deletions python/idsse/testing/nwsc_gateway/criteria_single_point.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"corrId": {
"originator": "IMS",
"uuid": "fd35adec-d2a0-49a9-a320-df20a7b6d681",
"issueDt": "2024-01-02T03:00:00.000Z"
},
"location": {
"features": [
{
"geometry": {
"coordinates": [-113.9595, 46.8571],
"type": "Point"
},
"properties": {
"name": "Missoula"
},
"type": "Feature"
}
]
},
"issueDt": "2024-01-02T03:00:00.000Z",
"validDt": [
{
"times": ["2024-01-02T15:00:00.000Z", "2024-01-02T16:00:00.000Z"]
}
],
"conditions": [
{
"name": "Minor",
"severity": "MINOR",
"combined": "A",
"partsUsed": ["A"]
}
],
"parts": [
{
"name": "A",
"duration": 0,
"arealPercentage": 0,
"region": "CONUS",
"product": {
"fcst": ["NBM"]
},
"field": "TEMP",
"units": "DEG F",
"relational": "LESS THAN",
"thresh": 32,
"mapping": {
"min": 17,
"max": 47,
"clip": "true"
}
}
],
"tags": {
"values": [],
"keyValues": {
"name": "GSL Test 1",
"nwsOffice": "GSL"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"profiles": [
{
"id": "fd35adec-d2a0-49a9-a320-df20a7b6d681",
"name": "GSL Test 1",
"associatedOfficeId": "GSL",
"profileType": "LIMITED_EPISODIC",
"lifecycleStatus": "UNDEF",
"submissionStatus": "APPROVED",
"setting": {
"id": "09acfa26-c2b4-4b8f-8dc8-8c9afc7c66e0",
"name": "Missoula",
"driverType": "EVENT",
"locations": [
{
"createdAt": "2024-01-26T19:07:33.559672Z",
"creationMethod": "DRAWPOINT",
"editable": true,
"original": null,
"address": null,
"geometryType": "POINT",
"minElevation": 4124,
"maxElevation": 4124,
"lastModified": "2024-01-26T19:07:33.559675Z",
"name": "Missoula",
"notes": "",
"userData": null,
"validTime": null,
"geoShapeCreationMethod": "DRAWPOINT",
"geomAsString": "POINT (-113.9595 46.8571)"
}
],
"timing": {
"start": null,
"duration": 0,
"rrule": ""
},
"nationalSecurity": false,
"website": "",
"numberOfPeople": 1
},
"impacts": [],
"nonImpactThresholds": {
"phrasesForAllSeverities": {
"MINOR": {
"severity": "MINOR",
"encodedRepresentation": "A",
"map": {
"A": {
"type": "TYPE_AND_THRESH",
"phraseId": "A",
"probability": 0,
"environmentalConditionType": "COLD",
"wwaProduct": "UNDEF",
"condition": "LESS_THAN",
"value": "32",
"timeFrame": "PT0S",
"minDuration": "PT0S",
"units": "DEG_F",
"dataSource": "",
"dataParameter": ""
}
}
}
},
"allTypesAsStrings": ["COLD"]
},
"maxLeadTime": 168,
"isLive": true,
"requestedServices": [],
"timeBuffer": 0,
"geoBuffer": 5.0,
"profileLevelActionPlans": [],
"maxLeadTimeAsString": "7 d"
}
],
"errors": []
}
12 changes: 7 additions & 5 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import os
from setuptools import setup


def package_files(directory):
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
paths.append(os.path.join(path, filename))
return paths


setup(name='idsse-testing',
version='1.0',
description='IDSSe Common Test Data and External Proxies',
Expand All @@ -28,6 +30,7 @@ def package_files(directory):
'idsse.testing.ims_request',
'idsse.testing.ims_response',
'idsse.testing.ims_service',
'idsse.testing.nwsc_gateway',
'idsse.testing.risk_processor',
'idsse.testing.risk_processor.binghamton',
'idsse.testing.risk_processor.i87',
Expand All @@ -40,12 +43,12 @@ def package_files(directory):
('idsse.testing.data_access.nbm_aws_grib', package_files('idsse/testing/data_access/nbm_aws_grib')),
('idsse.testing.data_access.validation', package_files('idsse/testing/data_access/validation'))],
include_package_data=True,
package_data={'':['*.csv', '*.json', '*.nc', '*.grib2*']},
package_data={'': ['*.csv', '*.json', '*.nc', '*.grib2*']},
install_requires=[
'pika',
'jsonschema',
'netcdf4',
'h5netcdf',
'netcdf4',
'h5netcdf',
'python-logging-rabbitmq'
],
extras_require={
Expand All @@ -54,5 +57,4 @@ def package_files(directory):
'pytest-cov',
]
},
zip_safe=False,
)
zip_safe=False)

0 comments on commit f393d1c

Please sign in to comment.