Skip to content

Commit

Permalink
Removed semantics submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Collins committed Sep 4, 2020
1 parent e5d6185 commit 9716f79
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 72 deletions.
13 changes: 3 additions & 10 deletions examples/simple_extensions.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
from labthings.monkey import patch_all

patch_all()

import logging
import math
import random
import time

from labthings.core.utilities import path_relative_to
from labthings.server import fields
from labthings.server.extensions import BaseExtension
from labthings.server.find import find_component
from labthings.server.quick import create_app
from labthings.server.view import ActionView, PropertyView
from labthings import ActionView, PropertyView, create_app, fields, find_component
from labthings.extensions import BaseExtension
from labthings.utilities import path_relative_to

logging.basicConfig(level=logging.DEBUG)

Expand Down
6 changes: 4 additions & 2 deletions examples/simple_thing.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
import time

from labthings import create_app, fields, find_component, semantics
from labthings import create_app, fields, find_component
from labthings.example_components import PretendSpectrometer
from labthings.json import encode_json
from labthings.views import ActionView, PropertyView, op
Expand All @@ -19,10 +19,12 @@


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

schema = fields.Int(required=True, minimum=100, maximum=500)
semtype = "LevelProperty"

@op.readproperty
def get(self):
# When a GET request is made, we'll find our attached component
Expand Down
2 changes: 0 additions & 2 deletions src/labthings/semantics/__init__.py

This file was deleted.

21 changes: 0 additions & 21 deletions src/labthings/semantics/base.py

This file was deleted.

37 changes: 0 additions & 37 deletions src/labthings/semantics/moz.py

This file was deleted.

0 comments on commit 9716f79

Please sign in to comment.