Skip to content
Commits on Source (6)
......@@ -40,7 +40,7 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/
......@@ -3,7 +3,7 @@ Contributing to PyWPS
The PyWPS project openly welcomes contributions (bug reports, bug fixes, code
enhancements/features, etc.). This document will outline some guidelines on
contributing to PyWPS. As well, the PyWPS `community <http://pywps.org/community>`_ is a
contributing to PyWPS. As well, the PyWPS `community <https://pywps.org/community>`_ is a
great place to get an idea of how to connect and participate in the PyWPS community
and development.
......@@ -17,7 +17,7 @@ Code of Conduct
Contributors to this project are expected to act respectfully towards others in
accordance with the `OSGeo Code of Conduct
<http://www.osgeo.org/code_of_conduct>`_.
<https://www.osgeo.org/code_of_conduct>`_.
Contributions and Licensing
---------------------------
......@@ -82,7 +82,7 @@ Documentation
- documentation is managed in ``docs/``, in reStructuredText format
- `Sphinx`_ is used to generate the documentation
- See the `reStructuredText Primer <http://sphinx-doc.org/rest.html>`_ on rST
- See the `reStructuredText Primer <http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_ on rST
markup and syntax
Bugs
......@@ -119,7 +119,7 @@ GitHub Commit Guidelines
- Git commits shall include the GitHub issue number (i.e. ``#1234``) in the Git
commit log message
- all enhancements or bug fixes must successfully pass all
`OGC CITE <http://cite.opengeospatial.org>`_ tests before they are committed
`OGC CITE <https://cite.opengeospatial.org>`_ tests before they are committed
- all enhancements or bug fixes must successfully pass all tests
before they are committed
- enhancements which can be demonstrated from the PyWPS tests should be
......@@ -139,7 +139,7 @@ Submitting a Pull Request
This section will guide you through steps of working on PyWPS. This section
assumes you have forked PyWPS into your own GitHub repository. Note that
``develop`` is the main development branch in PyWPS; ``master`` is only used
``master`` is the main development branch in PyWPS.
for stable releases and managed exclusively by the PyWPS team.
.. code-block:: bash
......@@ -155,9 +155,9 @@ for stable releases and managed exclusively by the PyWPS team.
# add the main PyWPS development branch to keep up to date with upstream changes
git remote add upstream https://github.com/geopython/pywps.git
git pull upstream develop
git pull upstream master
# create a local branch off develop
# create a local branch off master
# The name of the branch should include the issue number if it exists
git branch issue-72
git checkout issue-72
......@@ -180,14 +180,20 @@ master:
.. code-block:: bash
git checkout develop
git pull upstream develop
git checkout master
git pull upstream master
Release Packaging
-----------------
Release packaging notes are maintained at https://github.com/geopython/pywps/wiki/ReleasePackaging
.. _`Corporate`: http://www.osgeo.org/sites/osgeo.org/files/Page/corporate_contributor.txt
.. _`Individual`: http://www.osgeo.org/sites/osgeo.org/files/Page/individual_contributor.txt
.. _`info@osgeo.org`: mailto:info@osgeo.org
.. _`OSGeo`: http://www.osgeo.org/content/foundation/legal/licenses.html
.. _`PEP 8`: http://www.python.org/dev/peps/pep-0008/
.. _`flake8`: https://flake8.readthedocs.org/en/latest/
.. _`PEP 8`: https://www.python.org/dev/peps/pep-0008/
.. _`flake8`: https://flake8.readthedocs.io/en/latest/
.. _`Sphinx`: http://sphinx-doc.org/
.. _`mailing list`: http://pywps.org/community
.. _`mailing list`: https://pywps.org/community
......@@ -3,7 +3,7 @@
PyWPS is an implementation of the Web Processing Service standard from
the Open Geospatial Consortium. PyWPS is written in Python.
[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg)](http://pywps.readthedocs.org/en/latest/?badge=latest)
[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://pywps.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://travis-ci.org/geopython/pywps.png)](https://travis-ci.org/geopython/pywps)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/19d53c45a3854e37b89523cf9bb1d262)](https://www.codacy.com/project/cehbrecht/pywps/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=geopython/pywps&amp;utm_campaign=Badge_Grade_Dashboard)
[![Coverage Status](https://coveralls.io/repos/github/geopython/pywps/badge.svg?branch=master)](https://coveralls.io/github/geopython/pywps?branch=master)
......
# Howto release PyWPS
This document gives you, as PyWPS release master, a complete tutorial of how to get
a PyWPS release rolled up and deployed to a target server, create packages etc.
## PyWPS versioning
PyWPS uses [Debian version naming system](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version).
Every policy should be checked against it.
PyWPS uses a 3 number release description: MAJOR.MINOR.MAINTENANCE. Within MAJOR
releases, we should aim, not to break backwards compatibility.
Event MINOR version numbers (0, 2, 4, 6, ...) are considered as stable, where as
odd numbers (1, 3, 5, 7, ...) are current development branches. MINOR releases
should add new features.
The MAINTENANCE number should be used for bugfix releases only. No new features
are added.
For release candidates, the `MAJOR.MINOR.MAINTENANCE-rcX` format should be used.
## Check `master` branch
`master` is the main development branch.
Before a release, make sure, that [Travis CI](https://travis-ci.org/geopython/pywps) is indicating full successful test suite check.
## Fix files, create tags, commit, push
* Fix the [VERSION.txt](https://github.com/geopython/pywps/blob/master/VERSION.txt) file.
* Fix the [pywps/__init__.py](https://github.com/geopython/pywps/blob/master/pywps/__init__.py) file `__version__` attribute
* Fix the [debian/changelog](https://github.com/geopython/pywps/blob/master/debian/changelog) file
```
git commit -m"Creating new release of PYWPS X.Y.Z[-rcX] fixes" -a
```
* Create tag in PyWPS main source tree
```
git tag X.Y.Z[-rcX]
git push
git push --tags
```
* Update version in `VERSION.txt` and `pywps/__init__.py` to dev, e.g.
`4.3-dev` on `master` branch:
```
git checkout master
$EDITOR VERSION.txt pywps/__init__.py # add 4.3-dev version
git commit -m"Updating version to 4.3-dev"
git push
```
### Send PyWPS to http://pypi.python.org repository (only for stable releases)
```
cd /tmp
git clone git@github.com:geopython/pywps.git
cd pywps
git checkout X.Y.Z
python setup.py bdist_wheel upload
```
## Fix the pywps-flask project (only for stable releases)
```
git checkout master
```
* Fix the [VERSION.txt](https://github.com/geopython/pywps-flask/blob/master/VERSION.txt) file.
```
$EDITOR VERSION.txt
git commit -m"Creating new release of PYWPS X.Y.Z fixes #TICKET_NUMBER" -a
git push
```
* Add tag, once pull request is accepted
```
git tag X.Y.Z
git push --tags
```
## Fix web pages && write to mailing list
```
PyWPS [X.Y.Z]
#############
The PyWPS Development team announces the release of PyWPS X.Y.Z.
Features of this version:
- [SHOULD COPY THIS FROM Changelog]
To download this version, please follow the link below [2].
NOTE: [IF ANY]
What is PyWPS:
--------------
PyWPS (Python Web Processing Service) is an implementation of the Web
Processing Service standard from Open Geospatial Consortium (OGC(R)).
Processes can be written using GRASS GIS, but usage of other programs, like
R, GDAL or PROJ tools, is possible as well.
Happy GISing!
PyWPS Development team
[1] http://pywps.org
[2] http://pywps.org/download
```
pywps (4.2.2-1) unstable; urgency=medium
* New upstream release.
* Update URLs to use HTTPS.
* Drop python-3.7.patch, applied upstream. Refresh remaining patches.
-- Bas Couwenberg <sebastic@debian.org> Fri, 27 Sep 2019 07:18:00 +0200
pywps (4.2.1-4) unstable; urgency=medium
* Add license & copyright for geojson schemas.
......
......@@ -26,7 +26,7 @@ Build-Depends: debhelper (>= 9),
Standards-Version: 4.4.0
Vcs-Browser: https://salsa.debian.org/debian-gis-team/pywps
Vcs-Git: https://salsa.debian.org/debian-gis-team/pywps.git
Homepage: http://pywps.org
Homepage: https://pywps.org
Package: python3-pywps
Architecture: all
......
......@@ -3,22 +3,22 @@ Author: Bas Couwenberg <sebastic@debian.org>
--- a/tests/test_ows.py
+++ b/tests/test_ows.py
@@ -107,6 +107,7 @@ def create_sum_one():
@@ -129,6 +129,7 @@ def create_sum_one():
class ExecuteTests(unittest.TestCase):
+ @unittest.skipIf('OFFLINE_TESTS' in os.environ, "offline tests only")
def test_wfs(self):
client = client_for(Service(processes=[create_feature()]))
request_doc = WPS.Execute(
@@ -131,6 +132,7 @@ class ExecuteTests(unittest.TestCase):
if not service_ok('https://demo.mapserver.org'):
self.skipTest("mapserver is unreachable")
@@ -155,6 +156,7 @@ class ExecuteTests(unittest.TestCase):
# . the inclusion of output
# . the type of output
+ @unittest.skipIf('OFFLINE_TESTS' in os.environ, "offline tests only")
def test_wcs(self):
try:
sys.path.append("/usr/lib/grass64/etc/python/")
if not config.CONFIG.get('grass', 'gisbase'):
self.skipTest('GRASS lib not found')
--- a/tests/validator/test_complexvalidators.py
+++ b/tests/validator/test_complexvalidators.py
@@ -79,7 +79,8 @@ class ValidateTest(unittest.TestCase):
......@@ -41,25 +41,25 @@ Author: Bas Couwenberg <sebastic@debian.org>
opendap_input.url = "http://test.opendap.org:80/opendap/netcdf/examples/sresa1b_ncar_ccsm3_0_run1_200001.nc"
--- a/tests/test_execute.py
+++ b/tests/test_execute.py
@@ -177,6 +177,7 @@ def get_output(doc):
@@ -199,6 +199,7 @@ def get_output(doc):
class ExecuteTest(unittest.TestCase):
"""Test for Exeucte request KVP request"""
+ @unittest.skipIf('OFFLINE_TESTS' in os.environ, "offline tests only")
def test_dods(self):
if not WITH_NC4:
self.skipTest('netCDF4 not installed')
if PY2:
self.skipTest('fails on python 2.7')
--- a/tests/test_inout.py
+++ b/tests/test_inout.py
@@ -129,6 +129,7 @@ class IOHandlerTest(unittest.TestCase):
self.iohandler.file = source
self._test_outout(SOURCE_TYPE.FILE)
@@ -136,6 +136,7 @@ class IOHandlerTest(unittest.TestCase):
with self.assertRaises(TypeError):
self.iohandler[0].data = '5'
+ @unittest.skipIf('OFFLINE_TESTS' in os.environ, "offline tests only")
def test_url(self):
wfsResource = 'http://demo.mapserver.org/cgi-bin/wfs?' \
@@ -339,6 +340,7 @@ class ComplexOutputTest(unittest.TestCas
if not service_ok('https://demo.mapserver.org'):
self.skipTest("mapserver is unreachable")
@@ -534,6 +535,7 @@ class ComplexOutputTest(unittest.TestCas
else:
self.assertEqual(base64.b64decode(b).decode(), self.data)
......
Description: Rename async to async_ for Python 3.7 compatibility.
async became a reserved keyword in Python 3.7:
.
> Backwards incompatible syntax changes:
>
> * [async](https://docs.python.org/3/reference/compound_stmts.html#async) and [await](https://docs.python.org/3/reference/expressions.html#await) are now reserved keywords.
.
https://docs.python.org/3/whatsnew/3.7.html
Author: Bas Couwenberg <sebastic@debian.org>
Forwarded: https://github.com/geopython/pywps/pull/462
--- a/pywps/app/Process.py
+++ b/pywps/app/Process.py
@@ -96,7 +96,7 @@ class Process(object):
def execute(self, wps_request, uuid):
self._set_uuid(uuid)
- self.async = False
+ self.async_ = False
response_cls = get_response("execute")
wps_response = response_cls(wps_request, process=self, uuid=self.uuid)
@@ -110,13 +110,13 @@ class Process(object):
raise OperationNotSupported('Process does not support the updating of status')
wps_response.store_status_file = True
- self.async = True
+ self.async_ = True
else:
wps_response.store_status_file = False
LOGGER.debug('Check if updating of status is not required then no need to spawn a process')
- wps_response = self._execute_process(self.async, wps_request, wps_response)
+ wps_response = self._execute_process(self.async_, wps_request, wps_response)
return wps_response
@@ -138,11 +138,11 @@ class Process(object):
self.status_location = os.path.join(file_path, str(self.uuid)) + '.xml'
self.status_url = os.path.join(file_url, str(self.uuid)) + '.xml'
- def _execute_process(self, async, wps_request, wps_response):
+ def _execute_process(self, async_, wps_request, wps_response):
"""Uses :module:`pywps.processing` module for sending process to
background BUT first, check for maxprocesses configuration value
- :param async: run in asynchronous mode
+ :param async_: run in asynchronous mode
:return: wps_response or None
"""
@@ -151,7 +151,7 @@ class Process(object):
stored = dblog.get_stored().count()
# async
- if async:
+ if async_:
# run immedietly
if running < maxparallel or maxparallel == -1:
@@ -257,7 +257,7 @@ class Process(object):
process_identifier = new_wps_request.identifier
process = self.service.prepare_process_for_execution(process_identifier)
process._set_uuid(uuid)
- process.async = True
+ process.async_ = True
new_wps_response = ExecuteResponse(new_wps_request, process=process, uuid=uuid)
process._run_async(new_wps_request, new_wps_response)
dblog.remove_stored(uuid)
offline-tests.patch
use-mathjax-package.patch
privacy-breach.patch
python-3.7.patch
---
Bug-Database: https://github.com/geopython/pywps/issues
Bug-Submit: https://github.com/geopython/pywps/issues/new
Cite-As: PyWPS Development Team, 2009. Python Web Processing Service (PyWPS). Software, Version XXXX. <a href="http://pywps.org/">http://pywps.org/</a>
Cite-As: PyWPS Development Team, 2009. Python Web Processing Service (PyWPS). Software, Version XXXX. <a href="https://pywps.org/">https://pywps.org/</a>
Name: PyWPS
Reference:
-
......@@ -14,7 +14,7 @@ Reference:
Year: 2007
-
Author: Jáchym Čepický and Lorenzo Becchi
Eprint: http://www.osgeo.org/files/journal/final_pdfs/OSGeo_vol1_PyWPS.pdf
Eprint: https://web.archive.org/web/20080509070016/http://www.osgeo.org/files/journal/final_pdfs/OSGeo_vol1_PyWPS.pdf
Journal: OSGeo Journal
Month: may
Pages: 39-42
......
......@@ -6,7 +6,7 @@ identification_keywords_type=theme
identification_fees=None
identification_accessconstraints=None
provider_name=PyWPS Developement team
provider_url=http://pywps.org/'
provider_url=https://pywps.org/'
contact_name=Your Name
contact_position=Developer
contact_address=My Street
......@@ -17,7 +17,7 @@ contact_country=World, Internet
contact_phone=+00 00 11 22 33
contact_fax=+00 99 88 77 66
contact_email=info@yourdomain.org
contact_url=http://pywps.org
contact_url=https://pywps.org
contact_hours=8:00-20:00UTC
contact_instructions=Knock on the door
contact_role=pointOfContact
......
......@@ -10,6 +10,10 @@ Process
.. autoclass:: Process
Exceptions you can raise in the process implementation to show a user-friendly error message.
.. autoclass:: pywps.app.exceptions.ProcessError
Inputs and outputs
==================
......@@ -33,6 +37,8 @@ LiteralData
.. autoclass:: pywps.inout.literaltypes.AllowedValue
.. autoclass:: pywps.inout.literaltypes.ValuesReference
.. autodata:: pywps.inout.literaltypes.LITERAL_DATA_TYPES
......
......@@ -78,6 +78,7 @@ class Mock(object):
else:
return Mock()
MOCK_MODULES = ['lxml', 'lxml.etree', 'lxml.builder']
# with open('../requirements.txt') as f:
......
......@@ -10,7 +10,7 @@ interpolation initialised using `os.environ`.
.. versionadded:: 4.0.0
.. warning:: Compatibility with PyWPS 3.x: major changes have been made
to the config file in order to allow for shared configurations with `PyCSW
<http://pycsw.org/>`_ and other projects.
<https://pycsw.org/>`_ and other projects.
The configuration file has several sections:
......@@ -19,7 +19,7 @@ The configuration file has several sections:
* `processing` for processing backend configuration
* `logging` for logging configuration
* `grass` for *optional* configuration to support `GRASS GIS
<http://grass.osgeo.org>`_
<https://grass.osgeo.org>`_
PyWPS ships with a sample configuration file (``default-sample.cfg``).
A similar file is also available in the `flask` service as
......@@ -31,7 +31,7 @@ Copy the file to ``default.cfg`` and edit the following:
---------------
The `[metadata:main]` section was designed according to the `PyCSW project
configuration file <http://docs.pycsw.org/en/latest/configuration.html>`_.
configuration file <https://docs.pycsw.org/en/latest/configuration.html>`_.
:identification_title:
the title of the service
......@@ -170,7 +170,7 @@ configuration file <http://docs.pycsw.org/en/latest/configuration.html>`_.
:level:
the logging level (see
http://docs.python.org/library/logging.html#logging-levels)
https://docs.python.org/3/library/logging.html#logging-levels)
:format:
the format string used by the logging `:Formatter:` (see
......@@ -182,7 +182,7 @@ configuration file <http://docs.pycsw.org/en/latest/configuration.html>`_.
messages.
:database:
Connection string to database where the login about requests/responses is to be stored. We are using `SQLAlchemy <http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls>`_
Connection string to database where the login about requests/responses is to be stored. We are using `SQLAlchemy <https://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls>`_
please use the configuration string. The default is SQLite3 `:memory:` object.
......@@ -221,7 +221,7 @@ Sample file
identification_fees=NONE
identification_accessconstraints=NONE
provider_name=Organization Name
provider_url=http://pywps.org/
provider_url=https://pywps.org/
contact_name=Lastname, Firstname
contact_position=Position Title
contact_address=Mailing Address
......
.. _contributing:
.. include:: ../CONTRIBUTING.rst
......@@ -101,7 +101,7 @@ def _handler(request, response):
# make buffer for each feature
while index < count:
response._update_status(WPS_STATUS.STARTED, 'Buffering feature %s' % index, float(index) / count)
response._update_status(WPS_STATUS.STARTED, 'Buffering feature {}'.format(index), float(index) / count)
# get the geometry
input_feature = input_layer.GetNextFeature()
......
......@@ -129,7 +129,7 @@ Deployment on Nginx-Gunicorn
For difference between WSGI server consult: `WSGI comparison <https://www.digitalocean.com/community/tutorials/a-comparison-of-web-servers-for-python-based-web-applications>`_.
uWSGU is more popular than gunicorn, best documentation is probably to be found at `Readthedocs <http://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html>`_.
uWSGU is more popular than gunicorn, best documentation is probably to be found at `Readthedocs <https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html>`_.
We need nginx and gunicorn server::
......
.. _development:
Developers Guide
================
If you identify a bug in the PyWPS code base and want to fix it, if you would
like to add further functionality, or if you wish to expand the documentation,
you are welcomed to contribute such changes. However, contributions to the
code base must follow an orderly process, described below. This facilitates
both the work on your contribution as its review.
0. GitHub account
-----------------
The PyWPS source code is hosted at GitHub, therefore you need an account to contribute.
If you do not have one, you can follow
`these instructions <https://help.github.com/categories/setup/>`_.
1. Open a new issue
-------------------
The first action to take is to clearly identify the goal of your contribution.
Be it a bug fix, a new feature or documentation, a clear record must be left
for future tracking. This is made by opening an issue at the `GitHub issue
tracker <https://github.com/geopython/pywps/issues>`_. In this new issue you
should identify not only the subject or goal, but also a draft
of the changes you expect to achieve. For example:
**Title**: Process class must be magic
**Description**: The Process class must start performing some magics. Give it
a magic wand.
2. Fork and clone the PyWPS repository
--------------------------------------
When you start modifying the code, there is always the possibility for
something to go wrong, rendering PyWPS unusable. The first action to avoid such
a situation is to create a development sand box. In GitHub this can
easily be made by creating a fork of the main PyWPS repository. Access the
`PyWPS code repository <https://github.com/geopython/PyWPS>`_ and click the
*Fork* button. This action creates a copy of the repository associated with
your GitHub user. For more details please read `the forking guide
<https://guides.github.com/activities/forking/>`_.
Now you can clone this forked repository into your development environment,
issuing a command like::
git clone https://github.com/<github-user>/PyWPS.git pywps
Where you should replace *<github-user>* with your GitHub user name.
Before you start coding ensure you are working on the `master` branch:
git checkout master
For the moment, this is the main development branch in the PyWPS project.
You can now start programming your new feature, or fixing that bug you
found. Keep in mind that PyWPS depends on a few libraries, refer to the
:ref:`installation` section to make sure you have all of them installed.
3. Commit and pull request
--------------------------
If your modification to the code is relatively small and can be included in a
single *commit* then all you need to is reference the issue in the **commit**
message, e.g.::
git commit -m "Fixes #107"
Where *107* is the number of the issue you opened initially in the PyWPS
issue tracker. Please refer to `the guide on closing issues with commits
messages
<https://help.github.com/articles/closing-issues-via-commit-messages/>`_. Then
you push the changes to your forked repository, issuing a command like::
git push origin master
Once again, make sure your commit(s) are pushed to the `master` branch.
Finally you can create a pull request. This is a formal request to merge your
contribution with the code base; it is fully managed by GitHub and greatly
facilitates the review process. You do so by accessing the repository
associated with your user and clicking the *New pull request* button. Make sure
your contribution is not creating conflicts and click *Create pull request*.
If needed, there is also a `guide on pull requests
<https://help.github.com/articles/creating-a-pull-request/>`_.
If you contribution is more substantial, and composed of multiple commits, then
you must identify the issue it closes in the pull request itself. Check out
`this guide
<https://github.com/blog/1506-closing-issues-via-pull-requests>`_ for
the details.
The members of the PyWPS PSC are then notified of your pull request. They
review your contribution and hopefully accept merging it to the code base.
4. Updating local repository
----------------------------
Later on, if you wish to make further contributions, you must make sure to be
working with the very latest version of the code base. You can add another
*remote* reference in your local repository pointing to the main PyWPS
repository::
git remote add upstream https://github.com/geopython/PyWPS
You can use the *fetch* command to update your local repository metadata::
git fetch upstream
Then you use a *pull* command to merge the latest *commits* into your local
repository::
git pull upstream master
5. Help and discussion
----------------------
If you have any doubts or questions about this contribution process or about
the code please use the `PyWPS mailing list
<http://lists.osgeo.org/mailman/listinfo/pywps-dev>`_ or the `PyWPS Gitter
<https://gitter.im/PyWPS>`_ . This is also the right place to propose and
discuss the changes you intend to introduce.
......@@ -38,7 +38,7 @@ Contents:
external-tools
extensions
api
development
contributing
exceptions
......