Skip to content

Commit b46a9ce

Browse files
committed
Update developer notes in readme.
I've reordered some things, but mostly I've just removed some references to "summary rearrangement" of the codebase, and removed what was an increasingly old list of why this is better than `python-labthings`. The useful bits are preserved on readthedocs, which is prominently linked to.
1 parent ea6b00a commit b46a9ce

File tree

1 file changed

+6
-25
lines changed

1 file changed

+6
-25
lines changed

README.md

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,43 +7,24 @@ A FastAPI based library to implement a [Web of Things] interface for laboratory
77

88
Documentation, including install instructions, is available on [readthedocs].
99

10-
Features include:
11-
12-
* Better alignment with the Web of Things standard:
13-
- `Extensions` are gone, everything is now a `Thing`
14-
- `Thing`s are classes, with properties and actions defined exactly once
15-
- Various improvements to TD generation and validation with `pydantic`
16-
* Cleaner API
17-
- Datatypes of action input/outputs and properties are defined with Python type hints
18-
- Actions are defined exactly once, as a method of a `Thing` class
19-
- Properties and actions are declared using decorators (or descriptors if that's preferred)
20-
- Dependency injection is used to manage relationships between Things and dependency on the server
21-
* Async HTTP handling
22-
- Starlette (used by FastAPI) can handle requests asynchronously - potential for websockets/events (not used much yet)
23-
- `Thing` code is still, for now, threaded. It may become possible to write async things in the future, but won't become mandatory
24-
* Smaller codebase
25-
- FastAPI more or less completely eliminates OpenAPI generation code from our codebase
26-
- Thing Description generation is very much simplified by the new structure (multiple Things instead of one massive Thing with many extensions)
27-
* Extensive testing
28-
- FastAPI/Starlette have nice test provision, so the vast majority of the codebase is already covered
29-
30-
3110
## Installation
3211

33-
See [readthedocs] for installation instructions that are automatically tested. You can install this package with `pip install labthings-fastapi`. It may at some point be renamed to `labthings` v2. For the latest development version, either clone it and run `pip install -e .[dev]` to work on it, or just `pip install https://gitlab.com/rwb27/labthings-fastapi.git`.
12+
See [readthedocs] for installation instructions that are automatically tested. You can install this package with `pip install labthings-fastapi`.
3413

3514
## Developer notes
3615

37-
The code is linted with `ruff .`, type checked with `mypy src`, and tested with `pytest`. These all run in CI with GitHub Actions. The codebase is not even `v0.1` yet so it's still subject to summary rearrangement. We recommend a [pre-commit hook] to ensure `ruff` passes on every commit. `flake8` is also run in CI, primarily to enable stricter checks on docstrings. It is run as `flake8 src`. `ruff` and `flake8` are both configured from `pyproject.toml`.
16+
For the latest development version, clone this repository and run `pip install -e .[dev]`.
17+
18+
The code is linted with `ruff .`, type checked with `mypy`, and tested with `pytest`. These all run in CI with GitHub Actions. We recommend a [pre-commit hook] to ensure `ruff` passes on every commit. `flake8` is also run in CI, primarily to enable stricter checks on docstrings. It is run as `flake8 src`. `ruff` and `flake8` are both configured from `pyproject.toml`.
19+
20+
All changes to the codebase should go via pull requests, and should only be merged once all the checks in the `test` job are passing. It is preferable to merge code where the `test-with-unpinned-dependencies` job fails, and deal with the dependency issues in another PR, particularly where the required changes are distinct from the code in the PR.
3821

3922
Dependencies are defined in `pyproject.toml` and can be compiled to `dev-requirements.txt` with:
4023
```
4124
uv pip compile --extra dev pyproject.toml --output-file dev-requirements.txt
4225
```
4326
If you're not using `uv`, just regular `pip-compile` from `pip-tools` should do the same thing.
4427

45-
All changes to the codebase should go via pull requests, and should only be merged once all the checks in the `test` job are passing. It is preferable to merge code where the `test-with-unpinned-dependencies` job fails, and deal with the dependency issues in another PR, particularly where the required changes are distinct from the code in the PR.
46-
4728
## Demo
4829

4930
See [readthedocs] for a runnable demo.

0 commit comments

Comments
 (0)