Skip to content

Commit cd525c4

Browse files
committed
chore: simplify ci/cd, adjust imports
1 parent e4e7a67 commit cd525c4

3 files changed

Lines changed: 47 additions & 22 deletions

File tree

.github/workflows/python-app.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,21 @@ jobs:
4040
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
4141
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
4242
43-
- name: Start FROST Server
44-
run: |
45-
docker compose -f frost_server/docker-compose.yaml up -d
46-
echo "Waiting for FROST-Server to be ready..."
47-
for i in {1..60}; do
48-
if curl -fsS http://localhost:8080/FROST-Server >/dev/null; then
49-
break
50-
fi
51-
sleep 2
52-
done
43+
# - name: Start FROST Server
44+
# run: |
45+
# docker compose -f frost_server/docker-compose.yaml up -d
46+
# echo "Waiting for FROST-Server to be ready..."
47+
# for i in {1..60}; do
48+
# if curl -fsS http://localhost:8080/FROST-Server >/dev/null; then
49+
# break
50+
# fi
51+
# sleep 2
52+
# done
5353

5454
- name: Generate SensorThings model (OData)
5555
run: |
56-
python -m frost_sta_client.odata_codegen.install_model --url http://localhost:8080/FROST-Server --username admin --password admin
56+
# python -m frost_sta_client.odata_codegen.install_model --url http://localhost:8080/FROST-Server --username admin --password admin
57+
python -m frost_sta_client.odata_codegen.install_model --url ""
5758
5859
- name: Test with pytest
5960
run: |

frost_sta_client/__init__.py

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
1-
import jsonpickle
2-
3-
# Configure jsonpickle backend
4-
jsonpickle.load_backend('demjson3', 'encode', 'decode', 'JSONDecodeError')
5-
jsonpickle.set_preferred_backend('demjson3')
6-
jsonpickle.set_decoder_options('demjson3', decode_float=float)
7-
8-
from .__version__ import (
9-
__title__, __version__, __license__, __author__, __contact__, __url__,
10-
__description__, __copyright__
11-
)
1+
from frost_sta_client import model
2+
from frost_sta_client import dao
3+
from frost_sta_client import query
4+
from frost_sta_client import service
5+
6+
from frost_sta_client.model.actuator import Actuator
7+
from frost_sta_client.model.datastream import Datastream
8+
from frost_sta_client.model.entity import Entity
9+
from frost_sta_client.model.feature_of_interest import FeatureOfInterest
10+
from frost_sta_client.model.historical_location import HistoricalLocation
11+
from frost_sta_client.model.location import Location
12+
from frost_sta_client.model.multi_datastream import MultiDatastream
13+
from frost_sta_client.model.observation import Observation
14+
from frost_sta_client.model.observedproperty import ObservedProperty
15+
from frost_sta_client.model.sensor import Sensor
16+
from frost_sta_client.model.task import Task
17+
from frost_sta_client.model.tasking_capability import TaskingCapability
18+
from frost_sta_client.model.thing import Thing
19+
from frost_sta_client.model.ext.unitofmeasurement import UnitOfMeasurement
20+
from frost_sta_client.service.sensorthingsservice import SensorThingsService
21+
from frost_sta_client.service.auth_handler import AuthHandler
22+
from frost_sta_client.model.ext.entity_type import EntityTypes
23+
from frost_sta_client.model.ext.entity_list import EntityList
24+
from frost_sta_client.model.ext.data_array_value import DataArrayValue
25+
from frost_sta_client.model.ext.data_array_document import DataArrayDocument
26+
27+
import jsonpickle
28+
29+
jsonpickle.load_backend('demjson3', 'encode', 'decode', 'JSONDecodeError')
30+
jsonpickle.set_preferred_backend('demjson3')
31+
jsonpickle.set_decoder_options("demjson3", decode_float=float)
32+
33+
from .__version__ import (__title__, __version__, __license__, __author__, __contact__, __url__,
34+
__description__, __copyright__)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from frost_sta_client.generated.odata.datamodel import UnitOfMeasurement as UnitOfMeasurement

0 commit comments

Comments
 (0)