Skip to main content

SQLAlchemy dialect for OGC WFS

Project description

SQLAlchemy dialect for OGC WFS

SQLAlchemy dialect for OGC WFS as a Superset plugin.

Register the dialect

The plugin can currently be installed via the test instance of the Python Package Index:

pip install -i https://test.pypi.org/simple/ superset-wfs-dialect

The dialect must then be registered in the the local superset_config.py:

from sqlalchemy.dialects import registry
registry.register("wfs", "superset_wfs_dialect.dialect", "WfsDialect")

Start/restart superset and continue as described in the Start the application section.

Development

Prerequisites for development

  • Docker Engine >= version 28
  • python >= version 3.10.12
  • Checkout this project

Installation

For debugging and code completion run via terminal within the project root:

python3 -m venv .venv
source .venv/bin/activate
pip install -e .

or create a virtual environment via VS Code:

https://code.visualstudio.com/docs/python/python-tutorial#_create-a-virtual-environment.

Start superset with the registered plugin:

docker compose up -d --build

Debugging during development

Debugging can be activated via the VS Code during development using F5. Please note that the Python interpreter is selected from the previously created venv. Breakpoints set in VS Code are then taken into account.

Start the application

When in development mode, open http://localhost:8088/ . Otherwise, please open the corresponding URL to the installed superset instance.

To add a new database:

  • select Data > Connect database in the submenu
  • choose "Other" at the list of "Supported Databases"
  • insert the SQLAlchemy URI to a WFS (wfs://[...])
  • test the connection
  • create a dataset
  • create a chart/dashboard

Publishing a Development Version to TestPyPI

Requirements

  • You must be on the main branch
  • Your working directory must be clean (no uncommitted changes)
  • You have push access to the repository
  • A valid TEST_PYPI_TOKEN is configured in GitHub Secrets (used by the GitHub Actions workflow)

Releasing a new version

  1. Run the release script with the desired version number (e.g. 0.0.1):

    ./release.sh 0.0.1
    

    This will:

    • Update the version field in setup.py
    • Commit the change to main
    • Create a Git tag e.g. 0.0.1
    • Push the tag to GitHub
  2. The GitHub Actions workflow will be triggered by the tag:

    • It will build the package
    • Upload it to PyPI

Notes

  • Versions must follow the format X.Y.Z (e.g. 0.1.0)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

superset_wfs_dialect-0.0.1.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

superset_wfs_dialect-0.0.1-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file superset_wfs_dialect-0.0.1.tar.gz.

File metadata

  • Download URL: superset_wfs_dialect-0.0.1.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for superset_wfs_dialect-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b64dc8d162828957c6418dccdf27092fc2d03cdd9b0cc988fd987f76fc88a4ee
MD5 d80ae401ec9fe0c220638110730a0a5a
BLAKE2b-256 8a1acb05dacdd64560e5b4cb886c89b75808ddd2b9f09b3bc5f727f292a18ba3

See more details on using hashes here.

File details

Details for the file superset_wfs_dialect-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for superset_wfs_dialect-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 46b37ec7272f0679ad071e2066052f71401ce698236e190dae78e454443536e4
MD5 df728b35dda26d5aaea8642f3de40ac9
BLAKE2b-256 2694153e846866221207d29dc7b77ee7a316a074cb0f2399f9b02d008ff07855

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page