Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.5.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.6.0

- name: Build Artifacts
run: poetry build
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ jobs:
contents: read
pages: write
id-token: write

2 changes: 1 addition & 1 deletion .github/workflows/check-release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.5.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.6.0

- name: Check Tag Version
# make sure the pushed/created tag matched the project version
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fetch-depth: 0

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.5.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.6.0

- name: Check Version(s)
run: poetry run -- nox -s version:check
Expand All @@ -32,12 +32,16 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.5.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.6.0

- name: Build Documentation
run: |
poetry run -- nox -s docs:build

- name: Link Check
run: |
poetry run -- nox -s links:check

build-matrix:
name: Generate Build Matrix
uses: ./.github/workflows/matrix-python.yml
Expand All @@ -55,7 +59,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.5.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.6.0

- name: Run changelog update check
run: poetry run -- nox -s changelog:updated
Expand All @@ -74,7 +78,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.5.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.6.0
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -105,7 +109,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.5.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.6.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -127,7 +131,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.5.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.6.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -151,12 +155,12 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.5.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.6.0

- name: Run format check
run: poetry run -- nox -s project:format

tests-job:
Tests:
name: Tests (Python-${{ matrix.python-version }})
needs: [ Documentation, Lint, Type-Check, Security, Format, build-matrix ]
strategy:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ jobs:
permissions:
contents: read

metrics:
needs: [ ci-job ]
uses: ./.github/workflows/report.yml
secrets: inherit
permissions:
contents: read

gate-1:
name: Gate 1 - Regular CI
needs: [ ci-job ]
Expand Down Expand Up @@ -55,6 +48,13 @@ jobs:
slow-tests: true
python-version: "3.10"

metrics:
needs: [ ci-job, run-slow-tests ]
uses: ./.github/workflows/report.yml
secrets: inherit
permissions:
contents: read

gate-2:
name: Gate 2 - Allow Merge
runs-on: ubuntu-24.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fetch-depth: 0

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.5.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.6.0

- name: Build Documentation
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/matrix-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.5.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.6.0

- name: Generate matrix
run: poetry run -- nox -s matrix:python
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fetch-depth: 0

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.5.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.6.0

- name: Download Artifacts
uses: actions/download-artifact@v4.2.1
Expand All @@ -32,6 +32,11 @@ jobs:
- name: Validate Artifacts
run: poetry run -- nox -s artifacts:validate

- name: Upload to sonar
env:
SONAR_TOKEN: "${{ secrets.SONAR_TOKEN }}"
run: poetry run -- nox -s sonar:check

- name: Generate Report
run: poetry run -- nox -s project:report -- --format json | tee metrics.json

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ __pycache__
/.lint.json
/.coverage
TAGS
.sonar
4 changes: 4 additions & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Unreleased

## Refactorings

* #110: Updated exasol-toolbox to 1.6.0 & activated sonar
2 changes: 0 additions & 2 deletions exasol/saas/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
Package openapi contains the API generated from the JSON definition.
"""

from dataclasses import dataclass
from datetime import (
datetime,
timedelta,
)
from typing import Final
Expand Down
10 changes: 4 additions & 6 deletions exasol/saas/client/api_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
datetime,
timedelta,
)
from typing import (
Any,
List,
Optional,
)
from typing import Any

from tenacity import (
TryAgain,
Expand Down Expand Up @@ -173,7 +169,9 @@ def get_connection_params(
account_id, client, database_name=database_name
)
clusters = list_clusters.sync(account_id, database_id, client=client)
cluster_id = next(filter(lambda cl: cl.main_cluster, clusters)).id # type: ignore
cluster_id = next(
filter(lambda cl: cl.main_cluster, clusters) # type: ignore
).id
connections = get_cluster_connection.sync(
account_id, database_id, cluster_id, client=client
)
Expand Down
10 changes: 5 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "exasol-saas-api"
version = "2.2.0"
requires-python = ">=3.10.0,<4.0"
description = "API enabling Python applications connecting to Exasol database SaaS instances and using their SaaS services"
authors = [
{name="Christoph Kuhnke", email="christoph.kuhnke@exasol.com"},
Expand All @@ -10,7 +11,7 @@ maintainers = [
]
readme = "README.md"
license = "MIT"
dynamic = ["classifiers"]
dynamic = ["classifiers", "dependencies"]

[project.urls]
Homepage = "https://github.com/exasol/saas-api-python"
Expand All @@ -28,7 +29,6 @@ classifiers = [
]

[tool.poetry.dependencies]
python = "^3.10.0"
requests = "^2.32.4"
types-requests = "^2.31.0.6"
ifaddr = "^0.2.0"
Expand All @@ -47,7 +47,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry.group.dev.dependencies]
pytest = "^7.1.1"
pytest-mock = "^3.7.0"
exasol-toolbox = "^1.5.0"
exasol-toolbox = "^1.6.0"
openapi-python-client = ">=0.21.5"
pyexasol = ">=0.25.0"
toml = "^0.10.2"
Expand Down Expand Up @@ -114,3 +114,9 @@ max-module-lines = 800

[tool.poetry.scripts]
tbx = 'exasol.toolbox.tools.tbx:CLI'

[tool.sonar]
projectKey = "com.exasol:saas-api-python"
hostUrl = "https://sonarcloud.io"
organization = "exasol"
exclusions = "exasol/saas/client/openapi/*"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image