Releases: labthings/labthings-fastapi
v0.0.12
What's Changed
This release includes significant tidying-up of both the codebase and the documentation, as well as a significant change, which is the move away from using FastAPI dependencies in Thing code.
Updating to v0.0.12 will require migration for Things written using previous versions of LabThings. Most old features are deprecated rather than removed, so it should be possible to migrate code gradually (except for the renamed lt.thing_action and lt.fastapi_endpoint which have had their prefixes removed). See the discussion in #194 for more details.
A full list of changes is below, in the form of pull requests merged since the last release.
- Update metadata for pypi by @bprobert97 in #153
- Simplify property and add type hints by @rwb27 in #155
- Enable bugbear rules by @rwb27 in #172
- Fix a race condition in test_actions_list by @rwb27 in #174
- Fix read-only properties in
DirectThingClientby @rwb27 in #173 - Add InvocationError for an error without traceback. Log cancel at info. by @julianstirling in #157
- Stricter mypy by @rwb27 in #176
- Raise better errors in observe_property, and test them. by @rwb27 in #175
- Test decorated actions by @rwb27 in #177
- Use config not model_config with create_model for pydatic 2.11 compatibility by @julianstirling in #181
- Stricter ruff by @rwb27 in #180
- Drop dependencies by @rwb27 in #194
- Server instantiates things by @rwb27 in #183
- Docs tidy after dropping dependencies by @rwb27 in #195
- Add a
mock_all_slotsoption tocreate_thing_without_serverby @julianstirling in #199 - Deprecation warnings for
v0.0.12by @rwb27 in #209 - Refactor descriptors, decorators and actions by @rwb27 in #213
- Rename fastapi_endpoint to endpoint by @rwb27 in #214
- Accept constraint arguments in property. by @rwb27 in #208
- Adapt to FastAPI changes by @rwb27 in #216
- Fix typing for actions. by @rwb27 in #215
- Version bump and readme by @rwb27 in #219
New Contributors
- @bprobert97 made their first contribution in #153
Full Changelog: v0.0.11...v0.0.12
v0.0.11
What's changed
- A significant overhaul of the documentation, including full docstring coverage and several new overview pages (#138).
- Fix an issue that caused errors if
Blobobjects were present when action invocations were listed (#144). - Improve spelling of documentation (#149).
Full Changelog: v0.0.10...v0.0.11
v0.0.10
What's Changed
- A considerable update to the package documentation (#106)
- An overhaul of Thing Settings to be a subclass of Thing Properties (rather than a dictionary) and to save on set. (#110)
- Rename the Descriptor
PropertyDescriptortoThingPropertyand crate matchingThingSetting(also #110) - Remove the need to install server packages with optional
[server]argument on install (#123) - Considerable overhaul of the Python API by allowing
import labthings-fastapi as ltwhich should simplify imports. (mostly #121, tweaked in #134) - Retired the FileManager as blobs are used for file transfer now (#130)
- Formatting improvements to fallback server (#129)
- Ability to set the HTML code of the fallback server (also #129)
- MJPEG stream is now easier to stop, plus also has better test coverage (#131)
Full Changelog: v0.0.9...v0.0.10
v0.0.9
What's Changed
- Build system changed to hatch from setuptools to make it easier to include non-python files in distribution
- Fix spelling error in fallback server
- Logging message fro deleting expired invocations is changed to debug level to reduce logging noise in applications
- The default argument parser for the CLI can be returned so that downstream programs can add CLI arguments to the parser if needed.
Full Changelog: v0.0.8...v0.0.9
v0.0.8
What's Changed
- Add more information to the fallback server by @julianstirling in #98
- Use pinned dependencies for testing by @rwb27 in #96
- Docs improvements by @rwb27 in #96
Full Changelog: v0.0.7...v0.0.8
This release creates a updated fallback server that can show more information about what caused LabThings to fail to start. We also have improved our testing pipelines to be more robust, and updated the quick start documentation.
v0.0.7
What's Changed
Full Changelog: v0.0.6...v0.0.7
This release brings improvements to the handling of non-JSON-serialisable data. Specifically, Actions may now use Blob types in both input and output, and these blobs may be nested inside Pydantic models. This is a breaking change: BlobOutput has been replaced by Blob although it should be a drop-in replacement.
The intention here is to be more flexible in how binary data is passed into and out of Actions, and to consolidate code for handling this into a new BlobManager class (which should not need to be touched directly by a Thing). See #83 for more details.
We also fix an issue where pydantic 2.10 errors when NDArray annotated types are used: this is now resolved.