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

Fully isolate server code from other submodules #1403

Closed
3 tasks done
ml-evs opened this issue Nov 24, 2022 · 0 comments · Fixed by #1405
Closed
3 tasks done

Fully isolate server code from other submodules #1403

ml-evs opened this issue Nov 24, 2022 · 0 comments · Fixed by #1405
Assignees
Labels
ergonomics Features that improve the usability of the package

Comments

@ml-evs
Copy link
Member

ml-evs commented Nov 24, 2022

As part of #1199 I've been tidying up which other modules use server code (and thus require a dependency on FastAPI).

There's 3 bits that remain:

  • optimade.server.warnings can be moved out to the top-level package, leaving an import shim in its place for backwards compat
  • optimade.server.exceptions can be reimplemented without inheriting from FastAPIHTTPException, which will mean that exceptions still work when emitted from client code (e.g., the filter parsing that happens on the client side).
  • optimade.server.schemas is trickier; it is currently used by the validator as well as the main server. The validator is only using bits that required pydantic, but I don't see a huge value in splitting up the optimade.server.schemas submodule, so in Demote FastAPI to a server dep only #1199 I've just put an import guard in. In the future we could consider moving this submodule to the top-level entirely.
@ml-evs ml-evs self-assigned this Nov 24, 2022
@ml-evs ml-evs added the ergonomics Features that improve the usability of the package label Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ergonomics Features that improve the usability of the package
Projects
None yet
1 participant