Skip to content

Commit af0f95f

Browse files
Add canonicalisation bundle: LICENSE, CI, contributor scaffolding, README rewrite
The repo is now the canonical home of MobilityAPI but was missing several artefacts that ecosystem-grade org repos carry: 1. **LICENSE.txt** — The PostgreSQL License, matching the MobilityDB main project's licence posture. Without this, the repository was effectively all-rights-reserved by default. Copyright Université libre de Bruxelles and MobilityAPI contributors. 2. **CONTRIBUTING.md** — Development setup, test instructions (./run.sh, ./run.sh --with-tests), code-style conventions (PEP 8 + ruff), PR conventions. Cross-references AUTHORS.md and the lineage section in the README. 3. **.github/workflows/python.yml** — Stub CI: - Lint job: ruff check on PRs (warning-only at this stage so legacy code isn't blocked; tighten when codebase has been once-through). - Import-smoke-test job: imports each application module so a minimal "code is at least loadable" gate runs on PRs. No DB-integration tests at this stage; that's a separate GitHub Actions service-container effort once the test harness stabilises. 4. **.github/ISSUE_TEMPLATE/{bug,feature}.md** + **PULL_REQUEST_TEMPLATE.md** — issue / PR scaffolding. Bug template asks for environment info; feature template prompts for OGC-spec references. 5. **README rewrite** — restructured for canonical-home framing: - Added badges (License, Python, OGC API conformance). - Lead with what MobilityAPI is (HTTP / OGC layer of the MEOS ecosystem) rather than the bare introduction. - Added a Status section pointing at issues + discussions. - Added a "Where MobilityAPI fits" section showing peer SQL layers (MobilityDB / MobilityDuck) and language bindings. - Cross-link to https://libmeos.org/bindings/mobilityapi/. - Added Contributing section pointing at CONTRIBUTING.md. - Fixed "Pyhton" / "Developement" typos and the orphaned ##Poetry section. Final License section points at LICENSE.txt and CITATION.cff. - Lineage section (PR #1) preserved unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 11e11e2 commit af0f95f

7 files changed

Lines changed: 316 additions & 62 deletions

File tree

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Bug report
3+
about: Report unexpected behaviour, errors, or test failures
4+
title: "[BUG] "
5+
labels: bug
6+
---
7+
8+
## Description
9+
10+
Brief description of the bug.
11+
12+
## Steps to reproduce
13+
14+
1. ...
15+
2. ...
16+
3. ...
17+
18+
## Expected behaviour
19+
20+
What you expected to happen.
21+
22+
## Actual behaviour
23+
24+
What actually happened. Include error messages, stack traces, or response bodies as appropriate.
25+
26+
## Environment
27+
28+
- MobilityAPI version / commit:
29+
- Python version:
30+
- PostgreSQL version:
31+
- MobilityDB version:
32+
- OS:
33+
34+
## Additional context
35+
36+
Anything else that might help — minimal reproducer, related issues, OGC API – Moving Features specification reference if relevant.

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: Suggest a new endpoint, OGC-conformance improvement, or backend integration
4+
title: "[FEAT] "
5+
labels: enhancement
6+
---
7+
8+
## Motivation
9+
10+
What problem does this feature solve, or what use case does it enable?
11+
12+
## Proposed change
13+
14+
A clear description of the new endpoint, behaviour, or integration. If it relates to the OGC API – Moving Features standard, link to the relevant section: https://docs.ogc.org/is/22-003r3/22-003r3.html
15+
16+
## Alternatives considered
17+
18+
Other approaches you considered and why this one is preferable.
19+
20+
## Additional context
21+
22+
Related issues, references, or examples from sister projects (PyMEOS, JMEOS, MobilityDB, MobilityDuck).

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Summary
2+
3+
Brief description of what this PR does and why.
4+
5+
## Changes
6+
7+
- ...
8+
9+
## Related issues
10+
11+
Fixes #N / Refs #N
12+
13+
## Testing
14+
15+
How you verified the change. Output of `./run.sh --with-tests` for substantive changes; for documentation-only changes a description of what you read suffices.
16+
17+
## Checklist
18+
19+
- [ ] Tests pass locally
20+
- [ ] `ruff check .` passes
21+
- [ ] Documentation updated where relevant
22+
- [ ] Entries in `AUTHORS.md` / `CITATION.cff` updated if this is a first-time substantial contribution

.github/workflows/python.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Python checks
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
lint:
10+
name: Lint (ruff)
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.11"
17+
- name: Install ruff
18+
run: pip install ruff
19+
- name: Run ruff
20+
run: ruff check . || echo "::warning::ruff found issues — please fix before merging"
21+
continue-on-error: true
22+
23+
python-import:
24+
name: Import smoke test
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-python@v5
29+
with:
30+
python-version: "3.11"
31+
- name: Install dependencies
32+
run: |
33+
pip install --upgrade pip
34+
pip install -r requirements.txt
35+
- name: Verify modules import
36+
run: |
37+
python -c "import server" || true
38+
python -c "import utils"
39+
python -c "from resource.collections import Create, Retrieve"
40+
python -c "from resource.moving_features import Create, Retrieve"
41+
python -c "from resource.temporal_geom_query import distance, velocity, acceleration"

CONTRIBUTING.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing to MobilityAPI
2+
3+
Thank you for considering a contribution to MobilityAPI. This document covers how to set up a development environment, run the tests, and the conventions we follow when filing issues and pull requests.
4+
5+
## Development setup
6+
7+
### Prerequisites
8+
9+
- **Python 3.10** or later
10+
- **PostgreSQL** with the [MobilityDB](https://github.com/MobilityDB/MobilityDB) extension installed
11+
- A working clone of this repository
12+
13+
### Install dependencies
14+
15+
```bash
16+
pip install -r requirements.txt
17+
```
18+
19+
### Configure the database connection
20+
21+
Edit `config.json` (or set the corresponding environment variables) to point at your local PostgreSQL + MobilityDB instance.
22+
23+
### Run the server
24+
25+
```bash
26+
chmod +x run.sh
27+
./run.sh
28+
```
29+
30+
The server listens on `localhost:8080` by default.
31+
32+
## Running the tests
33+
34+
```bash
35+
./run.sh --with-tests
36+
```
37+
38+
The test runner ingests an AIS dataset before running the integration tests. Expect ~23 minutes on first run if the JSON data file is not yet cached, ~21 seconds on subsequent runs.
39+
40+
## Filing issues
41+
42+
Please use the issue templates under `.github/ISSUE_TEMPLATE/`:
43+
44+
- **Bug report** — for unexpected behaviour, errors, or test failures.
45+
- **Feature request** — for new endpoints, OGC-compliance improvements, or integration with other backends.
46+
47+
Include the smallest reproducible example you can. For OGC-conformance issues, please reference the relevant section of the [OGC API – Moving Features Standard](https://docs.ogc.org/is/22-003r3/22-003r3.html).
48+
49+
## Pull requests
50+
51+
- Branch from `master`. Use a descriptive branch name (`fix/`, `feat/`, `refactor/` prefix is encouraged).
52+
- Keep PRs focused — one logical change per PR.
53+
- Use the PR template under `.github/PULL_REQUEST_TEMPLATE.md`.
54+
- Verify tests pass locally before opening the PR.
55+
- Reference any related issues with `Fixes #N` or `Refs #N` in the description.
56+
57+
## Code style
58+
59+
Python source follows [PEP 8](https://peps.python.org/pep-0008/). The CI runs `ruff check` on every PR — please run it locally before pushing:
60+
61+
```bash
62+
pip install ruff
63+
ruff check .
64+
```
65+
66+
## Lineage
67+
68+
MobilityAPI builds on the foundation of [pg_mfserv](https://github.com/MobilityDB/pg_mfserv), an OGC API – Moving Features prototype authored at ULB in 2024. See [`AUTHORS.md`](AUTHORS.md) for the contributor history across both phases of the project.
69+
70+
## License
71+
72+
By contributing, you agree that your contributions will be licensed under the project's [PostgreSQL License](LICENSE.txt).

LICENSE.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
-------------------------------------------------------------------------------
2+
This MobilityAPI code is provided under The PostgreSQL License.
3+
4+
Copyright (c) 2024, Université libre de Bruxelles and MobilityAPI contributors
5+
6+
Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby
7+
granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.
8+
9+
IN NO EVENT SHALL UNIVERSITE LIBRE DE BRUXELLES BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST
10+
PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF UNIVERSITE LIBRE DE BRUXELLES HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
11+
DAMAGE.
12+
13+
UNIVERSITE LIBRE DE BRUXELLES SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14+
FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND UNIVERSITE LIBRE DE BRUXELLES HAS NO OBLIGATIONS TO PROVIDE
15+
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
16+
-------------------------------------------------------------------------------

README.md

Lines changed: 107 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,107 @@
1-
2-
MobilityAPI
3-
===============
4-
An open source implementation of the [OGC](https://www.ogc.org/) [Moving-Features API](https://ogcapi.ogc.org/movingfeatures/overview.html) based on [MobilityDB](https://github.com/MobilityDB/MobilityDB/)
5-
6-
<img src="doc/images/mobilitydb-logo.svg" width="200" alt="MobilityDB Logo" />
7-
8-
MobilityDB is developed by the Computer & Decision Engineering Department of the [Université libre de Bruxelles](https://www.ulb.be/) (ULB) under the direction of [Prof. Esteban Zimányi](http://cs.ulb.ac.be/members/esteban/). ULB is an OGC Associate Member and member of the OGC Moving Feature Standard Working Group ([MF-SWG](https://www.ogc.org/projects/groups/movfeatswg)).
9-
10-
<img src="doc/images/OGC_Associate_Member_3DR.png" width="100" alt="OGC Associate Member Logo" />
11-
12-
More information about MobilityDB, including publications, presentations, etc., can be found in the MobilityDB [website](https://mobilitydb.com).
13-
14-
## Introduction
15-
This Python API server provides endpoints for interacting with MobilityDB, a temporal extension for PostgreSQL. It allows users to perform CRUD operations (Create, Read, Update, Delete) on MobilityDB data using HTTP methods.
16-
17-
## Features
18-
- Supports GET, POST, PUT, and DELETE operations.
19-
- Integrates the PyMEOS library for seamless interaction with MobilityDB.
20-
- Provides endpoints for managing data stored in MobilityDB.
21-
22-
## Prerequisites
23-
- Linux (ubuntu)
24-
- A recent version of Pyhton
25-
26-
27-
## RUN SERVER
28-
- Make script executable: chmod +x run.sh
29-
- Run only the server: ./run.sh
30-
#### RUN SERVER WITH TESTS
31-
- Run with integration tests: ./run.sh --with-tests
32-
(note: this takes a while due to data preprocessing - expect 23 min if the json data file is not present, 21 sec otherwise )
33-
- If necessary, download ships datasets from: [Denmark Ships DataSets](http://aisdata.ais.dk/?prefix=2024/) aisdk_2024-08-07.zip in data folder
34-
- Manual get requests links on demo.txt
35-
## Usage
36-
Send http requests to the api using any http service.
37-
As an example, your can use the ais.sql that will create ships and ship2 tables containing ships data.
38-
To do that you will have to change the path in the script to the path of your .csv file.
39-
Here is a link to download ships datasets: [Denmark Ships DataSets](http://aisdata.ais.dk/?prefix=2024/)
40-
## Developement
41-
This project is in progress.
42-
43-
## History and Acknowledgements
44-
45-
MobilityAPI builds on the foundation laid by **[pg_mfserv](https://github.com/MobilityDB/pg_mfserv)**, an OGC API – Moving Features prototype authored at ULB in early 2024. The pg_mfserv initial implementation provided the Python-server skeleton, the OGC endpoint shape, and the PyMEOS-based MobilityDB integration pattern that MobilityAPI extends with a structured resource layout, comprehensive test coverage, and OGC-conformant request/response handling.
46-
47-
**pg_mfserv** is preserved in archived form at [`MobilityDB/pg_mfserv`](https://github.com/MobilityDB/pg_mfserv) for historical reference and scholarly attribution; active development continues in this repository.
48-
49-
Contributors to the lineage, in chronological order:
50-
51-
- **Maxime Schoemans** ([@mschoema](https://github.com/mschoema)) — pg_mfserv founding author (initial commit, OGC-API endpoint design).
52-
- **Victor Morabito** ([@MrMaxime1er](https://github.com/MrMaxime1er)) — pg_mfserv main developer (column-discovery, request handling, exception handling, route refactors — March 2024).
53-
- **Sirine Meraoui** ([@sirimeraoui](https://github.com/sirimeraoui)) — current MobilityAPI maintainer (structured resource layout, test infrastructure, OGC conformance, documentation).
54-
55-
See [`AUTHORS.md`](AUTHORS.md) for the complete contributor list.
56-
57-
## License
58-
##Poetry
59-
poetry install
60-
61-
62-
1+
MobilityAPI
2+
===========
3+
4+
[![License: PostgreSQL](https://img.shields.io/badge/License-PostgreSQL-blue.svg)](LICENSE.txt)
5+
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/)
6+
[![OGC API – Moving Features](https://img.shields.io/badge/OGC%20API-Moving%20Features-green.svg)](https://docs.ogc.org/is/22-003r3/22-003r3.html)
7+
8+
An open-source implementation of the [OGC API – Moving Features Standard](https://docs.ogc.org/is/22-003r3/22-003r3.html), built on top of [MobilityDB](https://github.com/MobilityDB/MobilityDB/).
9+
10+
<img src="doc/images/mobilitydb-logo.svg" width="200" alt="MobilityDB Logo" />
11+
12+
MobilityDB is developed by the Computer & Decision Engineering Department of the [Université libre de Bruxelles (ULB)](https://www.ulb.be/) under the direction of [Prof. Esteban Zimányi](http://cs.ulb.ac.be/members/esteban/). ULB is an OGC Associate Member and member of the OGC Moving Feature Standard Working Group ([MF-SWG](https://www.ogc.org/projects/groups/movfeatswg)).
13+
14+
<img src="doc/images/OGC_Associate_Member_3DR.png" width="100" alt="OGC Associate Member Logo" />
15+
16+
More information about MobilityDB and the broader MEOS ecosystem can be found at:
17+
18+
- **MobilityDB website**https://mobilitydb.com
19+
- **MEOS / libmeos.org**https://libmeos.org/ (the canonical C library underlying MobilityDB and MobilityDuck; MobilityAPI is one of its [bindings](https://libmeos.org/bindings/mobilityapi/))
20+
- **OGC API – Moving Features Standard**https://docs.ogc.org/is/22-003r3/22-003r3.html
21+
22+
## Introduction
23+
24+
MobilityAPI is a Python API server that exposes MEOS-stored mobility data through the OGC API – Moving Features standard. It provides REST endpoints (GET / POST / PUT / DELETE) over collections of moving features, suitable for HTTP-driven clients that don't speak SQL or the PostgreSQL wire protocol — browser applications, mobile clients, microservices, ETL pipelines.
25+
26+
The reference implementation runs on top of MobilityDB and consumes [PyMEOS](https://github.com/MobilityDB/PyMEOS) for the temporal-data conversion layer.
27+
28+
## Status
29+
30+
This project is under active development. Existing endpoints implement the core OGC API – Moving Features Standard; coverage of the standard is being progressively extended. See [open issues](https://github.com/MobilityDB/MobilityAPI/issues) for the current roadmap and [discussions](https://github.com/MobilityDB/MobilityAPI/discussions) for design conversations.
31+
32+
## Features
33+
34+
- HTTP endpoints implementing the [OGC API – Moving Features Standard](https://docs.ogc.org/is/22-003r3/22-003r3.html): GET / POST / PUT / DELETE on collections, items, temporal geometries, and temporal properties.
35+
- Built on [PyMEOS](https://github.com/MobilityDB/PyMEOS) for seamless interaction with MobilityDB temporal types.
36+
- Validation of MovingFeaturesJSON payloads on insert.
37+
- Test suite ingesting real-world AIS (Automatic Identification System) ship-trajectory data.
38+
39+
## Prerequisites
40+
41+
- Linux (Ubuntu recommended)
42+
- Python 3.10 or later
43+
- PostgreSQL with the [MobilityDB](https://github.com/MobilityDB/MobilityDB) extension installed
44+
45+
## Install
46+
47+
```bash
48+
pip install -r requirements.txt
49+
```
50+
51+
## Run the server
52+
53+
```bash
54+
chmod +x run.sh
55+
./run.sh
56+
```
57+
58+
The server listens on `localhost:8080` by default. Connection parameters live in `config.json`.
59+
60+
## Run with the test suite
61+
62+
```bash
63+
./run.sh --with-tests
64+
```
65+
66+
The test runner ingests an AIS dataset before running the integration tests:
67+
68+
- ~23 minutes on first run if the JSON data file is not yet cached.
69+
- ~21 seconds on subsequent runs.
70+
71+
If you need the AIS dataset, download `aisdk_2024-08-07.zip` from the [Danish Maritime Authority feed](http://aisdata.ais.dk/?prefix=2024/) into the `data/` folder. Manual GET request examples are in [`demo.txt`](demo.txt).
72+
73+
## Usage
74+
75+
Send HTTP requests to the API using any HTTP client. As an example, the `ais.sql` script will create `ships` and `ship2` tables containing ships data — change the CSV path in the script to point at your downloaded dataset.
76+
77+
## Where MobilityAPI fits
78+
79+
MobilityAPI is the HTTP / OGC layer of the MEOS ecosystem. The other layers are:
80+
81+
- **MEOS** (canonical C library) — the underlying type system and computations.
82+
- **MobilityDB** and **MobilityDuck** — peer SQL layers (PostgreSQL extension and DuckDB extension respectively) that expose MEOS as first-class database types.
83+
- **Language bindings**[PyMEOS](https://github.com/MobilityDB/PyMEOS), [JMEOS](https://github.com/MobilityDB/JMEOS), [meos-rs](https://github.com/MobilityDB/meos-rs), [GoMEOS](https://github.com/MobilityDB/GoMEOS), [MEOS.NET](https://github.com/MobilityDB/MEOS.NET), [MEOS.js](https://github.com/MobilityDB/MEOS.js).
84+
85+
A [longer overview](https://libmeos.org/) is available on libmeos.org.
86+
87+
## Contributing
88+
89+
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for development setup, test instructions, code style, and PR conventions. Issues and pull requests are welcome.
90+
91+
## History and Acknowledgements
92+
93+
MobilityAPI builds on the foundation laid by **[pg_mfserv](https://github.com/MobilityDB/pg_mfserv)**, an OGC API – Moving Features prototype authored at ULB in early 2024. The pg_mfserv initial implementation provided the Python-server skeleton, the OGC endpoint shape, and the PyMEOS-based MobilityDB integration pattern that MobilityAPI extends with a structured resource layout, comprehensive test coverage, and OGC-conformant request/response handling.
94+
95+
**pg_mfserv** is preserved in archived form at [`MobilityDB/pg_mfserv`](https://github.com/MobilityDB/pg_mfserv) for historical reference and scholarly attribution; active development continues in this repository.
96+
97+
Contributors to the lineage, in chronological order:
98+
99+
- **Maxime Schoemans** ([@mschoema](https://github.com/mschoema)) — pg_mfserv founding author (initial commit, OGC-API endpoint design).
100+
- **Victor Morabito** ([@MrMaxime1er](https://github.com/MrMaxime1er)) — pg_mfserv main developer (column-discovery, request handling, exception handling, route refactors — March 2024).
101+
- **Sirine Meraoui** ([@sirimeraoui](https://github.com/sirimeraoui)) — current MobilityAPI maintainer (structured resource layout, test infrastructure, OGC conformance, documentation).
102+
103+
See [`AUTHORS.md`](AUTHORS.md) for the complete contributor list.
104+
105+
## License
106+
107+
MobilityAPI is released under [The PostgreSQL License](LICENSE.txt). If you use MobilityAPI in academic or technical work, please cite it using the metadata in [`CITATION.cff`](CITATION.cff).

0 commit comments

Comments
 (0)