Skip to content

Latest commit

 

History

History
112 lines (93 loc) · 4.1 KB

CONTRIBUTING.md

File metadata and controls

112 lines (93 loc) · 4.1 KB

Contributing to qgis2web

Development

qgis2web is largely developed by me, with significant contributions from a few others. Please, please do contribute, as there is so much more to do.

As for the overall direction of the plugin, there is now basically feature parity between Leaflet and OpenLayers exports. Any new features should be implemented in both formats, or I am not keen for it to be included.

The core philosophy of the plugin is: don’t get the plugin to do anything which QGIS can already do. Also, keep focused on producing good-quality maps, reproducing as much from QGIS as possible, rather than adding extra new functionality.

Coding guidelines:

  • Comply with PEP8
  • Remove print statements before making a pull request
  •    
  • Don’t break the tests themselves (all in test/test_qgis2web_dialog.py    and test/test_qgis2web_writers.py)
  • Anything which alters the output for the basic tests will mean updating the control files in /test/data/control
  • Write tests for new functionality
  • Don't introduce a new client-side library for something which can easily be done without it (I'm looking at you, jQuery)

Other improvements required are:

  • Improve code quality/refactor
  • Write tests for more functionality - coverage is currently very low

Testing

All commits and PRs are tested by Travis. The tests are in /test , specifically /test/test_qgis2web_dialog.py and /test/test_qgis2web_writers.py . If you want to run these tests locally on Linux, do the following to prepare (assumes Ubuntu or derivative):

# Install the pip Python package manager

apt-get install python-pip

# Using pip install nose which is used to run the tests

pip install nose

# Change to the directory which contains the plugin code

cd ~/.qgis2/python/plugins/qgis2web

# Set up the enviroment specifying the prefix path under which QGIS is
# installed (commonly /usr or /usr/local).

source scripts/run-env-linux.sh /usr

# Set the QGIS_REPO environent variable to match the QGIS version you are
# using:
# http://qgis.org/debian-ltr for long term support version
# http://qgis.org/debian for current version
# http://qgis.org/debian-nightly for current master / nightly version

export QGIS_REPO=http://qgis.org/debian-ltr

Run the tests with:

make test

Untested functionality includes:

  • SVG markers
  • polygon border style "No pen"
  • polygon fill style "No brush"
  • line cap/join styles
  • change export folder via mouse click
  • save settings
  • click layer popup combo
  • unchecked layers initially collapsed and non-visible
  • restore saved project/layer settings
  • open dev console
  • WFS encode to JSON
  • close qgis2web
  • Leaflet polygon outline: simple line
  • Leaflet line style (dot/dash)
  • Leaflet line width > 1
  • Leaflet categorized clusters
  • Leaflet graduated clusters
  • Leaflet WFS clusters
  • Leaflet JSON non-point popups
  • Leaflet match CRS
  • Leaflet basemaps
  • Leaflet basemaps + layers list
  • Leaflet cluster + layers list
  • Leaflet raster + layers list
  • Leaflet project title
  • Leaflet highlight + popups on hover
  • Leaflet categorized on non-string column
  • Leaflet categorized JSON point without popup
  • Leaflet export
  • OL3 measure - imperial units
  • OL3 blank template value
  • OL3 layer groups
  • OL3 canvas extent
  • OL3 WFS cluster
  • OL3 layer transparency

If anyone has time to write tests for any of this, it will benefit the plugin hugely. If you do, make sure you delete the tests from this list. Some of the items above I don't even know how to test...