Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

v2 fixes pyproject.toml #141

Merged
merged 5 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,6 @@ public void processOpts() {
if (!generateSourceCodeOnly) {
supportingFiles.add(new SupportingFile("tox.hbs", "", "tox.ini"));
supportingFiles.add(new SupportingFile("test-requirements.hbs", "", "test-requirements.txt"));
supportingFiles.add(new SupportingFile("requirements.hbs", "", "requirements.txt"));

supportingFiles.add(new SupportingFile("git_push.hbs", "", "git_push.sh"));
supportingFiles.add(new SupportingFile("gitignore.hbs", "", ".gitignore"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
{{#if tornado}}
{{#if quoted}}"{{/if}}tornado >= 4.2{{#if quoted}}",{{/if}}
{{/if}}
{{#if quoted}}"{{/if}}typing_extensions ~= 4.3.0{{#if quoted}}",{{/if}}
{{#if quoted}}"{{/if}}typing_extensions ~= 4.5.0{{#if quoted}}",{{/if}}
{{#if quoted}}"{{/if}}urllib3 ~= 2.0.a3{{#if quoted}}",{{/if}}
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator

[build-system]
requires = [
{{> _helper_required_libraries quoted=true }}
]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "{{{projectName}}}"
version = "{{packageVersion}}"
{{#with apiInfo}}
authors = [
{ name="{{#if infoName}}{{infoName}}{{else}}OpenAPI JSON Schema Generator community{{/if}}"{{#if infoEmail}}, email="{{infoEmail}}"{{/if}} },
]
description = "{{appName}}"
readme = "README.md"
requires-python = "{{{generatorLanguageVersion}}}"
dependencies = [
{{> _helper_required_libraries quoted=true }}
]
classifiers = [
"Programming Language :: Python :: 3",
{{#if licenseInfo}}"License :: {{licenseInfo}}",{{/if}}
Expand All @@ -28,4 +28,3 @@ classifiers = [
{{#if packageUrl}}"Homepage" = "{{{packageUrl}}}"{{/if}}
{{#if infoUrl}}"Bug Tracker" = "{{{infoUrl}}}"{{/if}}
{{/or}}
{{/with}}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ nose>=1.3.7
pluggy>=0.3.1
py>=1.4.31
randomize>=0.13
{{else}}
pytest ~= 7.2.0
pytest-cov ~= 4.0.0
{{/if}}
{{#unless useNose}}
pytest~=4.6.7 # needed for python 3.4
pytest-cov>=2.8.1
pytest-randomly==1.2.3 # needed for python 3.4
{{/unless}}
{{#if hasHttpSignatureSecurityScheme}}
pycryptodome>=3.9.0
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tox]
envlist = py37
isolated_build = True

[testenv]
passenv = PYTHON_VERSION
deps=-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
deps=-r{toxinidir}/test-requirements.txt

commands=
{{#unless useNose}}pytest --cov={{{packageName}}}{{/unless}}{{#if useNose}}nosetests{{/if}}
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,6 @@ git_push.sh
migration_2_0_0.md
migration_other_python_generators.md
pyproject.toml
requirements.txt
src/unit_test_api/__init__.py
src/unit_test_api/api_client.py
src/unit_test_api/apis/__init__.py
Expand Down

This file was deleted.

26 changes: 20 additions & 6 deletions samples/openapi3/client/3_0_3_unit_test/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
# Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator

[build-system]
requires = [
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "unit-test-api"
version = "1.0.0"
authors = [
{ name="OpenAPI JSON Schema Generator community" },
]
description = "openapi 3.0.3 sample spec"
readme = "README.md"
requires-python = ">=3.7"
dependencies = [
"certifi >= 14.5.14",
"frozendict ~= 2.3.4",
"python-dateutil ~= 2.7.0",
"setuptools >= 61.0",
"typing_extensions ~= 4.3.0",
"typing_extensions ~= 4.5.0",
"urllib3 ~= 2.0.a3",
]
build-backend = "setuptools.build_meta"
classifiers = [
"Programming Language :: Python :: 3",

"Operating System :: OS Independent",
"Topic :: Software Development :: Code Generators"
]

[project]
name = "unit-test-api"
version = "1.0.0"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pytest~=4.6.7 # needed for python 3.4
pytest-cov>=2.8.1
pytest-randomly==1.2.3 # needed for python 3.4
pytest ~= 7.2.0
pytest-cov ~= 4.0.0
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

REQUIREMENTS_FILE=dev-requirements.txt
REQUIREMENTS_OUT=dev-requirements.txt.log
SETUP_OUT=*.egg-info
VENV=venv
DEACTIVE=false
Expand All @@ -17,7 +15,7 @@ if [ -z "$VENVV" ]; then
fi

### install dependencies
pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
pip install tox
### locally install the package, needed for pycharm problem checking
python -m pip install .

Expand Down
4 changes: 2 additions & 2 deletions samples/openapi3/client/3_0_3_unit_test/python/tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tox]
envlist = py37
isolated_build = True

[testenv]
passenv = PYTHON_VERSION
deps=-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
deps=-r{toxinidir}/test-requirements.txt

commands=
pytest --cov=unit_test_api
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ git_push.sh
migration_2_0_0.md
migration_other_python_generators.md
pyproject.toml
requirements.txt
src/this_package/__init__.py
src/this_package/api_client.py
src/this_package/apis/__init__.py
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
# Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator

[build-system]
requires = [
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "this-package"
version = "1.0.0"
authors = [
{ name="OpenAPI JSON Schema Generator community" },
]
description = "discriminator-test"
readme = "README.md"
requires-python = ">=3.7"
dependencies = [
"certifi >= 14.5.14",
"frozendict ~= 2.3.4",
"python-dateutil ~= 2.7.0",
"setuptools >= 61.0",
"typing_extensions ~= 4.3.0",
"typing_extensions ~= 4.5.0",
"urllib3 ~= 2.0.a3",
]
build-backend = "setuptools.build_meta"
classifiers = [
"Programming Language :: Python :: 3",

"Operating System :: OS Independent",
"Topic :: Software Development :: Code Generators"
]

[project]
name = "this-package"
version = "1.0.0"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pytest~=4.6.7 # needed for python 3.4
pytest-cov>=2.8.1
pytest-randomly==1.2.3 # needed for python 3.4
pytest ~= 7.2.0
pytest-cov ~= 4.0.0
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

REQUIREMENTS_FILE=dev-requirements.txt
REQUIREMENTS_OUT=dev-requirements.txt.log
SETUP_OUT=*.egg-info
VENV=venv
DEACTIVE=false
Expand All @@ -17,7 +15,7 @@ if [ -z "$VENVV" ]; then
fi

### install dependencies
pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
pip install tox
### locally install the package, needed for pycharm problem checking
python -m pip install .

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tox]
envlist = py37
isolated_build = True

[testenv]
passenv = PYTHON_VERSION
deps=-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
deps=-r{toxinidir}/test-requirements.txt

commands=
pytest --cov=this_package
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ git_push.sh
migration_2_0_0.md
migration_other_python_generators.md
pyproject.toml
requirements.txt
src/this_package/__init__.py
src/this_package/api_client.py
src/this_package/apis/__init__.py
Expand Down

This file was deleted.

26 changes: 20 additions & 6 deletions samples/openapi3/client/features/security/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
# Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator

[build-system]
requires = [
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "this-package"
version = "1.0.0"
authors = [
{ name="OpenAPI JSON Schema Generator community" },
]
description = "security-test"
readme = "README.md"
requires-python = ">=3.7"
dependencies = [
"certifi >= 14.5.14",
"frozendict ~= 2.3.4",
"python-dateutil ~= 2.7.0",
"setuptools >= 61.0",
"typing_extensions ~= 4.3.0",
"typing_extensions ~= 4.5.0",
"urllib3 ~= 2.0.a3",
]
build-backend = "setuptools.build_meta"
classifiers = [
"Programming Language :: Python :: 3",

"Operating System :: OS Independent",
"Topic :: Software Development :: Code Generators"
]

[project]
name = "this-package"
version = "1.0.0"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pytest~=4.6.7 # needed for python 3.4
pytest-cov>=2.8.1
pytest-randomly==1.2.3 # needed for python 3.4
pytest ~= 7.2.0
pytest-cov ~= 4.0.0
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

REQUIREMENTS_FILE=dev-requirements.txt
REQUIREMENTS_OUT=dev-requirements.txt.log
SETUP_OUT=*.egg-info
VENV=venv
DEACTIVE=false
Expand All @@ -17,7 +15,7 @@ if [ -z "$VENVV" ]; then
fi

### install dependencies
pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
pip install tox
### locally install the package, needed for pycharm problem checking
python -m pip install .

Expand Down
4 changes: 2 additions & 2 deletions samples/openapi3/client/features/security/python/tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tox]
envlist = py37
isolated_build = True

[testenv]
passenv = PYTHON_VERSION
deps=-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
deps=-r{toxinidir}/test-requirements.txt

commands=
pytest --cov=this_package
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ git_push.sh
migration_2_0_0.md
migration_other_python_generators.md
pyproject.toml
requirements.txt
src/petstore_api/__init__.py
src/petstore_api/api_client.py
src/petstore_api/apis/__init__.py
Expand Down
2 changes: 0 additions & 2 deletions samples/openapi3/client/petstore/python/dev-requirements.txt

This file was deleted.

Loading