-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
jobby status
command and executor (#54)
* Add status command and executor Also moves the previous only command into its own executor, called `jobby submit` for now. Incorporates the new logs streaming endpoint. Docs and test directories are now included as well, until we decide what to do with them in the automatic regen (next commit). * Add shell script for automatic OpenAPI client regeneration Needs a running FastAPI backend on localhost port 8000. Downloads its OpenAPI spec into a unique temporary file, runs openapi-gen in a docker container on it, and moves the generated client code (and only the source code) into the `client` subpackage. This includes the docs and test directories, which contain autogen'd info that we might not care about.
- Loading branch information
1 parent
8248267
commit ed9c52e
Showing
50 changed files
with
2,504 additions
and
437 deletions.
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
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
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
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,21 @@ | ||
#!/bin/bash -eux | ||
|
||
REPO_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ../.. && pwd )" | ||
fname=openapi-$(date +%s).json | ||
curl -o "$REPO_ROOT/$fname" http://localhost:8000/openapi.json | ||
|
||
docker run --rm \ | ||
-v "$REPO_ROOT":/local \ | ||
openapitools/openapi-generator-cli \ | ||
generate \ | ||
-i /local/"$fname" \ | ||
-g python \ | ||
-o /local/openapi-client \ | ||
--additional-properties=generateSourceCodeOnly=true,packageName=openapi_client | ||
|
||
cp -af "$REPO_ROOT"/openapi-client/openapi_client "$REPO_ROOT"/client/src | ||
|
||
ruff format "$REPO_ROOT"/client/src/openapi_client/ | ||
ruff check --fix --unsafe-fixes "$REPO_ROOT"/client/src/openapi_client/ | ||
rm -rf "$REPO_ROOT"/openapi-client | ||
rm "$REPO_ROOT/$fname" |
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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# flake8: noqa | ||
|
||
# import apis into api package | ||
from openapi_client.api.default_api import DefaultApi | ||
from openapi_client.api.job_management_api import JobManagementApi |
Oops, something went wrong.