-
Notifications
You must be signed in to change notification settings - Fork 6
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 catalog-info for backstage #137
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a0ca2c0
rebased
633283f
added a catalog info and openapi schema
3be91b2
renamed rest -> service as files have changed location
680ae4a
removed outdated test_rest_api.py file
3893419
modified catalog-info to include asyncapi, and made openapi.py output…
1006360
removed catalog-info.yaml from pre commit checks to pass linting
8bee114
added CI job to automatically run openapi.py script to generate opena…
4f16943
changed name of CI job for openapi
ae4556a
added test for openapi.py
f17ef50
added openapi schema in docs
6472311
using sphinxcontrib.openapi to autogenerate open api documentation
9c035fb
added dependency to pyproject.toml
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Openapi | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
# Run weekly to check latest versions of dependencies | ||
- cron: "0 8 * * WED" | ||
env: | ||
# The target python version, which must match the Dockerfile version | ||
CONTAINER_PYTHON: "3.11" | ||
|
||
jobs: | ||
publish: | ||
# pull requests are a duplicate of a branch push if within the same repo. | ||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install python packages | ||
uses: ./.github/actions/install_requirements | ||
with: | ||
requirements_file: requirements-dev-3.x.txt | ||
install_options: -e .[dev] | ||
|
||
- name: generate openapi schema | ||
run: python src/blueapi/service/openapi.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Component | ||
metadata: | ||
name: bluesky-worker | ||
title: bluesky-worker | ||
description: Lightweight wrapper around bluesky services | ||
annotations: | ||
github.com/project-slug: DiamondLightSouce/blueapi | ||
spec: | ||
type: service | ||
lifecycle: production | ||
owner: user:vid18871 # TODO: owner: DAQ-Core | ||
# system: Athena # TODO: Define Athena system: presumably same location as DAQ-Core/DAQ? | ||
providesApis: | ||
- message-topics | ||
- restapi | ||
- blueskydocument-to-scanmessage | ||
--- | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: API | ||
metadata: | ||
name: restapi | ||
title: restapi | ||
description: REST API for getting plans/devices from the worker (and running tasks) | ||
spec: | ||
type: openapi | ||
lifecycle: production | ||
owner: user:vid18871 | ||
definition: | ||
$text: ./docs/user/reference/openapi.json | ||
--- | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: API | ||
metadata: | ||
name: message-topics | ||
title: message-topics | ||
description: Message topics which can be listened to over an activeMQ message bus | ||
spec: | ||
type: asyncapi | ||
lifecycle: production | ||
owner: user:vid18871 | ||
definition: | ||
$text: ./docs/user/reference/asyncapi.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ side-bar. | |
|
||
reference/api | ||
reference/asyncapi | ||
reference/openapi | ||
../genindex | ||
|
||
+++ | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 the ugliness of this (since it's not actually emitting ScanMessages, and ScanMessages are defined elsewhere, and this whole provided API is defined elsewhere) is reason enough to say: now is the time to do #167 and fold it into this change.
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 would prefer to address that in a separate change that also includes updating the AsyncAPI definition to reflect that some of it's functionality is now repaced by the REST API. That will allow us to close this ticket and its associated Jira one and schedule the cleanup activity for next sprint.