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
@@ -25,6 +25,11 @@ pygeoapi uses `pytest <https://docs.pytest.org>`_ for managing its automated tes
25
25
exist in ``/tests`` and are developed for providers, formatters, processes, as well as the
26
26
overall API.
27
27
28
+
- API specific tests can be found in ``/tests/api``
29
+
- Provider specific tests can be found in ``/tests/provider``
30
+
- Manager specific tests can be found in ``/tests/manager``
31
+
- Additional/other tests can be found in ``/tests/other``
32
+
28
33
Tests can be run locally as part of development workflow. They are also run on pygeoapi’s
29
34
`GitHub Actions setup`_ against all commits and pull requests to the code repository.
30
35
@@ -57,24 +62,23 @@ Using pre-commit
57
62
^^^^^^^^^^^^^^^^
58
63
59
64
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``
65
+
before committing changes. pygeoapi's repo includes a ``.pre-commit.yml``
61
66
file, check the pre-commit docs on how to set it up - in a nutshell:
62
67
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
68
+
- pre-commit is part of ``requirements-dev.txt`` file, so it will be included when installing same
69
+
- run ``pre-commit install`` once in order to install its git commit hooks
70
+
- optionally, run ``pre-commit run --all-files``, which will run all pre-commit hooks for all files
71
+
in the repository. Note that this also prepares the pre-commit environment
72
+
- When subsequent ``git commit`` commands are run, the pre-commit hooks will run and commit
73
+
on passing checks
70
74
71
75
Building the documentation
72
76
--------------------------
73
77
74
-
To build the documentation in pygeoapi we use `Sphinx`_. The documentation is located in the docs folder.
78
+
Documentation is managed using `Sphinx`_ and located in the ``docs`` directory.
75
79
76
80
.. note::
77
-
For the following instructions to work, you must be located in the root folder of pygeoapi.
81
+
The following commands should be run from the root folder of the repository.
78
82
79
83
Install the dependencies necessary for building the documentation using the following command:
80
84
@@ -93,12 +97,17 @@ Or using the following ``make`` command:
93
97
94
98
.. code-block:: bash
95
99
96
-
make -C docs html
100
+
make -C docs/ html
101
+
102
+
After building the documentation, the ``docs/build`` directory will contain the generated documentation.
103
+
104
+
To view the generated documentation locally, use one of the following options:
97
105
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.
106
+
- run ``python3 -m http.server`` and navigate to ``http://localhost:8000`` in a web browser. To use a different port, use ``python3 -m http.server 8001``, for example, and navigate to ``http://localhost:8001``
107
+
- add the directory to a web server
108
+
- open the file ``docs/build/html/index.html`` file in a web browser
100
109
101
-
The documentation is hosted on `Read the Docs`_. It is automatically generated from the contents of the ``master`` branch on GitHub.
110
+
The documentation is hosted on `Read the Docs`_ and automatically generated from the contents of the ``master`` branch on GitHub.
102
111
103
112
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.
0 commit comments