No description
- Go 85.4%
- PLpgSQL 9.6%
- Shell 3%
- Lua 1.5%
- Dockerfile 0.3%
- Other 0.2%
|
Bora M. Alper
e0c2fd884f
Some checks failed
ci/woodpecker/push/main Pipeline failed
place_osm ( #35 )
## What The unique index `place_osm` that we have defined on `socialmaps.place (osm_type, osm_id)` was causing issues when an existing place was renamed. ## Why For example, [Node #349283463](https://www.openstreetmap.org/node/349283463) was renamed from "Coffee Dock" to "Insomnia" in [changeset #182673214](https://www.openstreetmap.org/changeset/182673214). This meant that there were no matching `socialmaps.place` for the updated `osm2pgsql.element` with the new name (since we're matching places to elements using name + location). When `socialmaps-api` tried to create a new `place` for the given `element` returned in the resultset, it got a database error for trying to violate the uniqueness constraint of the index. ## Notes We need to invest into handling changes to elements in the context of "place permanence". For instance, should the aforementioned rename ("Coffee Dock" → "Insomnia") result in a new place (I think so) or should we treat it as the same cafe and move its existing reviews over? There are no reviews of it at the moment, but we'll have to have a policy around such changes for future. Reviewed-on: #35 |
||
|---|---|---|
| .woodpecker | Set up golangci-lint ( #33 ) | |
| api | many changes | |
| assets | Add osm2pgsql ( #20 ) | |
| cmd/socialmaps-api | Use golang.org/x/crypto/x509roots/fallback ( #27 ) | |
| internal |
Remove unique index place_osm ( #35 )
|
|
| scripts | Set up golangci-lint ( #33 ) | |
| .envrc | Add moderation ( #6 ) | |
| .gitignore | Add moderation ( #6 ) | |
| .sqlfluff | Add osm2pgsql ( #20 ) | |
| .sqlfluffignore | Look up locally using the Osm2pgsql data instead of Nominatim ( #22 ) | |
| AGENTS.md | Switch to PostgreSQL ( #16 ) | |
| COPYING |
License socialmaps-api under AGPL-3.0-only
|
|
| Dockerfile | Bump Go from 1.26.2 to 1.26.3 ( #34 ) | |
| go.mod | Bump Go from 1.26.2 to 1.26.3 ( #34 ) | |
| go.sum | Use golang.org/x/crypto/x509roots/fallback ( #27 ) | |
| LICENSE |
License socialmaps-api under AGPL-3.0-only
|
|
| Makefile | Switch to PostgreSQL ( #16 ) | |
| README.md |
License socialmaps-api under AGPL-3.0-only
|
|
| sqlc.yaml | Add new endpoint "Query Places" and expose OSM data ( #23 ) | |
| staticcheck.conf | Improve OpenAPI spec ( #13 ) | |
Social Maps API
Developing
Install
- direnv https://direnv.net/ for automatically loading the required environment variables.
Copying & License
SPDX-License-Identifier: AGPL-3.0-only
socialmaps-api — API server of Social Maps, a free social map
Copyright © 2025 socialmaps-api contributorsThis program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.