-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch Python client backend to use REST (#152)
* py: add generated REST backend Signed-off-by: Isabella do Amaral <idoamara@redhat.com> * py: initial generated code Signed-off-by: Isabella do Amaral <idoamara@redhat.com> * py: remove gRPC backend Signed-off-by: Isabella do Amaral <idoamara@redhat.com> * py: rename exceptions Signed-off-by: Isabella do Amaral <idoamara@redhat.com> * py: wrap generated types Signed-off-by: Isabella do Amaral <idoamara@redhat.com> * py: core: wrap async client with ctx manager Signed-off-by: Isabella do Amaral <idoamara@redhat.com> * py: client: wrap async core with sync client Signed-off-by: Isabella do Amaral <idoamara@redhat.com> * GHA: update python constraints Signed-off-by: Isabella do Amaral <idoamara@redhat.com> * py: setup mypy Signed-off-by: Isabella do Amaral <idoamara@redhat.com> --------- Signed-off-by: Isabella do Amaral <idoamara@redhat.com>
- Loading branch information
Showing
208 changed files
with
26,949 additions
and
2,422 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
pip==23.3.1 | ||
nox==2023.04.22 | ||
nox-poetry==1.0.2 | ||
poetry==1.6.1 | ||
pip==23.3.2 | ||
nox==2023.4.22 | ||
nox-poetry==1.0.3 | ||
poetry==1.8.3 | ||
poetry-plugin-export==1.8.0 | ||
virtualenv==20.24.6 |
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,36 @@ | ||
.PHONY: install | ||
install: | ||
../../bin/openapi-generator-cli generate -i ../../api/openapi/model-registry.yaml -g python -o src/ --package-name mr_openapi --additional-properties=library=asyncio,generateSourceCodeOnly=true,useOneOfDiscriminatorLookup=true | ||
mv src/mr_openapi{_,/}README.md | ||
git apply patches/* | ||
poetry install | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf src/mr_openapi | ||
|
||
.PHONY: test | ||
test: | ||
poetry run pytest -s | ||
|
||
.PHONY: lint-check | ||
lint-check: | ||
poetry run ruff check | ||
poetry run black src/mr_openapi --check | ||
|
||
.PHONY: lint-apply | ||
lint-apply: | ||
poetry run ruff check --fix --unsafe-fixes || true | ||
poetry run black src/mr_openapi | ||
|
||
.PHONY: build | ||
build: install lint-apply | ||
poetry build | ||
|
||
.PHONY: publish | ||
publish: install | ||
poetry publish --build -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} | ||
|
||
.PHONY: update | ||
update: | ||
poetry lock |
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
Oops, something went wrong.