From 2fd4a077ec4a550b733513f2eac30b6e0d120b98 Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Fri, 8 Nov 2024 15:43:19 +0000 Subject: [PATCH 1/7] Adjusts readme --- .../generate-sdk/.openapi-generator-ignore | 2 +- templates/python/README.mustache | 40 ++++--------------- templates/python/pyproject.mustache | 2 +- 3 files changed, 9 insertions(+), 35 deletions(-) diff --git a/scripts/generate-sdk/.openapi-generator-ignore b/scripts/generate-sdk/.openapi-generator-ignore index a1491ee..81b4e04 100644 --- a/scripts/generate-sdk/.openapi-generator-ignore +++ b/scripts/generate-sdk/.openapi-generator-ignore @@ -2,7 +2,7 @@ git_push.sh .travis.yml .gitignore #utils.go -README.md +#README.md response.go api/openapi.yaml .openapi-generator/* diff --git a/templates/python/README.mustache b/templates/python/README.mustache index bceb88f..7a8b929 100644 --- a/templates/python/README.mustache +++ b/templates/python/README.mustache @@ -3,58 +3,32 @@ {{{.}}} {{/appDescriptionWithNewLines}} -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: {{appVersion}} -- Package version: {{packageVersion}} -{{^hideGenerationTimestamp}} -- Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} -- Generator version: {{generatorVersion}} -- Build package: {{generatorClass}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) {{/infoUrl}} -## Requirements. +This package is part of the STACKIT Python SDK. For more detailed information please visit the [github repository](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}) of the SDK. -Python {{{generatorLanguageVersion}}} -## Installation & Usage +## Installation and Usage ### pip install -If the python package is hosted on a repository, you can install directly using: - ```sh -pip install git+https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}.git +pip install {{{pythonPackageName}}} ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}.git`) Then import the package: ```python import {{{packageName}}} ``` -### Setuptools +## Getting Started -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). +[Examples](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}/tree/main/examples) for the usage of the package can be found in the [github repository](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}) of the SDK. -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) +Please follow the [installation procedure](#installation-and-usage) and then run the following: -Then import the package: -```python -import {{{packageName}}} -``` - -### Tests - -Execute `pytest` to run the tests. +{{> common_README }} -## Getting Started -Please follow the [installation procedure](#installation--usage) and then run the following: -{{> common_README }} diff --git a/templates/python/pyproject.mustache b/templates/python/pyproject.mustache index 511ba58..0fb1225 100644 --- a/templates/python/pyproject.mustache +++ b/templates/python/pyproject.mustache @@ -5,7 +5,7 @@ authors = [ "{{infoName}}{{^infoName}}OpenAPI Generator Community{{/infoName}} <{{infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}>", ] description = "{{{appName}}}" -#readme = "README.md" +readme = "README.md" #license = "{{{licenseInfo}}}{{^licenseInfo}}NoLicense{{/licenseInfo}}" classifiers = [ "Programming Language :: Python :: 3", From 64f35c5604e5d8e1005aa60cfd303c32edcde4f5 Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Mon, 11 Nov 2024 07:46:50 +0000 Subject: [PATCH 2/7] adjusmtent --- scripts/generate-sdk/languages/python.sh | 2 +- templates/python/README.mustache | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/generate-sdk/languages/python.sh b/scripts/generate-sdk/languages/python.sh index fd0bbed..3b09a4d 100644 --- a/scripts/generate-sdk/languages/python.sh +++ b/scripts/generate-sdk/languages/python.sh @@ -105,7 +105,7 @@ generate_python_sdk() { --git-host ${GIT_HOST} \ --git-user-id ${GIT_USER_ID} \ --git-repo-id ${GIT_REPO_ID} \ - --global-property apis,models,modelTests=false,modelDocs=false,apiDocs=false,apiTests=false,supportingFiles \ + --global-property apis,models,modelTests=false,modelDocs=true,apiDocs=true,apiTests=false,supportingFiles \ --additional-properties=pythonPackageName="stackit-${service},removeEnumValuePrefix=false" >/dev/null # Remove unnecessary files diff --git a/templates/python/README.mustache b/templates/python/README.mustache index 7a8b929..0b98358 100644 --- a/templates/python/README.mustache +++ b/templates/python/README.mustache @@ -28,7 +28,4 @@ import {{{packageName}}} Please follow the [installation procedure](#installation-and-usage) and then run the following: -{{> common_README }} - - - +{{> common_README }} \ No newline at end of file From cfcd5c65a58769f36ecbc7aa41e43fd8d10bc4c7 Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 12 Nov 2024 08:00:24 +0000 Subject: [PATCH 3/7] adjust readme template --- templates/python/README.mustache | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/templates/python/README.mustache b/templates/python/README.mustache index 0b98358..a825096 100644 --- a/templates/python/README.mustache +++ b/templates/python/README.mustache @@ -7,7 +7,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) {{/infoUrl}} -This package is part of the STACKIT Python SDK. For more detailed information please visit the [github repository](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}) of the SDK. +This package is part of the STACKIT Python SDK. For additional information please visit the [github repository](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}) of the SDK. ## Installation and Usage @@ -24,8 +24,4 @@ import {{{packageName}}} ## Getting Started -[Examples](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}/tree/main/examples) for the usage of the package can be found in the [github repository](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}) of the SDK. - -Please follow the [installation procedure](#installation-and-usage) and then run the following: - -{{> common_README }} \ No newline at end of file +[Examples](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}/tree/main/examples) for the usage of the package can be found in the [github repository](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}) of the SDK. \ No newline at end of file From adcd643e0e0d6cb35e25c03b51a36b8695edbc3d Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 12 Nov 2024 08:45:31 +0000 Subject: [PATCH 4/7] adjustment --- scripts/generate-sdk/languages/python.sh | 2 +- templates/python/README.mustache | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/generate-sdk/languages/python.sh b/scripts/generate-sdk/languages/python.sh index 3b09a4d..fd0bbed 100644 --- a/scripts/generate-sdk/languages/python.sh +++ b/scripts/generate-sdk/languages/python.sh @@ -105,7 +105,7 @@ generate_python_sdk() { --git-host ${GIT_HOST} \ --git-user-id ${GIT_USER_ID} \ --git-repo-id ${GIT_REPO_ID} \ - --global-property apis,models,modelTests=false,modelDocs=true,apiDocs=true,apiTests=false,supportingFiles \ + --global-property apis,models,modelTests=false,modelDocs=false,apiDocs=false,apiTests=false,supportingFiles \ --additional-properties=pythonPackageName="stackit-${service},removeEnumValuePrefix=false" >/dev/null # Remove unnecessary files diff --git a/templates/python/README.mustache b/templates/python/README.mustache index a825096..39fe9b9 100644 --- a/templates/python/README.mustache +++ b/templates/python/README.mustache @@ -10,7 +10,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) This package is part of the STACKIT Python SDK. For additional information please visit the [github repository](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}) of the SDK. -## Installation and Usage +## Installation & Usage ### pip install ```sh From 9efa46db48ff9acf3c97310be58bcb2bdf975de8 Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 12 Nov 2024 10:05:09 +0000 Subject: [PATCH 5/7] ignore split --- ...generator-ignore => .openapi-generator-ignore-go} | 2 +- .../generate-sdk/.openapi-generator-ignore-python | 12 ++++++++++++ scripts/generate-sdk/languages/go.sh | 2 +- scripts/generate-sdk/languages/python.sh | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) rename scripts/generate-sdk/{.openapi-generator-ignore => .openapi-generator-ignore-go} (94%) create mode 100644 scripts/generate-sdk/.openapi-generator-ignore-python diff --git a/scripts/generate-sdk/.openapi-generator-ignore b/scripts/generate-sdk/.openapi-generator-ignore-go similarity index 94% rename from scripts/generate-sdk/.openapi-generator-ignore rename to scripts/generate-sdk/.openapi-generator-ignore-go index 81b4e04..a1491ee 100644 --- a/scripts/generate-sdk/.openapi-generator-ignore +++ b/scripts/generate-sdk/.openapi-generator-ignore-go @@ -2,7 +2,7 @@ git_push.sh .travis.yml .gitignore #utils.go -#README.md +README.md response.go api/openapi.yaml .openapi-generator/* diff --git a/scripts/generate-sdk/.openapi-generator-ignore-python b/scripts/generate-sdk/.openapi-generator-ignore-python new file mode 100644 index 0000000..b30aa09 --- /dev/null +++ b/scripts/generate-sdk/.openapi-generator-ignore-python @@ -0,0 +1,12 @@ +git_push.sh +.travis.yml +.gitignore +api/openapi.yaml +.openapi-generator/* +.gitlab-ci.yml +setup.cfg +setup.py +test-requirements.txt +requirements.txt +tox.ini +*/.github/* \ No newline at end of file diff --git a/scripts/generate-sdk/languages/go.sh b/scripts/generate-sdk/languages/go.sh index c6fe8f1..cd8e08d 100644 --- a/scripts/generate-sdk/languages/go.sh +++ b/scripts/generate-sdk/languages/go.sh @@ -133,7 +133,7 @@ generate_go_sdk() { GO_POST_PROCESS_FILE="gofmt -w" \ mkdir -p ${SERVICES_FOLDER}/${service}/ - cp ${ROOT_DIR}/scripts/generate-sdk/.openapi-generator-ignore ${SERVICES_FOLDER}/${service}/ + cp ${ROOT_DIR}/scripts/generate-sdk/.openapi-generator-ignore-go ${SERVICES_FOLDER}/${service}/.openapi-generator-ignore # Run the generator for Go java -Dlog.level=${GENERATOR_LOG_LEVEL} -jar ${jar_path} generate \ diff --git a/scripts/generate-sdk/languages/python.sh b/scripts/generate-sdk/languages/python.sh index fd0bbed..c4737b4 100644 --- a/scripts/generate-sdk/languages/python.sh +++ b/scripts/generate-sdk/languages/python.sh @@ -93,7 +93,7 @@ generate_python_sdk() { cd ${ROOT_DIR} mkdir -p "${SERVICES_FOLDER}/${service}/" - cp "${ROOT_DIR}/scripts/generate-sdk/.openapi-generator-ignore" "${SERVICES_FOLDER}/${service}/" + cp "${ROOT_DIR}/scripts/generate-sdk/.openapi-generator-ignore-python" "${SERVICES_FOLDER}/${service}/.openapi-generator-ignore" # Run the generator java -Dlog.level=${GENERATOR_LOG_LEVEL} -jar ${jar_path} generate \ From 417953dc48118ac70a6ab049e85d3c0ac0d55114 Mon Sep 17 00:00:00 2001 From: Melvin <70433111+MelvinKl@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:06:25 +0100 Subject: [PATCH 6/7] Update templates/python/README.mustache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: João Palet --- templates/python/README.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/python/README.mustache b/templates/python/README.mustache index 39fe9b9..d4579e7 100644 --- a/templates/python/README.mustache +++ b/templates/python/README.mustache @@ -24,4 +24,4 @@ import {{{packageName}}} ## Getting Started -[Examples](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}/tree/main/examples) for the usage of the package can be found in the [github repository](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}) of the SDK. \ No newline at end of file +[Examples](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}/tree/main/examples) for the usage of the package can be found in the [GitHub repository](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}) of the SDK. \ No newline at end of file From 35a9688bb920b695527d782cca328e02b1db2247 Mon Sep 17 00:00:00 2001 From: Melvin <70433111+MelvinKl@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:08:05 +0100 Subject: [PATCH 7/7] Update templates/python/README.mustache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: João Palet --- templates/python/README.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/python/README.mustache b/templates/python/README.mustache index d4579e7..699b70f 100644 --- a/templates/python/README.mustache +++ b/templates/python/README.mustache @@ -7,7 +7,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) {{/infoUrl}} -This package is part of the STACKIT Python SDK. For additional information please visit the [github repository](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}) of the SDK. +This package is part of the STACKIT Python SDK. For additional information, please visit the [GitHub repository](https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}) of the SDK. ## Installation & Usage