-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reverted to current_labthing function
- Loading branch information
Joel Collins
committed
Jul 19, 2020
1 parent
070bfcd
commit 6b79698
Showing
18 changed files
with
102 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,10 @@ LabThing | |
-------- | ||
|
||
.. autoclass:: labthings.LabThing | ||
:members: | ||
|
||
Module | ||
------ | ||
|
||
.. automodule:: labthings | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,46 @@ | ||
# Main LabThing class | ||
from .labthing import LabThing | ||
from .wsgi import Server | ||
|
||
# Quick-create app+LabThing function | ||
from .quick import create_app | ||
from . import views, sync, fields, schema, semantics | ||
|
||
# Suggested WSGI+WebSocket server class | ||
from .wsgi import Server | ||
|
||
# Functions to speed up finding global objects | ||
from .find import ( | ||
current_labthing, | ||
registered_extensions, | ||
registered_components, | ||
find_extension, | ||
find_component, | ||
) | ||
|
||
# Synchronisation classes | ||
from .sync import StrictLock, CompositeLock, ClientEvent | ||
|
||
# Task management functions | ||
from .tasks import ( | ||
current_task, | ||
current_task_stopped, | ||
update_task_progress, | ||
update_task_data, | ||
TaskKillException, | ||
) | ||
|
||
# Submodules | ||
from . import extensions | ||
from . import views | ||
from . import fields | ||
from . import schema | ||
from . import semantics | ||
from . import json | ||
|
||
__all__ = [ | ||
"LabThing", | ||
"Server", | ||
"create_app", | ||
"views", | ||
"sync", | ||
"fields", | ||
"schema", | ||
"semantics", | ||
"current_labthing()", | ||
"registered_extensions", | ||
"registered_components", | ||
"find_extension", | ||
"find_component", | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from ..find import current_thing | ||
from ..find import current_labthing | ||
from ..views import View | ||
|
||
|
||
class RootView(View): | ||
"""W3C Thing Description""" | ||
|
||
def get(self): | ||
return current_thing.thing_description.to_dict() | ||
return current_labthing().thing_description.to_dict() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .encoder import LabThingsJSONEncoder, encode_json | ||
|
||
__all__ = ["LabThingsJSONEncoder", "encode_json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.