-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use FastAPI to provide rest endpoints #135
Conversation
Codecov Report
@@ Coverage Diff @@
## main #135 +/- ##
==========================================
+ Coverage 83.09% 87.39% +4.30%
==========================================
Files 39 40 +1
Lines 1035 1079 +44
==========================================
+ Hits 860 943 +83
+ Misses 175 136 -39
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Just so you know I don't have write access so can't resolve the merge conflicts. Happy for someone else to do it or give me write access (or both?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, needs a bit of back and forth but definitely getting there.
I think I've changed stuff enough now, in response to comments. Please have a look. I'm aware that #145 is related to this PR, i.e. it should probably get merged first and then the lines changed for this PR will be smaller. Happy to work on this with you @callumforrester |
@RAYemelyanova Regarding the merge conflicts, you should have access now, let me know if there are any problems |
3bb6d6a
to
ef7f7db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting close, main thing is we can't have a top-level command called run
. I also agree that bluesky worker
was the wrong choice which is why I renamed it to blueapi worker
, but happy to discuss further if you have objections to that.
…d deprecation message for worker.
…d deprecation message for worker.
… .json() instead of literal_eval in tests
self.context.with_startup_script(self.config.env.startup_script) | ||
|
||
self.worker = RunEngineWorker(self.context) | ||
self.message_bus = StompMessagingTemplate.autoconfigured(self.config.stomp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think something needs to handle the stomp connection not being available. At the moment, running without aMQ running prints a stacktrace, then hangs. It'd be good to show a useful error message then exit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea; will write something in for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree but think we should sort this out in a separate PR to avoid scope creep.
just need to write some tests for the handler to increase code coverage |
…d error message for deprecated worker command
Co-authored-by: Callum Forrester <[email protected]>
This is ready to be merged, but here are a few more ideas for future PRs:
|
resolves #120
The only thing left to do is change the cli commands.