Skip to content

Commit 0f47e7f

Browse files
committed
Fix typos and delete examples folder in response to review.
1 parent 2a4ef7e commit 0f47e7f

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ All changes to the codebase should go via pull requests, and should only be merg
4646

4747
## Demo
4848

49-
See [readthecods] for a runnable demo.
49+
See [readthedocs] for a runnable demo.
5050

5151
[Web of Things]: https://www.w3.org/WoT/
5252
[python-labthings]: https://github.com/labthings/python-labthings/

docs/source/examples.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Examples
2+
========
3+
4+
For a simple example `.Thing` and instructions on how to serve it, see the :ref:`tutorial`\ .
5+
6+
For more complex examples, there is a useful collection of `.Thing` subclasses implemented as part of the `OpenFlexure Microscope`_ in the `things`_ submodule. This includes control of a camera and a translation stage, as well as various software `.Thing`\ s that integrate the two.
7+
8+
.. _`OpenFlexure Microscope`: https://gitlab.com/openflexure/openflexure-microscope-server/
9+
.. _`things`: https://gitlab.com/openflexure/openflexure-microscope-server/-/tree/v3/src/openflexure_microscope_server/things/

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Documentation for LabThings-FastAPI
99
wot_core_concepts.rst
1010
lt_core_concepts.rst
1111
tutorial/index.rst
12+
examples.rst
1213
actions.rst
1314
dependencies/dependencies.rst
1415
blobs.rst

docs/source/using_things.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Planned future development: static code generation
3737

3838
In the future, `labthings_fastapi` will generate custom client subclasses. These will have the methods and properties defined in a Python module, including type annotations. This will allow static analysis (e.g. with MyPy) and IDE autocompletion to work. Most packages that provide a `Thing` subclass will want to release a client package that is generated automatically in this way. The intention is to make it possible to add custom Python code to this client, for example to handle specialised return types more gracefully or add convenience methods. Generated client code does mean there will be more packages to install on the client in order to use a particular Thing. However, the significant benefits of having a properly defined interface should make this worthwhile.
3939

40-
Return types are also currently not consistent between client and server code: currently, the HTTP implementation of `.ThingClient` deserialises the JSON response and returns it directly, meaning that `pydantic.BaseModel` subclasses become dictionaries. This behaviour should change in the future to be consistent between client and server. Most liekly, this will mean Pydantic models are used in both cases.
40+
Return types are also currently not consistent between client and server code: currently, the HTTP implementation of `.ThingClient` deserialises the JSON response and returns it directly, meaning that `pydantic.BaseModel` subclasses become dictionaries. This behaviour should change in the future to be consistent between client and server. Most likely, this will mean Pydantic models are used in both cases.
4141

4242

4343

examples/README.md

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

0 commit comments

Comments
 (0)