Skip to content

Quick start guide throws errors in blank environment #94

@julianstirling

Description

@julianstirling

Describe the bug
Trying to follow the ReadTheDocs quick start guide and I get errors

To Reproduce

  1. Create new environment
  2. follow instructions in guide

Expected behaviour

Crashes as:

  1. Crashes missing package - pip install labthings-fastapi doesn't install fastapi you need to run pip install labthings-fastapi[server]
  2. Once fixed, crashes again with missing package - After this is uvicorn is never installed
  3. Once fixed, crashes again in wrong environment - uvicorn counter:app --reload doesn't necessarily run uvicorn from the activated environment. Can be fixed by running python -m uvicorn counter:app --reload
  4. Once fixed crashes due to missing module - from labthings_fastapi.thing_server import ThingServer should be from labthings_fastapi.server import ThingServer
  5. Once fixed crashes as attribute "app" is not found. Need to add app = server.app as final line

Suggested fix

Create an GitHub action that does exactly the steps of the demo only and check that it runs successfully.

System:

  • OS: Ubuntu 24.04
  • Python version 3.10
  • Version 0.0.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions