[python] Update github workflow, use debug instead of warning (#16565)

* update github workflow, use debug instead of warning

* use debug instead of warn
This commit is contained in:
William Cheng 2023-09-12 16:55:53 +08:00 committed by GitHub
parent 70543126f2
commit a5f79a7bdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 41 additions and 13 deletions

View File

@ -2747,14 +2747,14 @@ public class DefaultCodegen implements CodegenConfig {
if (composed.getAnyOf() != null) { if (composed.getAnyOf() != null) {
if (m.anyOf.contains(languageType)) { if (m.anyOf.contains(languageType)) {
LOGGER.warn("{} (anyOf schema) already has `{}` defined and therefore it's skipped.", m.name, languageType); LOGGER.debug("{} (anyOf schema) already has `{}` defined and therefore it's skipped.", m.name, languageType);
} else { } else {
m.anyOf.add(languageType); m.anyOf.add(languageType);
} }
} else if (composed.getOneOf() != null) { } else if (composed.getOneOf() != null) {
if (m.oneOf.contains(languageType)) { if (m.oneOf.contains(languageType)) {
LOGGER.warn("{} (oneOf schema) already has `{}` defined and therefore it's skipped.", m.name, languageType); LOGGER.debug("{} (oneOf schema) already has `{}` defined and therefore it's skipped.", m.name, languageType);
} else { } else {
m.oneOf.add(languageType); m.oneOf.add(languageType);
} }

View File

@ -529,7 +529,7 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
} }
example += ")"; example += ")";
} else { } else {
LOGGER.warn("Type {} not handled properly in toExampleValue", schema.getType()); LOGGER.debug("Type {} not handled properly in toExampleValue", schema.getType());
} }
if (ModelUtils.isStringSchema(schema)) { if (ModelUtils.isStringSchema(schema)) {
@ -591,7 +591,7 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
// type is a model class, e.g. User // type is a model class, e.g. User
example = this.packageName + "." + type + "()"; example = this.packageName + "." + type + "()";
} else { } else {
LOGGER.warn("Type {} not handled properly in setParameterExampleValue", type); LOGGER.debug("Type {} not handled properly in setParameterExampleValue", type);
} }
if (example == null) { if (example == null) {

View File

@ -27,6 +27,7 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install flake8 pytest pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
- name: Lint with flake8 - name: Lint with flake8
run: | run: |
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names

View File

@ -23,3 +23,9 @@ pytest-3.8:
pytest-3.9: pytest-3.9:
extends: .pytest extends: .pytest
image: python:3.9-alpine image: python:3.9-alpine
pytest-3.10:
extends: .pytest
image: python:3.10-alpine
pytest-3.11:
extends: .pytest
image: python:3.11-alpine

View File

@ -6,3 +6,6 @@ aenum >= 3.1.11
{{#asyncio}} {{#asyncio}}
aiohttp >= 3.0.0 aiohttp >= 3.0.0
{{/asyncio}} {{/asyncio}}
{{#hasHttpSignatureMethods}}
pycryptodome >= 3.9.0
{{/hasHttpSignatureMethods}}

View File

@ -1,6 +1,3 @@
pytest~=7.1.3 pytest~=7.1.3
pytest-cov>=2.8.1 pytest-cov>=2.8.1
pytest-randomly>=3.12.0 pytest-randomly>=3.12.0
{{#hasHttpSignatureMethods}}
pycryptodome>=3.9.0
{{/hasHttpSignatureMethods}}

View File

@ -26,6 +26,7 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install flake8 pytest pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
- name: Lint with flake8 - name: Lint with flake8
run: | run: |
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names

View File

@ -23,3 +23,9 @@ pytest-3.8:
pytest-3.9: pytest-3.9:
extends: .pytest extends: .pytest
image: python:3.9-alpine image: python:3.9-alpine
pytest-3.10:
extends: .pytest
image: python:3.10-alpine
pytest-3.11:
extends: .pytest
image: python:3.11-alpine

View File

@ -26,6 +26,7 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install flake8 pytest pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
- name: Lint with flake8 - name: Lint with flake8
run: | run: |
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names

View File

@ -23,3 +23,9 @@ pytest-3.8:
pytest-3.9: pytest-3.9:
extends: .pytest extends: .pytest
image: python:3.9-alpine image: python:3.9-alpine
pytest-3.10:
extends: .pytest
image: python:3.10-alpine
pytest-3.11:
extends: .pytest
image: python:3.11-alpine

View File

@ -4,3 +4,4 @@ urllib3 >= 1.25.3, < 2.1.0
pydantic >= 1.10.5, < 2 pydantic >= 1.10.5, < 2
aenum >= 3.1.11 aenum >= 3.1.11
aiohttp >= 3.0.0 aiohttp >= 3.0.0
pycryptodome >= 3.9.0

View File

@ -1,4 +1,3 @@
pytest~=7.1.3 pytest~=7.1.3
pytest-cov>=2.8.1 pytest-cov>=2.8.1
pytest-randomly>=3.12.0 pytest-randomly>=3.12.0
pycryptodome>=3.9.0

View File

@ -26,6 +26,7 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install flake8 pytest pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
- name: Lint with flake8 - name: Lint with flake8
run: | run: |
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names

View File

@ -23,3 +23,9 @@ pytest-3.8:
pytest-3.9: pytest-3.9:
extends: .pytest extends: .pytest
image: python:3.9-alpine image: python:3.9-alpine
pytest-3.10:
extends: .pytest
image: python:3.10-alpine
pytest-3.11:
extends: .pytest
image: python:3.11-alpine

View File

@ -3,3 +3,4 @@ setuptools >= 21.0.0
urllib3 >= 1.25.3, < 2.1.0 urllib3 >= 1.25.3, < 2.1.0
pydantic >= 1.10.5, < 2 pydantic >= 1.10.5, < 2
aenum >= 3.1.11 aenum >= 3.1.11
pycryptodome >= 3.9.0

View File

@ -1,4 +1,3 @@
pytest~=7.1.3 pytest~=7.1.3
pytest-cov>=2.8.1 pytest-cov>=2.8.1
pytest-randomly>=3.12.0 pytest-randomly>=3.12.0
pycryptodome>=3.9.0