[gdal-dev] Python developement guidelines
Even Rouault
even.rouault at spatialys.com
Tue Mar 3 03:42:10 PST 2015
Hi,
Just wanted to notify I've added the following section in
http://trac.osgeo.org/gdal/wiki/rfc8_devguide
"""
Python code
* All Python code in autotest, swig/python/scripts and swig/python/samples
should pass OK with the Pyflakes checker (version used currently: 0.8.1). This
is asserted by Travis-CI jobs
* Python code should be written to be compatible with both Python 2 and
Python 3.
"""
We could probably write more, but that's a beginning.
The first item matches a painful pass in the whole code base I did recently so
that we get Pyflakes clean. I think this is a good practice and hopefully
shouldn't be too controversial as it helps catching real errors it just caught
errors I did in my latest commit) and has low false positive rate.
The second item might be more controversial and reflects my attempts to keep
Python 3 compatibility even if it isn't my primary python version. There's a
python3 job under https://travis-ci.org/rouault/gdal_coverage/builds/ but you
have to look at the logs since, if an autotest script has python 3 syntax
errors (like using print "stuff" instead of print("stuff")), it gets ignored
without reporting errors. only errors linked to succesfully loaded scripts
affect the global job status.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list