Skip to content

Commit

Permalink
Py: get rid of autogen OAI client docs (#197)
Browse files Browse the repository at this point in the history
* py: add black as dev dependency

Necessary for linting

Signed-off-by: Isabella do Amaral <[email protected]>

* py: get rid of autogen OAI client docs

Signed-off-by: Isabella do Amaral <[email protected]>

* OAI: get rid of NextPageToken example

This avoids gitleaks warnings.

Signed-off-by: Isabella do Amaral <[email protected]>

* py: fixup ODH -> Kubeflow

Signed-off-by: Isabella do Amaral <[email protected]>

---------

Signed-off-by: Isabella do Amaral <[email protected]>
  • Loading branch information
isinyaaa authored Jul 18, 2024
1 parent 1d37fa5 commit 3f49945
Show file tree
Hide file tree
Showing 58 changed files with 85 additions and 4,688 deletions.
3 changes: 0 additions & 3 deletions api/openapi/model-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1636,9 +1636,6 @@ components:
in: query
required: false
nextPageToken:
examples:
nextPageToken:
value: IkhlbGxvLCB3b3JsZC4i
name: nextPageToken
description: Token to use to retrieve next page of results.
schema:
Expand Down
15 changes: 9 additions & 6 deletions clients/python/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
all: install tidy

.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
Expand All @@ -13,22 +15,23 @@ clean:
test:
poetry run pytest -s

.PHONY: lint-check
lint-check:
.PHONY: lint
lint:
poetry run ruff check
poetry run black src/mr_openapi --check

.PHONY: lint-apply
lint-apply:
.PHONY: tidy
tidy:
rm -rf src/mr_openapi/docs
poetry run ruff check --fix --unsafe-fixes || true
poetry run black src/mr_openapi

.PHONY: build
build: install lint-apply
build: install tidy
poetry build

.PHONY: publish
publish: install
publish: build
poetry publish --build -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD}

.PHONY: update
Expand Down
75 changes: 74 additions & 1 deletion clients/python/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions clients/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ ruff = "^0.5.2"
mypy = "^1.7.0"
pytest-asyncio = "^0.23.7"
requests = "^2.32.2"
black = "^24.4.2"

[tool.coverage.run]
branch = true
Expand Down
2 changes: 1 addition & 1 deletion clients/python/src/model_registry/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Main package for the ODH model registry."""
"""Main package for the Kubeflow model registry."""

__version__ = "0.2.3a1"

Expand Down
44 changes: 0 additions & 44 deletions clients/python/src/mr_openapi/docs/Artifact.md

This file was deleted.

33 changes: 0 additions & 33 deletions clients/python/src/mr_openapi/docs/ArtifactList.md

This file was deleted.

12 changes: 0 additions & 12 deletions clients/python/src/mr_openapi/docs/ArtifactState.md

This file was deleted.

37 changes: 0 additions & 37 deletions clients/python/src/mr_openapi/docs/BaseArtifact.md

This file was deleted.

34 changes: 0 additions & 34 deletions clients/python/src/mr_openapi/docs/BaseArtifactCreate.md

This file was deleted.

33 changes: 0 additions & 33 deletions clients/python/src/mr_openapi/docs/BaseArtifactUpdate.md

This file was deleted.

36 changes: 0 additions & 36 deletions clients/python/src/mr_openapi/docs/BaseExecution.md

This file was deleted.

Loading

0 comments on commit 3f49945

Please sign in to comment.