diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d04fa08..f3e17a1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,7 +17,7 @@ jobs: path: ~/.cache/pypoetry/virtualenvs key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} - run: | - poetry self add poetry-version-plugin + poetry self add "poetry-dynamic-versioning[plugin]" - uses: bahmutov/npm-install@v1 - run: npx semantic-release env: diff --git a/pykli/__main__.py b/pykli/__main__.py index 690935a..7fd0a70 100644 --- a/pykli/__main__.py +++ b/pykli/__main__.py @@ -26,12 +26,13 @@ def main(server, file): initialize_sqlparse() eval = pykli_eval(KsqlDBClient(server)) - prompt = pykli_prompt() if file is None else file_prompt(file) if isinstance(pykli_print(eval(Info(server))), ErrMsg): sys.exit(1) - evaluated = (tt for t in pykli_read(prompt) if (tt := eval(t)) is not None) + read = pykli_read(pykli_prompt() if file is None else file_prompt(file)) + + evaluated = (tt for t in read if (tt := eval(t)) is not None) for t in evaluated: pykli_print(t) diff --git a/pykli/repl_read.py b/pykli/repl_read.py index f42606a..347c0f0 100644 --- a/pykli/repl_read.py +++ b/pykli/repl_read.py @@ -15,7 +15,7 @@ from .completer import pykli_completer from .keybindgings import pykli_keys from .tokens import KSQL, Stmt, ErrMsg, PullQuery, SessionVar -from .repl_print import pok + class file_prompt: def __init__(self, path): diff --git a/pyproject.toml b/pyproject.toml index 88af7a2..e85eb82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,8 +29,8 @@ pytest-mock = "^3.11.1" exceptiongroup = {version = "^1", python = "<3.11"} [build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"] +build-backend = "poetry_dynamic_versioning.backend" [tool.ruff] line-length = 140 @@ -40,5 +40,8 @@ markers = [ "e2e: e2e tests", ] -[tool.poetry-version-plugin] -source = "git-tag" +[tool.poetry-dynamic-versioning] +enable = true +vcs = "git" +pattern = "default-unprefixed" +metadata = false