mirror of
https://github.com/logos-storage/logos-storage-py-api-client.git
synced 2026-01-02 13:33:11 +00:00
chore: tweaks
This commit is contained in:
parent
eed5ea7a59
commit
b2e6180ed1
7
.github/workflows/generate.yml
vendored
7
.github/workflows/generate.yml
vendored
@ -6,7 +6,7 @@ permissions:
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
types: [generate]
|
types: [generate, release]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
openapi_url:
|
openapi_url:
|
||||||
@ -25,6 +25,10 @@ jobs:
|
|||||||
echo "Error: 'openapi_url' is missing in client_payload."
|
echo "Error: 'openapi_url' is missing in client_payload."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if [ "${{ github.event.action }}" == "release" ] && [ -z "${{ github.event.client_payload.version }}" ]; then
|
||||||
|
echo "Error: We are supposed to release, but 'version' is missing in client_payload."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "OPENAPI_URL=${{ github.event.client_payload.openapi_url }}" >> $GITHUB_ENV
|
echo "OPENAPI_URL=${{ github.event.client_payload.openapi_url }}" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
@ -56,5 +60,6 @@ jobs:
|
|||||||
branch: generator
|
branch: generator
|
||||||
delete-branch: 'true'
|
delete-branch: 'true'
|
||||||
title: 'Generated API update'
|
title: 'Generated API update'
|
||||||
|
body: 'Update of the client library using OpenAPI from: ${{ env.OPENAPI_URL }}'
|
||||||
commit-message: 'Generated API update'
|
commit-message: 'Generated API update'
|
||||||
|
|
||||||
|
|||||||
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
@ -1,5 +1,8 @@
|
|||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
@ -8,12 +11,10 @@ jobs:
|
|||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install OpenAPI Generator
|
- name: Install OpenAPI Generator
|
||||||
run: npm install @openapitools/openapi-generator-cli -g
|
run: npm install @openapitools/openapi-generator-cli -g
|
||||||
@ -35,10 +36,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Push the changes
|
||||||
uses: peter-evans/create-pull-request@v7
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
with:
|
with:
|
||||||
branch: released
|
branch: master
|
||||||
delete-branch: 'true'
|
commit_message: 'Version bump'
|
||||||
title: 'Version update'
|
|
||||||
commit-message: 'Version update after release'
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
.github/workflows/python.yml
|
|
||||||
.gitignore
|
.gitignore
|
||||||
README.md
|
README.md
|
||||||
codex_api_client/__init__.py
|
codex_api_client/__init__.py
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
# Codex API Client
|
# codex-api-client
|
||||||
List of endpoints and interfaces available to Codex API users
|
List of endpoints and interfaces available to Codex API users
|
||||||
|
|
||||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 0.0.1
|
- API version: 0.0.1
|
||||||
- Package version: 0.0.1
|
- Package version: 0.1.0
|
||||||
- Generator version: 7.10.0
|
- Generator version: 7.10.0
|
||||||
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
""" # noqa: E501
|
""" # noqa: E501
|
||||||
|
|
||||||
|
|
||||||
__version__ = "0.0.1"
|
__version__ = "0.1.0"
|
||||||
|
|
||||||
# import apis into sdk package
|
# import apis into sdk package
|
||||||
from codex_api_client.api.data_api import DataApi
|
from codex_api_client.api.data_api import DataApi
|
||||||
|
|||||||
@ -494,7 +494,7 @@ class Configuration:
|
|||||||
"OS: {env}\n"\
|
"OS: {env}\n"\
|
||||||
"Python Version: {pyversion}\n"\
|
"Python Version: {pyversion}\n"\
|
||||||
"Version of the API: 0.0.1\n"\
|
"Version of the API: 0.0.1\n"\
|
||||||
"SDK Package Version: 0.0.1".\
|
"SDK Package Version: 0.1.0".\
|
||||||
format(env=sys.platform, pyversion=sys.version)
|
format(env=sys.platform, pyversion=sys.version)
|
||||||
|
|
||||||
def get_host_settings(self) -> List[HostSetting]:
|
def get_host_settings(self) -> List[HostSetting]:
|
||||||
|
|||||||
@ -10,6 +10,6 @@ openapi-generator-cli generate \
|
|||||||
-t .openapi-generator/templates \
|
-t .openapi-generator/templates \
|
||||||
-g python \
|
-g python \
|
||||||
-i codex.yaml \
|
-i codex.yaml \
|
||||||
--additional-properties="packageName=codex_api_client,projectName=Codex\ API\ Client,packageUrl=https://github.com/codex-storage/py-codex-api-client,packageVersion=$1" \
|
--additional-properties="packageName=codex_api_client,projectName=codex-api-client,packageUrl=https://github.com/codex-storage/py-codex-api-client,packageVersion=$1" \
|
||||||
--git-repo-id py-codex-api-client --git-user-id codex-storage \
|
--git-repo-id py-codex-api-client --git-user-id codex-storage \
|
||||||
--http-user-agent py_codex_api_client
|
--http-user-agent py_codex_api_client
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "codex_api_client"
|
name = "codex_api_client"
|
||||||
version = "0.0.1"
|
version = "0.1.0"
|
||||||
description = "Codex API"
|
description = "Codex API"
|
||||||
authors = ["OpenAPI Generator Community <team@openapitools.org>"]
|
authors = ["OpenAPI Generator Community <team@openapitools.org>"]
|
||||||
license = "NoLicense"
|
license = "NoLicense"
|
||||||
|
|||||||
4
setup.py
4
setup.py
@ -20,8 +20,8 @@ from setuptools import setup, find_packages # noqa: H301
|
|||||||
#
|
#
|
||||||
# prerequisite: setuptools
|
# prerequisite: setuptools
|
||||||
# http://pypi.python.org/pypi/setuptools
|
# http://pypi.python.org/pypi/setuptools
|
||||||
NAME = "Codex API Client"
|
NAME = "codex-api-client"
|
||||||
VERSION = "0.0.1"
|
VERSION = "0.1.0"
|
||||||
PYTHON_REQUIRES = ">= 3.8"
|
PYTHON_REQUIRES = ">= 3.8"
|
||||||
REQUIRES = [
|
REQUIRES = [
|
||||||
"urllib3 >= 1.25.3, < 3.0.0",
|
"urllib3 >= 1.25.3, < 3.0.0",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user