diff --git a/.github/change-versions-mac.sh b/.github/change-versions-mac.sh index b12d83b530..d4d709f86f 100755 --- a/.github/change-versions-mac.sh +++ b/.github/change-versions-mac.sh @@ -15,11 +15,8 @@ sed -i '' -e "/\"version\": /s/: .*,/: \"$VERSION\",/" ${root_dirpath}/typescrip sed -i '' -e "/\"version\": /s/: .*,/: \"$VERSION\",/" ${root_dirpath}/frontend/package.json sed -i '' -e "/^version =/s/= .*/= \"$VERSION\"/" ${root_dirpath}/python-client/wmill/pyproject.toml sed -i '' -e "/^windmill-api =/s/= .*/= \"\\^$VERSION\"/" ${root_dirpath}/python-client/wmill/pyproject.toml -sed -i '' -e "/^version =/s/= .*/= \"$VERSION\"/" ${root_dirpath}/python-client/wmill_pg/pyproject.toml sed -i '' -e "/^[[:space:]]*ModuleVersion[[:space:]]*=/s/= .*/= '$VERSION'/" ${root_dirpath}/powershell-client/WindmillClient/WindmillClient.psd1 -# sed -i '' -e "/^wmill =/s/= .*/= \"\\^$VERSION\"/" python-client/wmill_pg/pyproject.toml sed -i '' -e "/^wmill =/s/= .*/= \">=$VERSION\"/" ${root_dirpath}/lsp/Pipfile -sed -i '' -e "/^wmill_pg =/s/= .*/= \">=$VERSION\"/" ${root_dirpath}/lsp/Pipfile sed -i '' -E "s/name = \"windmill\"\nversion = \"[^\"]*\"\\n(.*)/name = \"windmill\"\nversion = \"$VERSION\"\\n\\1/" ${root_dirpath}/backend/Cargo.lock diff --git a/.github/change-versions.sh b/.github/change-versions.sh index 7db47d014c..759d8f793f 100755 --- a/.github/change-versions.sh +++ b/.github/change-versions.sh @@ -16,11 +16,8 @@ sed -i -e "/\"version\": /s/: .*,/: \"$VERSION\",/" ${root_dirpath}/typescript-c sed -i -e "/\"version\": /s/: .*,/: \"$VERSION\",/" ${root_dirpath}/frontend/package.json sed -i -e "/^version =/s/= .*/= \"$VERSION\"/" ${root_dirpath}/python-client/wmill/pyproject.toml sed -i -e "/^windmill-api =/s/= .*/= \"\\^$VERSION\"/" ${root_dirpath}/python-client/wmill/pyproject.toml -sed -i -e "/^version =/s/= .*/= \"$VERSION\"/" ${root_dirpath}/python-client/wmill_pg/pyproject.toml sed -i -e "/^[[:space:]]*ModuleVersion[[:space:]]*=/s/= .*/= '$VERSION'/" ${root_dirpath}/powershell-client/WindmillClient/WindmillClient.psd1 -# sed -i -e "/^wmill =/s/= .*/= \"\\^$VERSION\"/" ${root_dirpath}/python-client/wmill_pg/pyproject.toml sed -i -e "/^wmill =/s/= .*/= \">=$VERSION\"/" ${root_dirpath}/lsp/Pipfile -sed -i -e "/^wmill_pg =/s/= .*/= \">=$VERSION\"/" ${root_dirpath}/lsp/Pipfile sed -i -zE "s/name = \"windmill\"\nversion = \"[^\"]*\"\\n(.*)/name = \"windmill\"\nversion = \"$VERSION\"\\n\\1/" ${root_dirpath}/backend/Cargo.lock diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9559a252a4..80970d1e76 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -31,9 +31,3 @@ updates: directory: "/python-client/wmill" schedule: interval: "weekly" - - # Maintain dependencies for wmill_pg python client - - package-ecosystem: "pip" - directory: "/python-client/wmill_pg" - schedule: - interval: "weekly" diff --git a/lsp/Pipfile b/lsp/Pipfile index 5e96167e73..6ece442b78 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -5,7 +5,6 @@ name = "pypi" [packages] wmill = ">=1.647.0" -wmill_pg = ">=1.647.0" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/python-client/build.sh b/python-client/build.sh index 7abcd92a09..825d0f3933 100755 --- a/python-client/build.sh +++ b/python-client/build.sh @@ -61,7 +61,6 @@ mv windmill-api/README.md.tmp windmill-api/README.md cd windmill-api && poetry build cd ../wmill && poetry build -cd ../wmill_pg && poetry build cd .. && echo "windmill-api/" >> .gitignore # Build documentation (similar to typescript-client/build_typedoc.sh) diff --git a/python-client/install.sh b/python-client/install.sh index ae463574fb..6201928d0f 100755 --- a/python-client/install.sh +++ b/python-client/install.sh @@ -3,14 +3,11 @@ set -e rm windmill-api/dist/* || true rm wmill/dist/* || true -rm wmill_pg/dist/* || true ./build.sh pip3 install windmill-api/dist/*.whl --force-reinstall --user --break-system-packages pip3 install wmill/dist/*.whl --force-reinstall --user --break-system-packages -pip3 install wmill_pg/dist/*.whl --force-reinstall --user --break-system-packages rm -rf windmill-api/ rm -rf wmill/dist/* -rm -rf install wmill_pg/dist/* diff --git a/python-client/publish.sh b/python-client/publish.sh index b6610ebf7f..6b1d1b3d5d 100755 --- a/python-client/publish.sh +++ b/python-client/publish.sh @@ -5,7 +5,5 @@ set -e cd windmill-api && poetry publish --username __token__ --password $PYPI_PASSWORD -n || true cd ../wmill && poetry publish --username __token__ --password $PYPI_PASSWORD -n || true -sleep 5 -cd ../wmill_pg && poetry publish --username __token__ --password $PYPI_PASSWORD -n || true rm -rf windmill-api/ diff --git a/python-client/wmill_pg/README.md b/python-client/wmill_pg/README.md deleted file mode 100644 index 4e043806be..0000000000 --- a/python-client/wmill_pg/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# wmill - -The postgres extension client for the [Windmill](https://windmill.dev) platform. - -[windmill-api](https://pypi.org/project/windmill-api/). - -## Quickstart - -```python -import wmill_pg - - -def main(): - my_list = query("UPDATE demo SET value = 'value' RETURNING key, value") - for key, value in my_list: - ... -``` diff --git a/python-client/wmill_pg/dist/wmill_pg-1.245.0-py3-none-any.whl b/python-client/wmill_pg/dist/wmill_pg-1.245.0-py3-none-any.whl deleted file mode 100644 index 5e487f5b88..0000000000 Binary files a/python-client/wmill_pg/dist/wmill_pg-1.245.0-py3-none-any.whl and /dev/null differ diff --git a/python-client/wmill_pg/dist/wmill_pg-1.245.0.tar.gz b/python-client/wmill_pg/dist/wmill_pg-1.245.0.tar.gz deleted file mode 100644 index e539cc5f88..0000000000 Binary files a/python-client/wmill_pg/dist/wmill_pg-1.245.0.tar.gz and /dev/null differ diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml deleted file mode 100644 index eae37b843d..0000000000 --- a/python-client/wmill_pg/pyproject.toml +++ /dev/null @@ -1,48 +0,0 @@ -[tool.poetry] -name = "wmill-pg" -version = "1.647.0" -description = "An extension client for the wmill client library focused on pg" -license = "Apache-2.0" -homepage = "https://windmill.dev" -documentation = "https://windmill.dev" - -authors = ["Ruben Fiszel "] - -readme = "README.md" -packages = [ - {include = "wmill_pg"}, -] -include = ["wmill_pg/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" -wmill = "^1.5.0" -psycopg2-binary = "*" - -[build-system] -requires = ["poetry>=1.0.2", "poetry-dynamic-versioning"] -build-backend = "poetry.masonry.api" - -[tool.poetry-dynamic-versioning] -enable = true -vcs = "git" -style = "semver" -format-jinja = "{% if distance == 0 %}{{ base }}{% else %}{{ base }}+{{ distance }}.{{ commit }}{% endif %}" - - -[tool.black] -line-length = 120 -target_version = ['py36', 'py37', 'py38'] -exclude = ''' -( - /( - | \.git - | \.venv - | \.mypy_cache - )/ -) -''' - -[tool.isort] -line_length = 120 -profile = "black" diff --git a/python-client/wmill_pg/wmill_pg/__init__.py b/python-client/wmill_pg/wmill_pg/__init__.py deleted file mode 100644 index 421945bc42..0000000000 --- a/python-client/wmill_pg/wmill_pg/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .client import * diff --git a/python-client/wmill_pg/wmill_pg/client.py b/python-client/wmill_pg/wmill_pg/client.py deleted file mode 100644 index 73b5efc3fe..0000000000 --- a/python-client/wmill_pg/wmill_pg/client.py +++ /dev/null @@ -1,40 +0,0 @@ -from typing import Any - -import wmill - -import psycopg2 - - -def query(query: str, connection: "str | dict[str, Any]" = "g/all/postgres") -> "list[tuple[Any, ...]] | None": - """ - Query a postgres database using psycopg2 library underneath. See its documentation for more info. - - Args: - query: The query as string, without ending ';' - resource: The path of the resource of type 'postgres' containing the connection info. - The default value is 'g/all/postgres'. It is by convention the default postgres - db of any given workspace. - - Return: - Either None if it is a non returning statement or a list of tuple for statement with return values. - """ - if isinstance(connection, str): - pg_con = wmill.get_resource(connection) - if pg_con is None: - raise Exception(f"Resource {connection} not found") - else: - pg_con = connection - - - conn = psycopg2.connect(**pg_con) - cur = conn.cursor() - cur.execute(f"{query};") - if cur.description: - res = cur.fetchall() - else: - res = None - conn.commit() - cur.close() - conn.close() - return res - diff --git a/python-client/wmill_pg/wmill_pg/py.typed b/python-client/wmill_pg/wmill_pg/py.typed deleted file mode 100644 index 7632ecf775..0000000000 --- a/python-client/wmill_pg/wmill_pg/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561