Skip to content

Commit

Permalink
Added python toolbox
Browse files Browse the repository at this point in the history
  • Loading branch information
ckunki committed Oct 11, 2023
1 parent 1250392 commit fcb5ae2
Show file tree
Hide file tree
Showing 12 changed files with 1,451 additions and 45 deletions.
19 changes: 0 additions & 19 deletions .github/actions/prepare_poetry_env/action.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:
branches-ignore:
- "main"

jobs:
tests-job:
name: Tests (Python-${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/[email protected]
with:
poetry-version: 1.2.2

- name: Install Project
run: poetry install

- name: Run Tests
run: poetry run pytest tests
23 changes: 0 additions & 23 deletions .github/workflows/ci_build.yaml

This file was deleted.

1 change: 1 addition & 0 deletions doc/changes/changes_0.0.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ This release adds the initial implementation of the secret store
## Changes

* #1: Added secret store
* #4: Used python toolbox
File renamed without changes.
Empty file removed notebook_connector/__init__.py
Empty file.
14 changes: 14 additions & 0 deletions noxconfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from dataclasses import dataclass
from pathlib import Path
from typing import Iterable


@dataclass(frozen=True)
class Config:
root: Path = Path(__file__).parent
doc: Path = Path(__file__).parent / "doc"
version_file: Path = Path(__file__).parent / "exasol" / "toolbox" / "version.py"
path_filters: Iterable[str] = ("dist", ".eggs", "venv")


PROJECT_CONFIG = Config()
7 changes: 7 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import nox

# imports all nox task provided by the toolbox
from exasol.toolbox.nox.tasks import *

# default actions to be run if nothing is explicitly specified with the -s option
nox.options.sessions = ["fix"]
1,356 changes: 1,355 additions & 1 deletion poetry.lock

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ authors = [
[tool.poetry.dependencies]
python = ">=3.8.0,<4.0"
sqlcipher3-binary = ">=0.5.0"
exasol-toolbox = "^0.4.0"


[build-system]
Expand All @@ -29,3 +30,44 @@ minversion = "6.0"
testpaths = [
"test"
]

[tool.coverage.run]
relative_files = true
source = [
"exasol",
]

[tool.coverage.report]
fail_under = 15


[tool.black]
line-length = 88
verbose = false
include = "\\.pyi?$"


[tool.isort]
profile = "black"
force_grid_wrap = 2


[tool.pylint.master]
fail-under = 7.5
output-format = "colorized,json:.lint.json,text:.lint.txt"

[tool.pylint.format]
max-line-length = 88
max-module-lines = 800


[[tool.mypy.overrides]]
module = [
"exasol.toolbox.sphinx.multiversion.*",
"test.unit.*",
"test.integration.*",
]
ignore_errors = true

[tool.poetry.scripts]
tbx = 'exasol.toolbox.tools.tbx:CLI'
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from pathlib import Path
from notebook_connector.secret_store import Secrets
from exasol.secret_store import Secrets


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion test/test_secret_store.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import pytest
from notebook_connector.secret_store import Credentials, InvalidPassword, Secrets
from exasol.secret_store import Credentials, InvalidPassword, Secrets
from sqlcipher3 import dbapi2 as sqlcipher


Expand Down

0 comments on commit fcb5ae2

Please sign in to comment.