Skip to content

Commit 895254b

Browse files
committed
first pass docs update
1 parent 554512e commit 895254b

35 files changed

+418
-224
lines changed

CONTRIBUTING.rst

+7-10
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pycsw has the following modes of contribution:
1414
Code of Conduct
1515
---------------
1616

17-
Contributors to this project are expected to act respectfully toward others in accordance with the `OSGeo Code of Conduct <http://www.osgeo.org/code_of_conduct>`_.
17+
Contributors to this project are expected to act respectfully toward others in accordance with the `OSGeo Code of Conduct <https://www.osgeo.org/code_of_conduct>`_.
1818

1919
Contributions and Licensing
2020
---------------------------
@@ -61,7 +61,7 @@ Documentation
6161

6262
- documentation is managed in ``docs/``, in reStructuredText format
6363
- `Sphinx`_ is used to generate the documentation
64-
- See the `reStructuredText Primer <http://sphinx-doc.org/rest.html>`_ on rST markup and syntax.
64+
- See the `reStructuredText Primer <https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_ on rST markup and syntax.
6565

6666
Bugs
6767
----
@@ -94,7 +94,7 @@ Coding Guidelines
9494

9595
- pycsw instead of PyCSW, pyCSW, Pycsw
9696
- always code with `PEP 8`_ conventions
97-
- always run source code through ``pep8`` and `pylint`_, using all pylint defaults except for ``C0111``. ``sbin/pycsw-pylint.sh`` is included for convenience
97+
- always run source code through `flake8`_ and `pylint`_, using all pylint defaults except for ``C0111``. ``sbin/pycsw-pylint.sh`` is included for convenience
9898
- for exceptions which make their way to OGC ``ExceptionReport`` XML, always specify the appropriate ``locator`` and ``code`` parameters
9999
- the pycsw wiki documents `developer tasks`_ for things like releasing documentation, testing, etc.
100100

@@ -137,13 +137,10 @@ your own repository to ensure your pycsw repository is up to date with pycsw mas
137137
git checkout master
138138
git pull upstream master
139139
140-
.. _`Corporate`: http://www.osgeo.org/sites/osgeo.org/files/Page/corporate_contributor.txt
141-
.. _`Individual`: http://www.osgeo.org/sites/osgeo.org/files/Page/individual_contributor.txt
142140
143-
.. _`OSGeo`: http://www.osgeo.org/content/foundation/legal/licenses.html
144-
.. _`PEP 8`: http://www.python.org/dev/peps/pep-0008/
145-
.. _`pep8`: http://pypi.python.org/pypi/pep8/
146-
.. _`pylint`: http://www.logilab.org/857
147-
.. _`Sphinx`: http://sphinx-doc.org/
141+
.. _`PEP 8`: https://www.python.org/dev/peps/pep-0008/
142+
.. _`flake8`: https://gitlab.com/pycqa/flake8
143+
.. _`pylint`: https://pylint.org
144+
.. _`Sphinx`: https://www.sphinx-doc.org
148145
.. _`developer tasks`: https://github.com/geopython/pycsw/wiki/Developer-Tasks
149146
.. _`mailing list`: https://pycsw.org/community#mailing-list

LICENSE.txt

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
The MIT License (MIT)
2+
=====================
23

3-
Copyright (c) 2010-2015 Tom Kralidis
4-
Copyright (c) 2011-2015 Angelos Tzotsos
5-
Copyright (c) 2012-2015 Adam Hinz
6-
Copyright (c) 2015 Ricardo Garcia Silva
4+
Copyright &copy; 2010-2021 Tom Kralidis
5+
Copyright &copy; 2011-2021 Angelos Tzotsos
6+
Copyright &copy; 2012-2015 Adam Hinz
7+
Copyright &copy; 2015-2021 Ricardo Garcia Silva
78

89
Permission is hereby granted, free of charge, to any person obtaining a copy
910
of this software and associated documentation files (the "Software"), to deal

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
recursive-include pycsw *.xsd *.yaml *.html *.png *.ico
22
include *.txt
3-
include README.rst
3+
include README.md

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# pycsw
2+
3+
[![Build Status](https://github.com/geopython/pycsw/workflows/build%20%E2%9A%99%EF%B8%8F/badge.svg)](https://github.com/geopython/pycsw/actions)
4+
[![Join the chat at https://gitter.im/geopython/pycsw](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/geopython/pycsw)
5+
[![Documentation](https://readthedocs.org/projects/pycsw/badge/)](https://docs.pycsw.org)
6+
7+
[pycsw](https://pycsw.org) is an OGC API - Records and CSW server implementation written in Python.
8+
9+
pycsw fully implements the the [OGC API - Records (OARec) standard](https://ogcapi.ogc.org/records/)
10+
and the OpenGIS Catalogue Service Implementation Specification (Catalogue Service for
11+
the Web). Initial development started in 2010 (more formally announced in
12+
2011). The project is certified OGC Compliant, and is an OGC Reference
13+
Implementation. Since 2015, pycsw is an official OSGeo Project.
14+
15+
pycsw allows for the publishing and discovery of geospatial metadata via
16+
numerous APIs (OGC API - Records, CSW 2/CSW 3, OpenSearch, OAI-PMH, SRU). Existing
17+
repositories of geospatial metadata can also be exposed, providing a standards-based
18+
metadata and catalogue component of spatial data infrastructures.
19+
20+
pycsw is Open Source, released under an MIT license, and runs on all major
21+
platforms (Windows, Linux, Mac OS X).
22+
23+
Please read the docs at [https://pycsw.org/docs](https://pycsw.org/docs) for more information.

README.rst

-23
This file was deleted.

default-sample.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ allowed_ips=127.0.0.1
5353

5454
[metadata:main]
5555
identification_title=pycsw Geospatial Catalogue
56-
identification_abstract=pycsw is an OGC CSW server implementation written in Python
56+
identification_abstract=pycsw is an OARec and OGC CSW server implementation written in Python
5757
identification_keywords=catalogue,discovery,metadata
5858
identification_keywords_type=theme
5959
identification_fees=None

docs/_templates/indexsidebar.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
</p>
44

55
<p>
6-
<a title="This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 3.0.0. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries." href="http://www.opengeospatial.org/resource/products/details/?pid=1374"><img alt="This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 3.0.0. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries." src="https://portal.opengeospatial.org/public_ogc/compliance/Certified_OGC_Compliant_Logo_Web.gif" height="74"/></a>
6+
<a title="This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 3.0.0. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries." href="https://www.ogc.org/resource/products/details/?pid=1374"><img alt="This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 3.0.0. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries." src="https://portal.ogc.org/public_ogc/compliance/Certified_OGC_Compliant_Logo_Web.gif" height="74"/></a>
77
</p>
88

99
<p>
10-
<a title="This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 3.0.0. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries." href="http://www.opengeospatial.org/resource/products/details/?pid=1374"><img alt="This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 3.0.0. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries." src="https://portal.opengeospatial.org/public_ogc/compliance/badge.php?s=CAT%20CSW%203.0.0&r=1" height="38"/></a>
10+
<a title="This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 3.0.0. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries." href="https://www.ogc.org/resource/products/details/?pid=1374"><img alt="This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 3.0.0. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries." src="https://portal.ogc.org/public_ogc/compliance/badge.php?s=CAT%20CSW%203.0.0&r=1" height="38"/></a>
1111
</p>
1212

1313
<p>
14-
<a title="This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 2.0.2. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries." href="http://www.opengeospatial.org/resource/products/details/?pid=1374"><img alt="This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 2.0.2. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries." src="https://portal.opengeospatial.org/public_ogc/compliance/badge.php?s=CAT%20CSW%202.0.2&r=1" height="38"/></a>
14+
<a title="This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 2.0.2. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries." href="https://www.ogc.org/resource/products/details/?pid=1374"><img alt="This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 2.0.2. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries." src="https://portal.ogc.org/public_ogc/compliance/badge.php?s=CAT%20CSW%202.0.2&r=1" height="38"/></a>
1515
</p>
1616

1717
<p>

docs/_templates/layout.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@
3939
<a href="https://pycsw.org">Website</a> &mdash;
4040
<a href="https://pycsw.org/community">Community</a> &mdash;
4141
<a href="https://pycsw.org/blog">Blog</a> &mdash;
42-
<a href="https://plus.google.com/communities/104084873011085696113">Google+</a> &mdash;
4342
<a href="https://pycsw.org/download">Download</a> &mdash;
4443
<a href="https://github.com/geopython/pycsw">Source</a> &mdash;
4544
<a href="https://github.com/geopython/pycsw/issues">Issues</a> &mdash;
46-
<a href="http://lists.osgeo.org/mailman/listinfo/pycsw-devel">Mailing List</a>
45+
<a href="https://lists.osgeo.org/mailman/listinfo/pycsw-devel">Mailing List</a>
4746
</p>
4847
</div>
4948
{% endblock %}

docs/administration.rst

+22-19
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Metadata Repository Setup
1616
pycsw supports the following databases:
1717

1818
- SQLite3
19-
- PostgreSQL
19+
- PostgreSQL (without PostGIS)
2020
- PostgreSQL with PostGIS enabled
2121
- MySQL
2222

@@ -27,7 +27,7 @@ pycsw supports the following databases:
2727
PostgreSQL support includes support for PostGIS functions if enabled
2828

2929
.. note::
30-
If PostGIS (1.x or 2.x) is activated before setting up the pycsw/PostgreSQL database, then native PostGIS geometries will be enabled.
30+
If PostGIS is activated before setting up the pycsw/PostgreSQL database, then native PostGIS geometries will be enabled.
3131

3232
To expose your geospatial metadata via pycsw, perform the following actions:
3333

@@ -38,7 +38,9 @@ To expose your geospatial metadata via pycsw, perform the following actions:
3838
Supported Information Models
3939
----------------------------
4040

41-
By default, pycsw supports the ``csw:Record`` information model.
41+
By default, pycsw's API supports the core OARec and CSW Record information models. From
42+
the database perspective, the pycsw metadata model is loosely based on ISO 19115 and is
43+
able to transform to other formats as part of transformation during OARec/CSW requests.
4244

4345
.. note::
4446
See :ref:`profiles` for information on enabling profiles
@@ -48,31 +50,31 @@ Setting up the Database
4850

4951
.. code-block:: bash
5052
51-
$ pycsw-admin.py -c setup_db -f default.cfg
53+
pycsw-admin.py -c setup_db -f default.cfg
5254
5355
This will create the necessary tables and values for the repository.
5456

55-
The database created is an `OGC SFSQL`_ compliant database, and can be used with any implementing software. For example, to use with `OGR`_:
57+
The database created is an `OGC SFSQL`_ compliant database, and can be used with any implementing software. For example, to use with `GDAL`_:
5658

5759
.. code-block:: bash
5860
59-
$ ogrinfo /path/to/records.db
61+
ogrinfo /path/to/records.db
6062
INFO: Open of 'records.db'
6163
using driver 'SQLite' successful.
6264
1: records (Polygon)
63-
$ ogrinfo -al /path/to/records.db
65+
ogrinfo -al /path/to/records.db
6466
# lots of output
6567
6668
.. note::
67-
If PostGIS is detected, the pycsw-admin.py script does not create the SFSQL tables as they are already in the database.
69+
If PostGIS is detected, the ``pycsw-admin.py`` script does not create the SFSQL tables as they are already in the database.
6870

6971

7072
Loading Records
7173
----------------
7274

7375
.. code-block:: bash
7476
75-
$ pycsw-admin.py -c load_records -f default.cfg -p /path/to/records
77+
pycsw-admin.py -c load_records -f default.cfg -p /path/to/records
7678
7779
This will import all ``*.xml`` records from ``/path/to/records`` into the database specified in ``default.cfg`` (``repository.database``). Passing ``-r`` to the script will process ``/path/to/records`` recursively. Passing ``-y`` to the script will force overwrite existing metadata with the same identifier. Note that ``-p`` accepts either a directory path or single file.
7880

@@ -84,7 +86,7 @@ Exporting the Repository
8486

8587
.. code-block:: bash
8688
87-
$ pycsw-admin.py -c export_records -f default.cfg -p /path/to/output_dir
89+
pycsw-admin.py -c export_records -f default.cfg -p /path/to/output_dir
8890
8991
This will write each record in the database specified in ``default.cfg`` (``repository.database``) to an XML document on disk, in directory ``/path/to/output_dir``.
9092

@@ -93,7 +95,8 @@ Optimizing the Database
9395

9496
.. code-block:: bash
9597
96-
$ pycsw-admin.py -c optimize_db -f default.cfg
98+
pycsw-admin.py -c optimize_db -f default.cfg
99+
pycsw-admin.py -c rebuild_db_indexes -f default.cfg
97100
98101
.. note::
99102
This feature is relevant only for PostgreSQL and MySQL
@@ -103,7 +106,7 @@ Deleting Records from the Repository
103106

104107
.. code-block:: bash
105108
106-
$ pycsw-admin.py -c delete_records -f default.cfg
109+
pycsw-admin.py -c delete_records -f default.cfg
107110
108111
This will empty the repository of all records.
109112

@@ -114,14 +117,14 @@ PostgreSQL
114117
^^^^^^^^^^
115118

116119
- if PostGIS is not enabled, pycsw makes uses of PL/Python functions. To enable PostgreSQL support, the database user must be able to create functions within the database. In case of recent PostgreSQL versions (9.x), the PL/Python extension must be enabled prior to pycsw setup
117-
- `PostgreSQL Full Text Search`_ is supported for ``csw:AnyText`` based queries. pycsw creates a tsvector column based on the text from anytext column. Then pycsw creates a GIN index against the anytext_tsvector column. This is created automatically in ``pycsw.admin.setup_db``. Any query against `csw:AnyText` or `apiso:AnyText` will process using PostgreSQL FTS handling
120+
- `PostgreSQL Full Text Search`_ is supported for ``csw:AnyText`` based queries. pycsw creates a tsvector column based on the text from anytext column. Then pycsw creates a GIN index against the anytext_tsvector column. This is created automatically in ``pycsw.admin.setup_db``. Any query against OARec's ``q`` parameter or CSW `csw:AnyText` or `apiso:AnyText` will process using PostgreSQL FTS handling
118121

119122
PostGIS
120123
^^^^^^^
121124

122125
- pycsw makes use of PostGIS spatial functions and native geometry data type.
123126
- It is advised to install the PostGIS extension before setting up the pycsw database
124-
- If PostGIS is detected, the pycsw-admin.py script will create both a native geometry column and a WKT column, as well as a trigger to keep both synchronized.
127+
- If PostGIS is detected, the pycsw-admin.py script will create both a native geometry column and a WKT column, as well as a trigger to keep both synchronized
125128
- In case PostGIS gets disabled, pycsw will continue to work with the `WKT`_ column
126129
- In case of migration from plain PostgreSQL database to PostGIS, the spatial functions of PostGIS will be used automatically
127130
- When migrating from plain PostgreSQL database to PostGIS, in order to enable native geometry support, a "GEOMETRY" column named "wkb_geometry" needs to be created manually (along with the update trigger in ``pycsw.admin.setup_db``). Also the native geometries must be filled manually from the `WKT`_ field. Next versions of pycsw will automate this process
@@ -214,8 +217,8 @@ Values of mappings can be derived from the following mechanisms:
214217

215218
Further information is provided in ``pycsw/config.py:MD_CORE_MODEL``.
216219

217-
.. _`OGR`: http://www.gdal.org/ogr
218-
.. _`OGC SFSQL`: http://www.opengeospatial.org/standards/sfs
219-
.. _`WKT`: http://en.wikipedia.org/wiki/Well-known_text
220-
.. _`EWKT`: http://en.wikipedia.org/wiki/Well-known_text#Variations
221-
.. _`PostgreSQL Full Text Search`: http://www.postgresql.org/docs/9.2/static/textsearch.html
220+
.. _`GDAL`: https://www.gdal.org
221+
.. _`OGC SFSQL`: https://www.ogc.org/standards/sfs
222+
.. _`WKT`: https://en.wikipedia.org/wiki/Well-known_text
223+
.. _`EWKT`: https://en.wikipedia.org/wiki/Well-known_text#Variations
224+
.. _`PostgreSQL Full Text Search`: https://www.postgresql.org/docs/current/textsearch.html

docs/api.rst

+9-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ API
44
===
55

66
Python applications can integrate pycsw into their custom workflows. This
7-
allows for seamless integate within frameworks like Flask and Django
7+
allows for seamless integate within frameworks such as Flask and Django.
88

99
Below are examples of where using the API (as opposed to the default WSGI/CGI
1010
services could be used:
@@ -14,9 +14,15 @@ services could be used:
1414
- authentication or authorization logic
1515
- forcing CSW version 2.0.2 as default
1616

17+
OARec Flask Example
18+
-------------------
1719

18-
Simple Flask Example
19-
--------------------
20+
See https://github.com/geopython/pycsw/blob/master/pycsw/wsgi_flask.py for how
21+
to implement a Flask wrapper atop all pycsw supported APIs. Note the use of
22+
Flask blueprints to enable integration with downstream Flask applications.
23+
24+
Simple CSW Flask Example
25+
------------------------
2026

2127
.. code-block:: python
2228

0 commit comments

Comments
 (0)