SQLAlchemy dialect for OGC WFS as a Superset plugin.
Create a requirements-local.txt file according to the
superset documentation
and insert following line:
superset_wfs_dialect
The dialect must then be registered in your superset config file,
e.g. superset_config_docker.py when using the
docker setup:
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.
- select Data > Connect database in the submenu
- choose "Other" at the list of "Supported Databases"
- insert the SQLAlchemy URI to a WFS
wfs://[...](i.e. replacehttps://of your WFS URL withwfs://) - if the service is secured via BasicAuth, the login details must be entered in the URL and is therefore stored unencrypted (
wfs://username:password@[...]) - test the connection
- create a dataset
- create a chart/dashboard
- Docker Engine >= version 28
- python >= version 3.10.12
- Checkout this project
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 --buildDebugging 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.
When in development mode, open http://localhost:8088/ . Otherwise, please open the corresponding URL to the installed superset instance.
- 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
PYPI_TOKENis configured in GitHub Secrets (used by the GitHub Actions workflow)
-
Run the release script with the desired version number (e.g.
0.0.1):./release.sh 0.0.1
This will:
- Update the
versionfield insetup.py - Commit the change to
main - Create a Git tag e.g.
0.0.1 - Push the tag to GitHub
- Update the
-
The GitHub Actions workflow will be triggered by the tag:
- It will build the package
- Upload it to PyPI
- Versions must follow the format
X.Y.Z(e.g.0.1.0)