diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 1151b4c..471a23b 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3 @@ -24,9 +24,15 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip + pip install flake8 pytest 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: Run unittests + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest run: | - python3 -m unittest + pytest diff --git a/custom/config.json b/custom/config.json index 851c092..cfea019 100644 --- a/custom/config.json +++ b/custom/config.json @@ -2,5 +2,5 @@ "packageName": "pfruck_contabo", "projectName": "pfruck_contabo", "packageUrl": "https://github.com/p-fruck/python-contabo", - "packageVersion": "1.12.0" + "packageVersion": "2.0.0" } diff --git a/pfruck_contabo/__init__.py b/pfruck_contabo/__init__.py index 60cdea6..f77f514 100644 --- a/pfruck_contabo/__init__.py +++ b/pfruck_contabo/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "1.12.0" +__version__ = "2.0.0" # import apis into sdk package from pfruck_contabo.api.images_api import ImagesApi diff --git a/pfruck_contabo/api_client.py b/pfruck_contabo/api_client.py index 39a0b45..257d501 100644 --- a/pfruck_contabo/api_client.py +++ b/pfruck_contabo/api_client.py @@ -88,7 +88,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.12.0/python' + self.user_agent = 'OpenAPI-Generator/2.0.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/pfruck_contabo/configuration.py b/pfruck_contabo/configuration.py index ea04835..605967a 100644 --- a/pfruck_contabo/configuration.py +++ b/pfruck_contabo/configuration.py @@ -379,7 +379,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.12.0".\ + "SDK Package Version: 2.0.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/pyproject.toml b/pyproject.toml index d26cf8a..168badd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pfruck_contabo" -version = "1.12.0" +version = "2.0.0" description = "Contabo API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index 958b7a9..49cc89d 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "pfruck_contabo" -VERSION = "1.12.0" +VERSION = "2.0.0" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0",