Skip to content

Commit e328e3b

Browse files
Merge pull request #16 from ricardogsilva/3-add-docs
Add documentation website
2 parents 6766170 + a2fb421 commit e328e3b

File tree

8 files changed

+1007
-1
lines changed

8 files changed

+1007
-1
lines changed

docs/development.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
hide:
3+
- navigation
4+
---
5+
6+
# Development
7+
8+
cite-runner is implemented in Python.
9+
10+
The standalone application depends on the following third-party projects:
11+
12+
- [typer] for CLI commands
13+
- [pydantic] for models
14+
- [jinja] for output format templates
15+
- [httpx] for making network requests
16+
- [lxml] for parsing teamengine responses
17+
- [mkdocs] for documentation
18+
19+
### Brief implementation overview
20+
21+
cite-runner runs CITE tests suites by calling [teamengine's web API]. It
22+
requests test suite results in the EARL (AKA the W3C Evaluation and Report
23+
Language) format, which is XML-based.
24+
25+
After obtaining a test suite run result in EARL format, cite-runner parses it
26+
into an instance of `models.TestSuiteResult`, its internal data structure.From
27+
there, it is able to serialize it into either JSON or markdown.
28+
29+
30+
### Setting up a develoment environment
31+
32+
In a brief nutshell:
33+
34+
1. Fork the cite-runner repository
35+
36+
2. Clone you fork to your local environment
37+
38+
3. Install [poetry]
39+
40+
4. Use poetry to install the cite-runner code locally, also including the
41+
`dev` dependency group (and optionally also the `docs` group, if you plan
42+
to work on docs):
43+
44+
```shell
45+
poetry install --with dev --with docs
46+
```
47+
48+
5. Optionally (but strongly recommended) enable the [pre-commit] hooks
49+
provided by cite-runner:
50+
51+
```shell
52+
poetry run pre-commit install
53+
```
54+
55+
6. Stand up a docker container with a local teamengine instance:
56+
57+
```shell
58+
docker run \
59+
--rm \
60+
--name=teamengine \
61+
--network=host \
62+
ogccite/teamengine-production:1.0-SNAPSHOT
63+
```
64+
65+
You should now be able to use `http:localhost:8080/teamengine` in
66+
cite-runner
67+
68+
!!! warning
69+
70+
teamengine will try to run on your local port `8080`, which could
71+
potentially already be occupied by another application.
72+
73+
7. Work on the cite-runner code
74+
75+
8. If you want to work on documentation, you can start the mkdocs server with:
76+
77+
```shell
78+
poetry run mkdocs serve
79+
```
80+
81+
82+
[httpx]: https://www.python-httpx.org/
83+
[jinja]: https://jinja.palletsprojects.com/en/stable/
84+
[lxml]: https://lxml.de/
85+
[mkdocs]: https://www.mkdocs.org/
86+
[poetry]: https://python-poetry.org/
87+
[pre-commit]: https://pre-commit.com/
88+
[pydantic]: https://docs.pydantic.dev/latest/
89+
[teamengine's web API]: https://opengeospatial.github.io/teamengine/users.html
90+
[typer]: https://typer.tiangolo.com/

docs/index.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
hide:
3+
- navigation
4+
---
5+
6+
# CITE Runner
7+
8+
A test runner for [OGC CITE].
9+
10+
Key features:
11+
12+
- **Runs as a github action**: Can be integrated into existing CI workflows
13+
- **Runs as a standalone CLI application**: Can be run as a standalone tool
14+
- **Multiple output formats**: Can output test suite results as markdown,
15+
JSON or XML
16+
17+
This project aims to simplify the running of OGC CITE tests suites so that
18+
server implementations of OGC standards may ensure their compliance with them
19+
more frequently.
20+
21+
[OGC CITE]: https://github.com/opengeospatial/cite/wiki
22+
23+
24+
## Examples
25+
26+
Integrate into your CI as a github action:
27+
28+
```yaml
29+
jobs:
30+
perform-cite-testing:
31+
runs-on: ubuntu-24.04
32+
steps:
33+
- name: test ogcapi-features compliancy
34+
uses: OSGEO/cite-runner@main
35+
with:
36+
test_suite_identifier: ogcapi-features-1.0
37+
test_session_arguments: >-
38+
iut=http://localhost:5001
39+
noofcollections=-1
40+
```
41+
42+
Run the same test suite as a standalone CLI application:
43+
44+
```shell
45+
cite-runner execute-test-suite \
46+
http://localhost:8080/teamengine \
47+
ogcapi-features-1.0 \
48+
--test-suite-input iut http://localhost:5001 \
49+
--test-suite-input noofcollections -1 \
50+
--output-format markdown
51+
```
52+
53+
54+
## License
55+
56+
cite-runner is published under an [MIT license].
57+
58+
59+
[MIT license]: https://github.com/OSGeo/cite-runner/blob/main/LICENSE

docs/ogc-test-suites.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
hide:
3+
- navigation
4+
---
5+
6+
# Test suites which are known to work
7+
8+
<table>
9+
<thead>
10+
<tr>
11+
<th>test suite identifier</th>
12+
<th>arguments</th>
13+
</tr>
14+
</thead>
15+
<tbody>
16+
<tr>
17+
<td>ogcapi-features-1.0</td>
18+
<td>
19+
<ul>
20+
<li>iut</li>
21+
<li>noofcollections</li>
22+
</ul>
23+
</td>
24+
</tr>
25+
<tr>
26+
<td>ogcapi-processes-1.0</td>
27+
<td>
28+
<ul>
29+
<li>iut</li>
30+
<li>noofcollections</li>
31+
</ul>
32+
</td>
33+
</tr>
34+
<tr>
35+
<td>ogcapi-edr10</td>
36+
<td>
37+
<ul>
38+
<li>iut</li>
39+
<li>apiDefinition</li>
40+
</ul>
41+
</td>
42+
</tr>
43+
<tr>
44+
<td>ogcapi-tiles10</td>
45+
<td>
46+
<ul>
47+
<li>iut</li>
48+
<li>tilematrixsetdefnitionuri</li>
49+
<li>urltemplatefortiles</li>
50+
<li>tilematrix</li>
51+
<li>mintilerow</li>
52+
<li>maxtilerow</li>
53+
<li>mintilecol</li>
54+
<li>maxtilecol</li>
55+
</ul>
56+
</td>
57+
</tr>
58+
</tbody>
59+
</table>

0 commit comments

Comments
 (0)