Skip to content

Releases: labthings/python-labthings

v0.8.0-beta.3

20 Jul 16:07
Compare
Choose a tag to compare
v0.8.0-beta.3 Pre-release
Pre-release

0.8.0-beta.3 (2020-07-20)

  • Started API documentation
  • Added automatic URL generation for interaction builders (5a33d71)
  • Added create_app to top level import (070bfcd)
  • Added root import of LabThing class (4bf8412)
  • Added tests for LabThing view builders (d039874)
  • Deprecate monkey patch (9f7f905)
  • Fix conversion from None lock timeout to -1 (ea4ccba)
  • Fixed ThreadedWebsocketServer (70342ff)
  • Let LabThing object handle choice of JSON encoder (470b4f6)
  • Moved json.paths functions into json.schemas (58d9318)
  • Removed default schema for built properties (096eb99)
  • Removed LabThing.owns_endpoint (af56b80)
  • Removed get_class_that_defined_method function (19d80ce)
  • Renamed labthings.view to labthings.views (ec15b10)
  • Reverted current_thing proxy back to current_labthing function (6b79698)
  • Switched action builder to the same API as property builder (cb4d1a3)
  • Switched all docstrings to common format (dedebb9)
  • Updated flask_threaded_sockets (286cdb6)
  • Updated to simplified imports (6e4465f)

v0.8.0-beta.2

15 Jul 14:10
Compare
Choose a tag to compare
v0.8.0-beta.2 Pre-release
Pre-release

0.8.0-beta.2 (2020-07-15)

  • Switched to native threaded concurrency (#120) (506a026), closes #120
  • Moved socket WSGI handler into external module (506a026)
  • Added a method to allow Actions to be elegantly stopped before terminating after a timeout (506a026)
  • Removed gevent from socket handler and monkey patcher (5f2da89)

v0.8.0-beta.1

09 Jul 15:16
Compare
Choose a tag to compare
v0.8.0-beta.1 Pre-release
Pre-release

v0.8.0-beta.1 (2020-07-09)

Major changes

This release introduces a massively simplified API, at the expense of being more opinionated about how we marshal View responses.
By being stricter about what ActionView and PropertyView derivatives can do, we're able to greatly simplify the internal code.

  • The Tasks view (/tasks) is now deprecated, and has been replaced with a root /actions view.

    • These are functionally identical, however some keys are named differently (e.g. return is now output)
  • The tasks submodule no longer includes a global task list.

    • This has been replaced with a labthing attribute actions. To access the full list of action tasks, use current_thing.actions
    • To spawn a new action task, use current_thing.actions.spawn(function, *args, **kwargs)
  • Thing Descriptions no longer rely on the apispec module. They are now generated using a built-in json schema converter module, forked from marshmallow_jsonschema

  • apispec information is now built by the View class method, using marshmallow_jsonschema. This greatly simplifies the internal code, however note that schemas in the OpenAPI spec will now always be inline, rather than referenced.

Major new features

  • Action views now automatically include a GET method, which returns a list of actions of that type

  • Action wait time can now be changed, allowing developers to guarantee an Action will return when completed, rather than returning a running status, or always return running immediately without any waiting.

  • Introduces the current_thing proxy, which gives you a proxy to the current app's attached LabThing object

Change commits

  • Added 0.7 compatibility layer (334539b)
  • Added Action queue method (08ed9ce)
  • Added alias to Flask Response class (c9d693c)
  • Added alias to Marshmallow pre_dump and pre_load (c80e45f)
  • Added basic deque submodule (cb0df6f)
  • Added default error schema to API spec (48196ec)
  • Added init file (47458cc)
  • Added input content_type attribute (5ec94ee)
  • Allow calling abstract Semantics (d4fe57e)
  • Allow mock WS client to close after a specific response (df0062e)
  • Allow OpenAPIConverter to use _jsonschema_type_mapping (cae8e10)
  • Allow overriding Action wait time (87adad5)
  • Changed views to be more opinionated (9fa713e)
  • Created a current_thing LocalProxy (2b421b8)
  • Fix HTTP method check (8ae6060)
  • Fix OpenAPI formatting (c90a646)
  • Fixed applying semtype string (d84ae58)
  • Fixed arg handling in request handlers (93cd2ff)
  • Fixed automatic marshalling (d467463)
  • Fixed builder (00fe6dc)
  • Fixed comments (d5853ba)
  • Fixed default View arguments (881ee3f)
  • Fixed how _register_view looks for view tags (82648f5)
  • Fixed internal imports (bca418e)
  • Fixed OpenAPI spec with missing schemas (2394d81)
  • Fixed reading content type (f5e7e35)
  • Fixed switched arg_methods and marshal_methods (4641e66)
  • Fixed TaskList description (a5d6ea6)
  • Fixed view class scope (80410f1)
  • Got basic simpler spec working (caa983b)
  • Handle different request and response types in TD (8427445)
  • Handle missing schema better (31a7a04)
  • Handle missing semantic type (19dbb37)
  • Handle passing None to schema_to_json (8c1068d)
  • Improved coverage (1c6a019)
  • Improved coverage (a0ec226)
  • Improved coverage for lock call context (8d37bd8)
  • Improved HTTP form builder (56a22bf)
  • Improved WS response checker (d6c69eb)
  • Inherit basic OpenAPI spec from superclass (2371bd6)
  • Initial reorganisation (33b6dc7)
  • Loostened codecov failure conditions (c4fc243)
  • Made class-tags non-removable by default (6b41db8)
  • Manually marshal tasks view (ae2192a)
  • Migrated OpenAPI away from APISpec library (2e28d14)
  • Move content_type into class responses dictionary (a2302fe)
  • Moved APISpec to a class method (3a82dba)
  • Only marshal for "get", "put", "post", "patch" (e606d35)
  • Properly marshal extensions list (82124c9)
  • Re-added compatibility import (0582e77)
  • Remove reliance on OpenAPI spec for Thing Description (45bb9df)
  • Remove unused imports (fd2144b)
  • Remove unused imports (3c6a628)
  • Removed APISpec module dependence from TD (a4aab52)
  • Removed decorators entirely (c9f7dbc)
  • Removed default task pool (d67b5b0)
  • Removed docs view property (d5565cd)
  • Removed legacy property mode and raise invalid semtypes (f363982)
  • Removed marshal_task (80ef05b)
  • Removed URL prefix (cdf151c)
  • Removed uses of old apispec (833229f)
  • Renamed to jsonschema_type_mapping (9bc663d)
  • Renamed to SerializedExceptionHandler (3671552)
  • Simplified class attributes (5bb0cc6)
  • Simplified class attributes (6c0460d)
  • SImplified interaction contentType definitions (bc8ddc5)
  • Specified marshal_methods (3020d31)
  • Split general JSON schema formatting away from APIspec (b718258)
  • Switch to gevent Event (4297910)
  • Switched action tasks to use LabThing-level pool (53ea2bf)
  • Switched to PUT for properties (376db07)
  • Temporarily removed CBOR encoding support (26cb16a)
  • Tidied up comments (c2c0085)
  • Tidied up view descriptions ([48e34d9](48...
Read more

v0.7.0

30 Jun 17:30
Compare
Choose a tag to compare

v0.7.0 (2020-06-30)

  • Introduced simpler API view spec declerations (caa983b)
  • Added alias to Flask Response class (c9d693c)
  • Added alias to Marshmallow pre_dump and pre_load (c80e45f)
  • Handle missing schema better (31a7a04)
  • Improved coverage (1c6a019)
  • Improved coverage (a0ec226)
  • Improved coverage for lock call context (8d37bd8)
  • Improved tag test (d7889d0)
  • Improved WS response checker (d6c69eb)
  • Loostened codecov failure conditions (c4fc243)
  • Made class-tags non-removable by default (6b41db8)
  • Move content_type into class responses dictionary (a2302fe)
  • Removed decorators entirely (c9f7dbc)
  • Removed docs view property (d5565cd)
  • Removed legacy property mode and raise invalid semtypes (f363982)
  • Removed marshal_task (80ef05b)
  • Removed old debug prints (b0e17dc)
  • Removed old doc_response decorator (959ef15)
  • Removed unnecesarry get_semantic_type function (5eccd7c)
  • Removed unused function (945062d 6da51b7)
  • Removed unused variable (59ca394)
  • Removed URL prefix (cdf151c)
  • Removed uses of old apispec (833229f)
  • Specified marshal_methods (3020d31)
  • Started testing class-attribute spec definitions (f130d66)
  • Switched to PUT for properties (376db07)
  • Tidied up view descriptions (48e34d9)
  • Updated APIspec tests (097f506)
  • Updated default server view tests (e1f4ca8)
  • Updated examples (2d30c12)
  • Updated TD tests (5d2be38)
  • Updated version and dependencies (6d4c873)
  • Updated view builder tests (a455797)

v0.6.7

25 Jun 09:48
Compare
Choose a tag to compare

0.6.7 (2020-06-25)

v0.6.6

23 Jun 12:54
Compare
Choose a tag to compare

0.6.6 (2020-06-23)

  • Added Flask config for custom JSON encoder (395ffb6)
  • Added Flask responses proxy (eeac929)
  • Added proxy to flask current_app (02e8773)
  • Added proxy to flask url_for (4c4390b)
  • Added semantic annotation support to view builder (d4ecd46)
  • Added W3C schema (4119de5)
  • Allow boolean values for "required". May be reverted at some point (5c0ca64)
  • Changed fast action message to debug (d433092)
  • Deleted unused consumer submodule (d7301cb)
  • Re-added semtype for 0.6.X compatibility (7ad7b1b)
  • Rearranged socket handler (ed4b8fe)
  • Removed automatic schema generator (e948993)
  • Removed webthing mDNS record (41fae69)
  • Restored W3C TD compatibility (e173b61)

v0.6.5b

15 Jun 16:18
Compare
Choose a tag to compare

Updated CI to fix automatic releases

v0.6.5

15 Jun 15:48
Compare
Choose a tag to compare

0.6.5 (2020-06-15)

  • Updated dependencies
  • Added decorator for including semantic @type in Thing Description (44ef329)
  • Default to infinitely blocking locks (1ee6afe)
  • Started adding Mozilla semantic classes (797388d)
  • Support semantic types in view builder (84f1fd1)

v0.4.0

01 Jun 09:20
Compare
Choose a tag to compare
v0.4.0

v0.6.4

28 May 10:29
Compare
Choose a tag to compare

0.6.4 (2020-05-28)

  • Added input and output to default Action schema (52a5116)
  • Added more deprecation warnings (76831e2)
  • Assert unbound argument skipping (8ae655d)
  • Bump pytest-cov from 2.8.1 to 2.9.0 (a832b11)
  • Bump zeroconf from 0.26.1 to 0.26.2 (64c68f5)
  • Fixed Action output formatting (05b48ac)
  • Skeleton for handling unbound arguments (a03f1b5)
  • Skip unbound arguments when generating signature schemas (b8ed956)