-
Notifications
You must be signed in to change notification settings - Fork 0
P3.1: generate Python SDK prerelease #1
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "contract": "corelink-public-v1.yaml", | ||
| "contractVersion": "1.0.0-draft", | ||
| "sourceRepository": "CoreLinkPlatform/api-contracts", | ||
| "sourceBranch": "agent/p3-1-contracts", | ||
| "sourceCommit": "2fb0dc8", | ||
| "generator": "openapi-generator-cli", | ||
| "generatorVersion": "7.12.0", | ||
| "generatorName": "python" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # Byte-compiled / optimized / DLL files | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
|
|
||
| # C extensions | ||
| *.so | ||
|
|
||
| # Distribution / packaging | ||
| .Python | ||
| env/ | ||
| build/ | ||
| develop-eggs/ | ||
| dist/ | ||
| downloads/ | ||
| eggs/ | ||
| .eggs/ | ||
| lib/ | ||
| lib64/ | ||
| parts/ | ||
| sdist/ | ||
| var/ | ||
| *.egg-info/ | ||
| .installed.cfg | ||
| *.egg | ||
|
|
||
| # PyInstaller | ||
| # Usually these files are written by a python script from a template | ||
| # before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
| *.manifest | ||
| *.spec | ||
|
|
||
| # Installer logs | ||
| pip-log.txt | ||
| pip-delete-this-directory.txt | ||
|
|
||
| # Unit test / coverage reports | ||
| htmlcov/ | ||
| .tox/ | ||
| .coverage | ||
| .coverage.* | ||
| .cache | ||
| nosetests.xml | ||
| coverage.xml | ||
| *,cover | ||
| .hypothesis/ | ||
| venv/ | ||
| .venv/ | ||
| .python-version | ||
| .pytest_cache | ||
|
|
||
| # Translations | ||
| *.mo | ||
| *.pot | ||
|
|
||
| # Django stuff: | ||
| *.log | ||
|
|
||
| # Sphinx documentation | ||
| docs/_build/ | ||
|
|
||
| # PyBuilder | ||
| target/ | ||
|
|
||
| #Ipython Notebook | ||
| .ipynb_checkpoints |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # OpenAPI Generator Ignore | ||
| # Generated by openapi-generator https://github.com/openapitools/openapi-generator | ||
|
|
||
| # Use this file to prevent files from being overwritten by the generator. | ||
| # The patterns follow closely to .gitignore or .dockerignore. | ||
|
|
||
| # As an example, the C# client generator defines ApiClient.cs. | ||
| # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: | ||
| #ApiClient.cs | ||
|
|
||
| # You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
| #foo/*/qux | ||
| # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
|
||
| # You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
| #foo/**/qux | ||
| # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
|
||
| # You can also negate patterns with an exclamation (!). | ||
| # For example, you can ignore all files in a docs folder with the file extension .md: | ||
| #docs/*.md | ||
| # Then explicitly reverse the ignore rule for a single file: | ||
| #!docs/README.md |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| .github/workflows/python.yml | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .openapi-generator-ignore | ||
| .travis.yml | ||
| README.md | ||
| corelink_sdk/__init__.py | ||
| corelink_sdk/api/__init__.py | ||
| corelink_sdk/api/commands_api.py | ||
| corelink_sdk/api/default_api.py | ||
| corelink_sdk/api/devices_api.py | ||
| corelink_sdk/api_client.py | ||
| corelink_sdk/api_response.py | ||
| corelink_sdk/configuration.py | ||
| corelink_sdk/exceptions.py | ||
| corelink_sdk/models/__init__.py | ||
| corelink_sdk/models/command.py | ||
| corelink_sdk/models/command_create.py | ||
| corelink_sdk/models/command_page.py | ||
| corelink_sdk/models/command_status.py | ||
| corelink_sdk/models/device.py | ||
| corelink_sdk/models/device_create.py | ||
| corelink_sdk/models/device_page.py | ||
| corelink_sdk/models/device_status.py | ||
| corelink_sdk/models/device_update.py | ||
| corelink_sdk/models/health.py | ||
| corelink_sdk/models/problem.py | ||
| corelink_sdk/py.typed | ||
| corelink_sdk/rest.py | ||
| git_push.sh | ||
| pyproject.toml | ||
| requirements.txt | ||
| setup.cfg | ||
| setup.py | ||
| test-requirements.txt | ||
| test/__init__.py | ||
| test/test_command.py | ||
| test/test_command_create.py | ||
| test/test_command_page.py | ||
| test/test_command_status.py | ||
| test/test_commands_api.py | ||
| test/test_default_api.py | ||
| test/test_device.py | ||
| test/test_device_create.py | ||
| test/test_device_page.py | ||
| test/test_device_status.py | ||
| test/test_device_update.py | ||
| test/test_devices_api.py | ||
| test/test_health.py | ||
| test/test_problem.py | ||
| tox.ini |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 7.12.0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Python SDK generation | ||
|
|
||
| This client is generated from `corelink-public-v1.yaml` with OpenAPI Generator | ||
| `7.12.0`. The authoritative input for this prerelease was contract commit | ||
| `2fb0dc8` on `agent/p3-1-contracts`. | ||
|
|
||
| ```sh | ||
| java -jar openapi-generator-cli-7.12.0.jar generate \ | ||
| -i /path/to/corelink-public-v1.yaml \ | ||
| -g python \ | ||
| -o . \ | ||
| --additional-properties=packageName=corelink_sdk,projectName=corelink-sdk,packageVersion=0.1.0.dev0 \ | ||
| --global-property=apiDocs=false,modelDocs=false | ||
| ``` | ||
|
|
||
| Regenerate in a clean worktree, restore this README and package metadata, then | ||
| run `python -m compileall corelink_sdk`. A release may only use a merged, | ||
| tagged contract commit. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,30 @@ | ||
| # CoreLink Python SDK | ||
|
|
||
| Official Python SDK for CoreLink APIs. | ||
| Generated prerelease client for the CoreLink Public API. It is not published or | ||
| production-supported until its contract and runtime PRs are merged and sandbox | ||
| compatibility tests pass. | ||
|
|
||
| > Status: Planned. This repository does not contain a released package yet. | ||
| ## Contract provenance | ||
|
|
||
| ## Planned capabilities | ||
| - Contract: `corelink-public-v1.yaml`, version `1.0.0-draft` | ||
| - Source branch: `agent/p3-1-contracts` | ||
| - Source commit: `701e693` | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The README attributes this generated SDK to Useful? React with 👍 / 👎. |
||
| - Generator: OpenAPI Generator `7.12.0`, `python` | ||
|
|
||
| - OAuth client credentials | ||
| - Device registry | ||
| - Provisioning | ||
| - Commands | ||
| - Pagination | ||
| - Typed errors | ||
| - Webhook verification | ||
| The SDK exposes canonical CoreLink identifiers only. Connector selection and | ||
| integration-provider identifiers remain server-side concerns. | ||
|
|
||
| ## Documentation | ||
| ## Local verification | ||
|
|
||
| See the [CoreLink developer documentation](https://github.com/CoreLinkPlatform/developer-docs). | ||
| ```sh | ||
| python -m compileall corelink_sdk | ||
| ``` | ||
|
|
||
| ## License | ||
| See [CODEGEN.md](CODEGEN.md) for deterministic regeneration. Generated files | ||
| under `corelink_sdk/` are not hand-maintained. | ||
|
|
||
| License information will be added before the first public release. | ||
| ## Release gate | ||
|
|
||
| Publish only after a merged, tagged contract, sandbox compatibility tests, | ||
| clean generated diff, package build, and release notes that record the exact | ||
| contract commit. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # coding: utf-8 | ||
|
|
||
| # flake8: noqa | ||
|
|
||
| """ | ||
| CoreLink Public API | ||
|
|
||
| Versioned public contract for the proven connected-device slice. Integration details are deliberately excluded. All resource identifiers are canonical CoreLink identifiers. | ||
|
|
||
| The version of the OpenAPI document: 1.0.0-draft | ||
| Generated by OpenAPI Generator (https://openapi-generator.tech) | ||
|
|
||
| Do not edit the class manually. | ||
| """ # noqa: E501 | ||
|
|
||
|
|
||
| __version__ = "0.1.0.dev0" | ||
|
|
||
| # import apis into sdk package | ||
| from corelink_sdk.api.commands_api import CommandsApi | ||
| from corelink_sdk.api.devices_api import DevicesApi | ||
| from corelink_sdk.api.default_api import DefaultApi | ||
|
|
||
| # import ApiClient | ||
| from corelink_sdk.api_response import ApiResponse | ||
| from corelink_sdk.api_client import ApiClient | ||
| from corelink_sdk.configuration import Configuration | ||
| from corelink_sdk.exceptions import OpenApiException | ||
| from corelink_sdk.exceptions import ApiTypeError | ||
| from corelink_sdk.exceptions import ApiValueError | ||
| from corelink_sdk.exceptions import ApiKeyError | ||
| from corelink_sdk.exceptions import ApiAttributeError | ||
| from corelink_sdk.exceptions import ApiException | ||
|
|
||
| # import models into sdk package | ||
| from corelink_sdk.models.command import Command | ||
| from corelink_sdk.models.command_create import CommandCreate | ||
| from corelink_sdk.models.command_page import CommandPage | ||
| from corelink_sdk.models.command_status import CommandStatus | ||
| from corelink_sdk.models.device import Device | ||
| from corelink_sdk.models.device_create import DeviceCreate | ||
| from corelink_sdk.models.device_page import DevicePage | ||
| from corelink_sdk.models.device_status import DeviceStatus | ||
| from corelink_sdk.models.device_update import DeviceUpdate | ||
| from corelink_sdk.models.health import Health | ||
| from corelink_sdk.models.problem import Problem |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # flake8: noqa | ||
|
|
||
| # import apis into api package | ||
| from corelink_sdk.api.commands_api import CommandsApi | ||
| from corelink_sdk.api.devices_api import DevicesApi | ||
| from corelink_sdk.api.default_api import DefaultApi | ||
|
|
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.
Running this documented command in a clean worktree also generates supporting files recorded in
.openapi-generator/FILES, includingsetup.py,setup.cfg,tox.ini, and several CI workflows; a repo-wide path check confirms those files are absent here, and.openapi-generator-ignoredoes not suppress them. Consequently the stated procedure cannot produce a clean generated diff without undocumented manual deletion, undermining deterministic regeneration; constrain the generated supporting files or document the cleanup step.Useful? React with 👍 / 👎.