Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FastAPI support #287

Merged
merged 5 commits into from
Mar 15, 2024
Merged

Add FastAPI support #287

merged 5 commits into from
Mar 15, 2024

Commits on Mar 11, 2024

  1. test: rename test apps

    Having the Django and Flask apps both use the module name "app" makes
    the tests order-dependent. If the Django "app" is loaded before the
    Flask tests, the latter fail because they try to import "app.main",
    which doesn't exist
    
    Maybe there's some other way to avoid this collision by unloading "app"
    and still have all the tests pass, but I couldn't find it. Just renaming
    them seemed simplest.
    apotterri committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    e8ed31b View commit details
    Browse the repository at this point in the history
  2. refactor: update importlib

    importlib.metadata was added in 3.8. Now that we no longer support 3.7,
    we can use it directly, rather than using the backported implementation.
    (We still need to use the backported version of importlib_resources
    until we drop 3.8.)
    apotterri committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    56e672e View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2024

  1. test: use pytest-xprocess to manage test servers

    Remove our bespoke test server management, use pytest-xprocess instead.
    Ensures that pytest doesn't hang if a test fails, and that the tests run
    correctly in VS Code (maybe also on Windows, still to be determined).
    
    Also fixes a couple of issues identified by pylint.
    apotterri committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    d32059f View commit details
    Browse the repository at this point in the history
  2. feat: FastAPI support

    Add support for the FastAPI framework. Load it automatically when
    uvicorn is run with a FastAPI app.
    apotterri committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    3dba2a2 View commit details
    Browse the repository at this point in the history
  3. fix: log to a file by default

    Create a log file by default, messages at INFO and above to it. Provide
    the env var APPMAP_DISABLE_LOG_FILE to instead log (at WARNING, by
    default) to stderr.
    apotterri committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    3da004f View commit details
    Browse the repository at this point in the history