-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Feature description
We have a lot of logic living directly in our endpoint handlers in main.py
. @jsstevenson brought up the excellent point that this paradigm is something we should move away from. There are several reasons for this:
- It will help future-proof AnyVar:
- We currently can't access AnyVar functionality through any means other than a REST API. If/when we want to allow access to AnyVar in other ways (e.g., through a local Python installation, etc.), we would need to do this refactor first
- It makes our test logic cleaner:
- Separating out our endpoint handlers and our core logic allows us to test each separately, which is what we should be doing anyways to align with best practices.
Use case
We want AnyVar to be a maintainable, bug-free system that can easily grow to fit our needs now and in the future. This refactor will help us in that goal.
Acceptance Criteria
- Endpoint handlers contain minimal logic. All core functionalities should be abstracted out into their own functions
- Tests are updated/created for both the endpoint handlers and the abstracted functionality as needed
Proposed solution
No response
Alternatives considered
No response
Implementation details
No response
Potential Impact
No response
Additional context
No response
Contribution
None