You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,7 @@ Your contribution will be under our [license](https://github.com/geopython/pygeo
65
65
* Pull requests may include copyright in the source code header by the contributor if the contribution is significant or the contributor wants to claim copyright on their contribution.
66
66
* All contributors shall be listed at https://github.com/geopython/pygeoapi/graphs/contributors
67
67
* Unclaimed copyright, by default, is assigned to the main copyright holders as specified in https://github.com/geopython/pygeoapi/blob/master/LICENSE.md
68
+
* further notes can be found in the `documentation <https://docs.pygeoapi.io/en/latest/development.html#testing>`_
68
69
69
70
### Version Control Branching
70
71
@@ -89,16 +90,23 @@ Your contribution will be under our [license](https://github.com/geopython/pygeo
89
90
while, __make sure you rebase or merge to latest ``master``__ to ensure a
90
91
speedier resolution.
91
92
93
+
### Testing
94
+
95
+
* testing is performed using `pytest <https://pytest.org>`_ and covers all major components (API core, providers, formatters, managers, etc.)
96
+
* additional information can be found in the `documentation <https://docs.pygeoapi.io/en/latest/development.html#testing>`_
97
+
98
+
92
99
### Documentation
93
100
94
101
* documentation is managed in `docs/`, in reStructuredText format
95
102
*[Sphinx](https://www.sphinx-doc.org) is used to generate the documentation
96
103
* See the [reStructuredText Primer](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) on rST markup and syntax
104
+
* additional information can be found in the `documentation <https://docs.pygeoapi.io/en/latest/development.html#building-the-documentation>`_
97
105
98
106
99
107
### Wiki
100
108
101
-
* the [pygeoapi wiki](https://github.com/geopython/pygeoapi/wiki) provides working level documentation
109
+
* the [pygeoapi wiki](https://github.com/geopython/pygeoapi/wiki) provides working level documentation and various community resources
102
110
103
111
104
112
### Code Formatting
@@ -107,7 +115,8 @@ Your contribution will be under our [license](https://github.com/geopython/pygeo
107
115
* pygeoapi follows the [PEP-8](http://www.python.org/dev/peps/pep-0008/) guidelines
108
116
* 80 characters
109
117
* spaces, not tabs
110
-
* pygeoapi, instead of PyGeoAPI, pygeoAPI, etc.
118
+
* pygeoapi, NOT PyGeoAPI, pygeoAPI, etc.
119
+
* additional information can be found in the `documentation <https://docs.pygeoapi.io/en/latest/development.html#linting>`_
Copy file name to clipboardExpand all lines: docs/source/contributing.rst
-41Lines changed: 0 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,46 +3,5 @@
3
3
Contributing
4
4
============
5
5
6
-
Building the documentation
7
-
--------------------------
8
-
9
-
To build the documentation in pygeoapi we use `Sphinx`_. The documentation is located in the docs folder.
10
-
11
-
.. note::
12
-
For the following instructions to work, you must be located in the root folder of pygeoapi.
13
-
14
-
Install the dependencies necessary for building the documentation using the following command:
15
-
16
-
.. code-block:: bash
17
-
18
-
pip3 install -r docs/requirements.txt
19
-
20
-
After installing the requirements, build the documentation using the ``sphinx-build`` command:
21
-
22
-
.. code-block:: bash
23
-
24
-
sphinx-build -M html docs/source docs/build
25
-
26
-
27
-
Or using the following ``make`` command:
28
-
29
-
.. code-block:: bash
30
-
31
-
make -C docs html
32
-
33
-
After building the documentation, the folder ``docs/build`` will contain the website generated with the documentation.
34
-
Add the folder to a web server or open the file ``docs/build/html/index.html`` file in a web browser to see the contents of the documentation.
35
-
36
-
The documentation is hosted on `readthedocs`_. It is automatically generated from the contents of the ``master`` branch on GitHub.
37
-
38
-
The file ``.readthedocs.yaml`` contains the configuration of the readthedocs build. Refer to the `readthedocs configuration file`_ documentation for more information.
39
-
40
-
Contributing GitHub page
41
-
------------------------
42
-
43
6
Please see the `Contributing page <https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md>`_
Copy file name to clipboardExpand all lines: docs/source/development.rst
+85-20Lines changed: 85 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,15 @@ Codebase
8
8
9
9
The pygeoapi codebase exists at https://github.com/geopython/pygeoapi.
10
10
11
+
Pull Requests and GitHub Actions
12
+
--------------------------------
13
+
14
+
A given GitHub Pull Request is evaluated against the following GitHub actions:
15
+
16
+
- main: mainline testing harness (as defined in ``tests``)
17
+
- flake8: code linting
18
+
- docs: documentation updates (for files updated in ``docs/**.rst``)
19
+
- vulnerabilities: Trivy vulnerability scanning
11
20
12
21
Testing
13
22
-------
@@ -22,6 +31,78 @@ Tests can be run locally as part of development workflow. They are also run on
22
31
To run all tests, simply run ``pytest`` in the repository. To run a specific test file,
23
32
run ``pytest tests/api/test_itemtypes.py``, for example.
24
33
34
+
Some provider tests are subject to external service provisioning and setup (i.e Elasticsearch,
35
+
PostgreSQL). See the `GitHub Action main workflow <https://github.com/geopython/pygeoapi/blob/master/.github/workflows/main.yml>`_
36
+
to review the setups taken in order to run provider tests requiring additional infrastructure.
37
+
38
+
.. _pre-commit:
39
+
40
+
Linting
41
+
-------
42
+
43
+
pygeoapi follows PEP8 for linting Python source code. All commits and GitHub Pull Requests
44
+
perform ``flake8`` linting compliance prior to approval and/or merge into the codebase. Running linting
45
+
compliance prior to submitting a GitHub Pull Request is recommended.
46
+
47
+
Using flake8
48
+
^^^^^^^^^^^^
49
+
50
+
Simply running `flake8` against the repository tree will assess the code for linting compliance.
51
+
52
+
.. note::
53
+
54
+
Ensure flake8 is installed (``pip3 install flake8`` or ``pip3 install -r requirements.txt``)
55
+
56
+
Using pre-commit
57
+
^^^^^^^^^^^^^^^^
58
+
59
+
You may optionally use `pre-commit`_ in order to check for linting and other static issues
60
+
before committing changes. Pygeoapi's repo includes a ``.pre-commit.yml``
61
+
file, check the pre-commit docs on how to set it up - in a nutshell:
62
+
63
+
- pre-commit is mentioned in pygeoapi's ``requirements-dev.txt`` file, so it will be included
64
+
when you pip install those
65
+
- run ``pre-commit install`` once in order to install its git commit hooks.
66
+
- optionally, run ``pre-commit run --all-files``, which will run all pre-commit hooks for all files in the repo.
67
+
This also prepares the pre-commit environment.
68
+
- from now on, whenever you do a ``git commit``, the pre-commit hooks will run and the commit
69
+
will only be done if all checks pass
70
+
71
+
Building the documentation
72
+
--------------------------
73
+
74
+
To build the documentation in pygeoapi we use `Sphinx`_. The documentation is located in the docs folder.
75
+
76
+
.. note::
77
+
For the following instructions to work, you must be located in the root folder of pygeoapi.
78
+
79
+
Install the dependencies necessary for building the documentation using the following command:
80
+
81
+
.. code-block:: bash
82
+
83
+
pip3 install -r docs/requirements.txt
84
+
85
+
After installing the requirements, build the documentation using the ``sphinx-build`` command:
86
+
87
+
.. code-block:: bash
88
+
89
+
sphinx-build -M html docs/source docs/build
90
+
91
+
92
+
Or using the following ``make`` command:
93
+
94
+
.. code-block:: bash
95
+
96
+
make -C docs html
97
+
98
+
After building the documentation, the folder ``docs/build`` will contain the website generated with the documentation.
99
+
Add the folder to a web server or open the file ``docs/build/html/index.html`` file in a web browser to see the contents of the documentation.
100
+
101
+
The documentation is hosted on `Read the Docs`_. It is automatically generated from the contents of the ``master`` branch on GitHub.
102
+
103
+
The file ``.readthedocs.yaml`` contains the configuration of the Read the Docs build. Refer to the `Read the Docs configuration file`_ documentation for more information.
104
+
105
+
25
106
Working with Spatialite on OSX
26
107
------------------------------
27
108
@@ -66,24 +147,8 @@ Set the variable for the Spatialite library under OSX:
0 commit comments