|
2 | 2 | Configuration
|
3 | 3 | =============
|
4 | 4 |
|
5 |
| -PyWPS is configured busing configuration file. The file uses |
| 5 | +PyWPS is configured using a configuration file. The file uses |
6 | 6 | `ConfigParser <https://wiki.python.org/moin/ConfigParserExamples>`_ format. The
|
7 | 7 | file can be stored anywhere or can be set using `PYWPS_CFG` environment
|
8 | 8 | variable.
|
9 | 9 |
|
10 |
| -.. note:: Compatibility with PyWPS 3.x: minor changes are just in the `server` |
11 |
| - section. Rest of the configuration file should work as is. |
| 10 | +.. versionadded:: 4.0.0 |
| 11 | +.. warning:: Compatibility with PyWPS 3.x: major changes have been made |
| 12 | + to the config file in order to allow for shared configurations with pycsw |
| 13 | + and other projects. |
12 | 14 |
|
13 |
| -The configuration file has 3 sections: |
| 15 | +The configuration file has 2 sections. |
14 | 16 |
|
15 |
| -**wps** |
16 |
| - The `wps` section is related to the standard. Some necessary |
17 |
| - attributes are needed, namely: |
| 17 | +PyWPS ships with a sample configuration (``default-sample.cfg``). Copy the file to ``default.cfg`` and edit the following: |
18 | 18 |
|
19 |
| - **title** |
20 |
| - title of the WPS service |
21 |
| - **abstract** |
22 |
| - abstract of the server |
23 |
| - **fees** |
24 |
| - usually set to `None` |
25 |
| - **contactraints** |
26 |
| - set to `None` as well |
27 |
| - **serveraddress** |
28 |
| - full address to WPS endpoint, like `http://localhost/wps` |
29 |
| - **serverport** |
30 |
| - port, usually set to 80 or just omitted |
31 |
| - **keywords** |
32 |
| - list of keywords of the service |
| 19 | +**[server]** |
33 | 20 |
|
34 |
| -**provider** |
35 |
| - The `provider` section is related to service provider details: |
| 21 | +- **url**: the URL of the resulting service |
| 22 | +- **language**: the ISO 639-1 language and ISO 3166-1 alpha2 country code of the service (e.g. ``en-CA``, ``fr-CA``, ``en-US``) |
| 23 | +- **encoding**: the content type encoding (e.g. ``ISO-8859-1``, see https://docs.python.org/2/library/codecs.html#standard-encodings). Default value is 'UTF-8' |
| 24 | +- **loglevel**: the logging level (see http://docs.python.org/library/logging.html#logging-levels) |
| 25 | +- **logfile**: the full file path to the logfile |
| 26 | +- **maxoperations**: maximum number of parallel running operations |
| 27 | +- **logdatabase**: SQLite3 file, where the login about requests/responses will be provided. You can set this to `":memory:"` for having the database in memory |
| 28 | +- **maxrequestsize**: maximal request size. 0 for no limit |
| 29 | +- **workdir**: temporary directory for all temporary files (which should be always deleted, once the process is finished |
| 30 | +- **outputpath**: server path for storing output files |
| 31 | +- **outputurl**: corresponding URL |
36 | 32 |
|
37 |
| - **providerName** |
38 |
| - name of the institution hosting WPS service |
39 |
| - **individualName** |
40 |
| - your name |
41 |
| - **positionName** |
42 |
| - your position |
43 |
| - **role** |
44 |
| - your role |
45 |
| - **deliveryPoint** |
46 |
| - street, address |
47 |
| - **city** |
48 |
| - city |
49 |
| - **postalCode** |
50 |
| - postal code |
51 |
| - **country** |
52 |
| - country |
53 |
| - **electronicMailAddress** |
54 |
| - e-mail |
55 |
| - **providerSite** |
56 |
| - URL of your homepage |
57 |
| - **phoneVoice** |
58 |
| - phone number |
59 |
| - **phoneFacsimile** |
60 |
| - fax |
61 |
| - **administrativeArea** |
62 |
| - ... |
63 |
| - **hoursofservice** |
64 |
| - hours of service |
65 |
| - **contactinstructions** |
66 |
| - any detailed instructions |
| 33 | +.. note:: `outputpath` and `outputurl` must corespond |
67 | 34 |
|
68 |
| -**server** |
69 |
| - the `server` section is related to instance of the WPS server |
| 35 | +**[metadata:main]** |
70 | 36 |
|
71 |
| - **maxparaleloperations** |
72 |
| - maximum number of parallel running operations |
73 |
| - **logdatabase** |
74 |
| - sqlite3 file, where the login about requests/responses will be provided. You can set this to `":memory:"` for having the database in memory |
75 |
| - **maxrequestsize** |
76 |
| - maximal request size. 0 for no limit |
77 |
| - **workdir** |
78 |
| - temporary directory for all temporary files (which should be always deleted, once the process is finished |
79 |
| - **outputPath** |
80 |
| - server path for storing output files |
81 |
| - **outputUrl** |
82 |
| - corresponding URL |
83 |
| - **logfile** |
84 |
| - alternative file name to write all outputs to |
85 |
| - **loglevel** |
86 |
| - log level according to `logging module <https://docs.python.org/3/library/logging.html#logging-levels>`_ |
87 |
| - |
88 |
| - .. note:: `outputPath` and `outputUrl` must corespond |
| 37 | +- **identification_title**: the title of the service |
| 38 | +- **identification_abstract**: some descriptive text about the service |
| 39 | +- **identification_keywords**: comma delimited list of keywords about the service |
| 40 | +- **identification_keywords_type**: keyword type as per the `ISO 19115 MD_KeywordTypeCode codelist <http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_KeywordTypeCode>`_). Accepted values are ``discipline``, ``temporal``, ``place``, ``theme``, ``stratum`` |
| 41 | +- **identification_fees**: fees associated with the service |
| 42 | +- **identification_accessconstraints**: access constraints associated with the service |
| 43 | +- **provider_name**: the name of the service provider |
| 44 | +- **provider_url**: the URL of the service provider |
| 45 | +- **contact_name**: the name of the provider contact |
| 46 | +- **contact_position**: the position title of the provider contact |
| 47 | +- **contact_address**: the address of the provider contact |
| 48 | +- **contact_city**: the city of the provider contact |
| 49 | +- **contact_stateorprovince**: the province or territory of the provider contact |
| 50 | +- **contact_postalcode**: the postal code of the provider contact |
| 51 | +- **contact_country**: the country of the provider contact |
| 52 | +- **contact_phone**: the phone number of the provider contact |
| 53 | +- **contact_fax**: the facsimile number of the provider contact |
| 54 | +- **contact_email**: the email address of the provider contact |
| 55 | +- **contact_url**: the URL to more information about the provider contact |
| 56 | +- **contact_hours**: the hours of service to contact the provider |
| 57 | +- **contact_instructions**: the how to contact the provider contact |
| 58 | +- **contact_role**: the role of the provider contact as per the `ISO 19115 CI_RoleCode codelist <http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode>`_). Accepted values are ``author``, ``processor``, ``publisher``, ``custodian``, ``pointOfContact``, ``distributor``, ``user``, ``resourceProvider``, ``originator``, ``owner``, ``principalInvestigator`` |
89 | 59 |
|
90 | 60 | -----------
|
91 | 61 | Sample file
|
92 | 62 | -----------
|
93 | 63 | ::
|
94 | 64 |
|
95 |
| - [wps] |
96 |
| - title=PyWPS 4 Server |
97 |
| - abstract=See https://github.com/jachym/pywps-4 and http://www.opengeospatial.org/standards/wps |
98 |
| - fees=NONE |
99 |
| - constraints=NONE |
100 |
| - serveraddress=http://localhost:5000/wps |
101 |
| - serverport=5000 |
102 |
| - keywords=GRASS,GIS,WPS |
103 |
| - lang=en-US |
104 |
| - |
105 |
| - [provider] |
106 |
| - providerName=Organisation |
107 |
| - individualName=My Name |
108 |
| - positionName=Intern |
109 |
| - role=Developer |
110 |
| - deliveryPoint=Street |
111 |
| - city=Belval |
112 |
| - postalCode=000 00 |
113 |
| - country=LU |
114 |
| - |
115 |
| - providerSite=http://foo.bar |
116 |
| - phoneVoice=False |
117 |
| - phoneFacsimile=False |
118 |
| - administrativeArea=False |
119 |
| - hoursofservice=00:00-24:00 |
120 |
| - contactinstructions=NONE |
121 |
| - |
122 | 65 | [server]
|
| 66 | + encoding=utf-8 |
| 67 | + language=en-US |
| 68 | + url=http://localhost/wps |
123 | 69 | maxoperations=30
|
| 70 | + maxinputparamlength=1024 |
| 71 | + maxsingleinputsize= |
124 | 72 | maxrequestsize=3mb
|
125 |
| - workdir=/tmp/pywps/ |
126 |
| - outputUrl=/data/ |
127 |
| - outputPath=/tmp/outputs/ |
128 |
| - logdatabase=/var/www/wps/wpsserver.db |
| 73 | + temp_path=/tmp/pywps/ |
| 74 | + processes_path= |
| 75 | + outputurl=/data/ |
| 76 | + outputpath=/tmp/outputs/ |
| 77 | + logfile= |
| 78 | + loglevel=INFO |
| 79 | + logdatabase= |
| 80 | + workdir= |
| 81 | + |
| 82 | + [metadata:main] |
| 83 | + identification_title=PyWPS Processing Service |
| 84 | + identification_abstract=PyWPS is an implementation of the Web Processing Service standard from the Open Geospatial Consortium. PyWPS is written in Python. |
| 85 | + identification_keywords=PyWPS,WPS,OGC,processing |
| 86 | + identification_keywords_type=theme |
| 87 | + identification_fees=NONE |
| 88 | + identification_accessconstraints=NONE |
| 89 | + provider_name=Organization Name |
| 90 | + provider_url=http://pywps.org/ |
| 91 | + contact_name=Lastname, Firstname |
| 92 | + contact_position=Position Title |
| 93 | + contact_address=Mailing Address |
| 94 | + contact_city=City |
| 95 | + contact_stateorprovince=Administrative Area |
| 96 | + contact_postalcode=Zip or Postal Code |
| 97 | + contact_country=Country |
| 98 | + contact_phone=+xx-xxx-xxx-xxxx |
| 99 | + contact_fax=+xx-xxx-xxx-xxxx |
| 100 | + contact_email=Email Address |
| 101 | + contact_url=Contact URL |
| 102 | + contact_hours=Hours of Service |
| 103 | + contact_instructions=During hours of service. Off on weekends. |
| 104 | + contact_role=pointOfContact |
0 commit comments