Skip to content

Commit 9716f79

Browse files
author
Joel Collins
committed
Removed semantics submodule
1 parent e5d6185 commit 9716f79

File tree

5 files changed

+7
-72
lines changed

5 files changed

+7
-72
lines changed

examples/simple_extensions.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
from labthings.monkey import patch_all
2-
3-
patch_all()
4-
51
import logging
62
import math
73
import random
84
import time
95

10-
from labthings.core.utilities import path_relative_to
11-
from labthings.server import fields
12-
from labthings.server.extensions import BaseExtension
13-
from labthings.server.find import find_component
14-
from labthings.server.quick import create_app
15-
from labthings.server.view import ActionView, PropertyView
6+
from labthings import ActionView, PropertyView, create_app, fields, find_component
7+
from labthings.extensions import BaseExtension
8+
from labthings.utilities import path_relative_to
169

1710
logging.basicConfig(level=logging.DEBUG)
1811

examples/simple_thing.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
import time
33

4-
from labthings import create_app, fields, find_component, semantics
4+
from labthings import create_app, fields, find_component
55
from labthings.example_components import PretendSpectrometer
66
from labthings.json import encode_json
77
from labthings.views import ActionView, PropertyView, op
@@ -19,10 +19,12 @@
1919

2020

2121
# Wrap in a semantic annotation to autmatically set schema and args
22-
@semantics.moz.LevelProperty(100, 500, example=200)
2322
class DenoiseProperty(PropertyView):
2423
"""Value of integration_time"""
2524

25+
schema = fields.Int(required=True, minimum=100, maximum=500)
26+
semtype = "LevelProperty"
27+
2628
@op.readproperty
2729
def get(self):
2830
# When a GET request is made, we'll find our attached component

src/labthings/semantics/__init__.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/labthings/semantics/base.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/labthings/semantics/moz.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)