Skip to content

Commit d9d275e

Browse files
Merge branch 'main' into get_template
2 parents d3f6e1e + 5b6135a commit d9d275e

File tree

269 files changed

+17251
-9991
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

269 files changed

+17251
-9991
lines changed

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Closes #
1111

1212
### Checklist
1313
- [ ] I have updated my branch to `main` (e.g. through `git rebase main`)
14-
- [ ] My code follows the [style guide](https://github.com/GIScience/ohsome-quality-analyst/blob/main/CONTRIBUTING.md#style-guide) and was checked with [pre-commit](https://github.com/GIScience/ohsome-quality-analyst/blob/main/CONTRIBUTING.md#pre-commit) before committing
14+
- [ ] My code follows the [style guide](https://github.com/GIScience/ohsome-quality-api/blob/main/CONTRIBUTING.md#style-guide) and was checked with [pre-commit](https://github.com/GIScience/ohsome-quality-api/blob/main/CONTRIBUTING.md#pre-commit) before committing
1515
- [ ] I have commented my code
16-
- [ ] I have added sufficient unit and integration [tests](https://github.com/GIScience/ohsome-quality-analyst/blob/main/docs/development_setup.md#tests)
17-
- [ ] I have updated the [CHANGELOG.md](https://github.com/GIScience/ohsome-quality-analyst/blob/main/CHANGELOG.md)
16+
- [ ] I have added sufficient unit and integration [tests](https://github.com/GIScience/ohsome-quality-api/blob/main/docs/development_setup.md#tests)
17+
- [ ] I have updated the [CHANGELOG.md](https://github.com/GIScience/ohsome-quality-api/blob/main/CHANGELOG.md)
1818

1919
Please check all finished tasks. If some tasks do not apply to your PR, please cross their text out (by using `~...~`) and remove their checkboxes.

Diff for: .gitignore

+7-2
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,14 @@ celerybeat.pid
108108
.env
109109
.venv
110110
env/
111-
venv/
111+
venv*/
112112
ENV/
113113
env.bak/
114114
venv.bak/
115115

116+
# pyenv config
117+
.python-version
118+
116119
# Spyder project settings
117120
.spyderproject
118121
.spyproject
@@ -143,8 +146,10 @@ cython_debug/
143146
# Ruff
144147
.ruff_cache/
145148

146-
# OQT
149+
# oqapi
147150
/data/*
148151
/config/*
149152
!/config/sample.config.yaml
150153
!/config/logging.yaml
154+
/tests/*/fixtures/approved/*.received.txt
155+
/regression-tests/report/

Diff for: .pre-commit-config.yaml

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
repos:
2-
- repo: https://github.com/psf/black
3-
rev: 23.3.0
4-
hooks:
5-
- id: black
6-
args: ["--check", "--diff"]
72
- repo: https://github.com/astral-sh/ruff-pre-commit
83
# Ruff version.
9-
rev: v0.0.275
4+
rev: v0.4.7
105
hooks:
6+
# Run the linter.
117
- id: ruff
8+
# Run the formatter.
9+
- id: ruff-format
10+
args: ["--check", "--diff"]
1211
- repo: https://github.com/pre-commit/pre-commit-hooks
1312
rev: v4.4.0
1413
hooks:

Diff for: CHANGELOG.md

+157-4
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,169 @@
22

33
## Current Main
44

5+
### Breaking Changes
6+
7+
- report endpoint: has been deleted ([#818])
8+
9+
10+
### Other Changes
11+
12+
- a new regression test suite has been added to support safer deployments of new versions ([#820])
13+
14+
15+
16+
[#818]: https://github.com/GIScience/ohsome-quality-api/pull/818
17+
[#820]: https://github.com/GIScience/ohsome-quality-api/issues/820
18+
19+
20+
## Release 1.4.0
21+
22+
23+
### New Features
24+
25+
- attribute-completeness: add workaround for attribute_key to use indicator in dashboard ([#800])
26+
- attribute-completeness: add validation for attribute-topic combination ([#810])
27+
- attribute-completeness: support for metadata and custom end-point ([#810])
28+
- attribute-completeness: improve generation of openAPI documentation ([#810])
29+
30+
31+
### Bug Fixes
32+
33+
- road-comparison: bar for not covered roads is now shown in the plot ([#798])
34+
- attribute-completeness: fix bugs in result figure ([#800])
35+
36+
37+
### Other Changes
38+
39+
- road-comparison: change color of bar to grey ([#798])
40+
- style: run ruff after version upgrade ([#806])
41+
- build: bump ruff version ([#806])
42+
- remove support for raster data from implementation and docs ([#815])
43+
44+
45+
[#798]: https://github.com/GIScience/ohsome-quality-api/pull/798
46+
[#800]: https://github.com/GIScience/ohsome-quality-api/pull/800
47+
[#815]: https://github.com/GIScience/ohsome-quality-api/issues/815
48+
[#810]: https://github.com/GIScience/ohsome-quality-api/pull/810
49+
50+
## Release 1.3.0
51+
52+
### Breaking Changes
53+
54+
- major-roads-length: rename to `roads` and change filter to `highway=* and type:way` ([#786])
55+
56+
### New Features
57+
58+
- road-comparison: add new indicator which compares OSM roads with a reference dataset ([#778, #787, #788])
59+
- building-comparison: support comparison with multiple datasets ([#768])
60+
- building-comparison: improve figure and result description by adding more information ([#777, #789])
61+
62+
### Other Changes
63+
64+
- build: update dependencies (`rpy2` and `fastapi`) ([#775])
65+
- update dependencies ([#785])
66+
- test: use Approval Tests ([#789])
67+
- building-comparison: improve performance of request to database ([#790])
68+
69+
70+
[#768]: https://github.com/GIScience/ohsome-quality-api/pull/768
71+
[#775]: https://github.com/GIScience/ohsome-quality-api/pull/775
72+
[#777]: https://github.com/GIScience/ohsome-quality-api/issues/777
73+
[#778]: https://github.com/GIScience/ohsome-quality-api/issues/778
74+
[#785]: https://github.com/GIScience/ohsome-quality-api/pull/785
75+
[#786]: https://github.com/GIScience/ohsome-quality-api/issues/786
76+
[#787]: https://github.com/GIScience/ohsome-quality-api/issues/787
77+
[#788]: https://github.com/GIScience/ohsome-quality-api/issues/788
78+
[#789]: https://github.com/GIScience/ohsome-quality-api/pull/789
79+
[#790]: https://github.com/GIScience/ohsome-quality-api/pull/790
80+
[#806]: https://github.com/GIScience/ohsome-quality-api/pull/806
81+
82+
## Release 1.2.0
83+
84+
### New Features
85+
86+
- api: add inverse parameter to coverage endpoint ([#762])
87+
- building-comparison: add caching of requests made to the database for EUBUCCO buildings ([#754])
88+
- building-comparison: add indicator to the list of core indicators and as such make it available on the ohsome Dashboard ([#765])
89+
90+
[#754]: https://github.com/GIScience/ohsome-quality-api/pull/754
91+
[#762]: https://github.com/GIScience/ohsome-quality-api/issues/762
92+
[#765]: https://github.com/GIScience/ohsome-quality-api/issues/765
93+
94+
## Release 1.1.1
95+
96+
### Bug Fixes
97+
98+
- fix(building-comparison): Use psycopg AsyncConnection. Database connection was synchronous. ([ba279b2])
99+
100+
[ba279b2]: https://github.com/GIScience/ohsome-quality-api/commit/ba279b23b82404d9f6c377e2a34683b159803359
101+
102+
## Release 1.1.0
103+
104+
### Bug Fixes
105+
106+
- building-comparison: is calculated for coverage area only ([#739])
107+
- building-comparison: result description now shows correct coverage percentage ([#739])
108+
- mapping-saturation: estimated total line is now always plotted, f it is not more than five times as large as the highest value ([#723])
109+
110+
### New Features
111+
112+
- building-comparison: AOI is now clipped to the coverage area ([#739])
113+
- mapping-saturation: add hover info to estimated total data line ([#723])
114+
- building-comparison: now has link to reference datasets ([#741])
115+
- building-comparison: added publication date of reference dataset and OSM Timestamp([#750])
116+
117+
### Other Changes
118+
119+
- building-comparison: no quality estimation for areas with strong difference to reference data ([#739])
120+
- test(db): add missing mock for getting coverage from database in tests ([#739])
121+
- building-comparison: request EUBUCCO database is now much faster ([#743])
122+
123+
[#723]: https://github.com/GIScience/ohsome-quality-api/pull/723
124+
[#739]: https://github.com/GIScience/ohsome-quality-api/pull/739
125+
[#741]: https://github.com/GIScience/ohsome-quality-api/pull/741
126+
[#743]: https://github.com/GIScience/ohsome-quality-api/pull/743
127+
128+
129+
## Release 1.0.2
130+
131+
### Bug Fixes
132+
133+
- crs validation now covers all valid cases ([#721])
134+
135+
### New Features
136+
137+
- feat(figures): colors based on semantic UI CSS ([#591])
138+
- feat(building-comparison): add comparison indicator ([#718])
139+
- feat(api): add endpoint to retrieve coverage ([#718])
140+
- feat(db): query building area and coverage from EUBUCCO ([#718])
141+
142+
[#591]: https://github.com/GIScience/ohsome-quality-api/issues/591
143+
[#718]: https://github.com/GIScience/ohsome-quality-api/pull/718
144+
[#721]: https://github.com/GIScience/ohsome-quality-analyst/pull/721
145+
146+
## Release 1.0.1
147+
148+
- refactor: rename "ohsome quality analyst" (OQT) to "ohsome quality API" (oqapi) ([#685])
149+
150+
[#685]: https://github.com/GIScience/ohsome-quality-api/pull/685
151+
152+
## Release 1.0.0
153+
154+
This release includes a well specified [API](https://oqt.ohsome.org/api/docs) and two core indicators available through the [ohsome dashboard](https://dashboard.ohsome.org/#backend=oqapi).
155+
5156
### Breaking
6157

7158
- api: remove `dataset`, `featureId` and `fidField` parameter ([#634])
8-
- api: computing mapping-saturation indicator for given data is now a separate endpoint ([#642])
159+
- api: computing mapping-saturation indicator for given data is now a separate (hidden) endpoint ([#642])
9160
- cli: remove CLI ([#634])
10-
- api: remove `include_svg`, `include_html` and `flatten` parameter ([#644])
161+
- api: remove `include_svg`, `include_html` `include_data` and `flatten` parameter ([#644])
11162
- api: only accept FeatureCollection as `bpolys` parameter ([#650])
12163

13164
### New Features
14165

15-
- feat(api): add `includeFigure` parameter to `/indicators` endpoint ([#659])
16-
- feat(api): add indicator response models ([#670])
166+
- api: add `includeFigure` parameter to `/indicators` endpoint ([#659])
167+
- api: add indicator response models ([#670])
17168

18169
### Other Changes
19170

@@ -38,6 +189,7 @@
38189
- now uses topic specific thresholds for bin creation ([#668])
39190
- plot now shows relative and absolute contributions ([#668])
40191
- further improvements to description and plot ([#668])
192+
- using a geojson with wrong projection now throws specific error ([#667])
41193
- mapping-saturation: now shows the estimated total data in the plot ([#658])
42194

43195
[#589]: https://github.com/GIScience/ohsome-quality-analyst/pull/589
@@ -57,6 +209,7 @@
57209
[#656]: https://github.com/GIScience/ohsome-quality-analyst/pull/656
58210
[#658]: https://github.com/GIScience/ohsome-quality-analyst/pull/658
59211
[#659]: https://github.com/GIScience/ohsome-quality-analyst/pull/659
212+
[#667]: https://github.com/GIScience/ohsome-quality-analyst/pull/667
60213
[#668]: https://github.com/GIScience/ohsome-quality-analyst/pull/668
61214
[#669]: https://github.com/GIScience/ohsome-quality-analyst/pull/669
62215
[#670]: https://github.com/GIScience/ohsome-quality-analyst/pull/670

Diff for: CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## How to Contribute
44

5-
Please contribute to this repository through creating [issues](https://github.com/GIScience/ohsome-quality-analyst/issues/new) and [pull requests](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests).
5+
Please contribute to this repository through creating [issues](https://github.com/GIScience/ohsome-quality-api/issues/new) and [pull requests](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests).
66

77

88
### Issues
@@ -47,13 +47,13 @@ All development work is based on the main branch (`main`). Merge requests are ex
4747

4848
### Tools
4949

50-
This project uses [`black`](https://github.com/psf/black) and [`ruff`](https://github.com/astral-sh/ruff) to ensure consistent code style. See the `pyproject.toml` file for configuration.
50+
This project uses [`ruff`](https://github.com/astral-sh/ruff) to ensure consistent code style. See the `pyproject.toml` file for configuration.
5151

5252

5353
#### A Note on the Configuration
5454

5555
```bash
56-
poetry run black .
56+
poetry run ruff format .
5757
poetry run ruff .
5858
```
5959

Diff for: COPYRIGHTS.md

+8-14
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,11 @@ Please have a look at the API response field `attribution` to figure out which o
4646
- Attribution and use conditions: The development indicators available at the GDL Website can be freely downloaded and used by any interested person or party, provided that the Global Data Lab is mentioned as the source of the indicators and a link to the GDL Website is shown.
4747

4848

49-
## OQT Regions
50-
51-
Region geometry for which OQT provides pre-computed results.
52-
53-
### GADM
54-
55-
- Source: https://gadm.org/license.html
56-
- Attribution and use condition: The data are freely available for academic use and other non-commercial use. Redistribution or commercial use is not allowed without prior permission.
57-
58-
59-
### Nomenclature of Territorial Units for Statistics (NUTS)
60-
61-
- Source: https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units
62-
- Attribution and use condition: (1) The data will not be used for commercial purposes; (2) The source will be acknowledged.
49+
## EUBUCCO
50+
51+
- Source: https://eubucco.com/data/
52+
- Attribution and use conditions: The EUBUCCO database is composed of files under different licenses:
53+
- ODbL: Default (95+%)
54+
- CC-BY-SA: Prague (v0_1-CZE_11-OTHER-LICENSE-CC-BY-SA.zip)
55+
- CC-BY-NC: Abruzzo (v0_1-ITA_1-OTHER-LICENSE-CC-BY-NC.zip)
56+
- Citation: `Milojevic-Dupont, N., Wagner, F., Nachtigall, F. et al. EUBUCCO v0.1: European building stock characteristics in a common and open database for 200+ million individual buildings. Sci Data 10, 147 (2023). https://doi.org/10.1038/s41597-023-02040-2`

Diff for: Dockerfile

+17-12
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# we have to use bullseye, because bookworm doesn't work with older Docker versions which are still in use
33
FROM python:3.10-bullseye
44

5+
# Allow to set custom uid and gid values (i.e. for CI)
6+
ARG uid=1000
7+
ARG gid=1000
8+
59
# install R
610
# to avoid caching issues combine apt-get update and install in one RUN statement.
711
# to reduce image size, clean up the apt cache by removing /var/lib/apt/lists.
@@ -10,24 +14,25 @@ RUN apt-get update && \
1014
rm -rf /var/lib/apt/lists/*
1115

1216
# within docker container: run without root privileges
13-
RUN useradd -md /home/oqt oqt
14-
WORKDIR /opt/oqt
15-
RUN chown oqt:oqt . -R
16-
USER oqt:oqt
17+
RUN groupadd -g "$gid" oqapi
18+
RUN useradd -l -md /home/oqapi -u "$uid" -g "$gid" oqapi
19+
WORKDIR /opt/oqapi
20+
RUN pip install --no-cache-dir poetry
21+
RUN chown oqapi:oqapi . -R
22+
USER oqapi:oqapi
1723

1824
# make poetry binaries available to the docker container user
19-
ENV PATH=$PATH:/home/oqt/.local/bin
25+
ENV PATH=$PATH:/home/oqapi/.local/bin
2026

2127
# install only the dependencies
22-
COPY --chown=oqt:oqt pyproject.toml pyproject.toml
23-
COPY --chown=oqt:oqt poetry.lock poetry.lock
24-
RUN pip install --no-cache-dir poetry
28+
COPY --chown=oqapi:oqapi pyproject.toml pyproject.toml
29+
COPY --chown=oqapi:oqapi poetry.lock poetry.lock
2530
RUN python -m poetry install --no-ansi --no-interaction --no-root
2631

2732
# copy all the other files and install the project
28-
COPY --chown=oqt:oqt ohsome_quality_analyst ohsome_quality_analyst
29-
COPY --chown=oqt:oqt tests tests
30-
COPY --chown=oqt:oqt scripts/start_api.py scripts/start_api.py
31-
COPY --chown=oqt:oqt config/logging.yaml config/logging.yaml
33+
COPY --chown=oqapi:oqapi ohsome_quality_api ohsome_quality_api
34+
COPY --chown=oqapi:oqapi tests tests
35+
COPY --chown=oqapi:oqapi scripts/start_api.py scripts/start_api.py
36+
COPY --chown=oqapi:oqapi config/logging.yaml config/logging.yaml
3237
RUN python -m poetry install --no-ansi --no-interaction
3338

Diff for: Dockerfile.continuous-integration

-14
This file was deleted.

0 commit comments

Comments
 (0)