Skip to content

develop - #2

Open
rimi-itk wants to merge 113 commits into
mainfrom
develop
Open

rimi-itk wants to merge 113 commits into
mainfrom
develop

Conversation

@rimi-itk

@rimi-itk rimi-itk commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The initial mess …

  • Adds DDEV and Symfony
  • Adds some experiments …
  • Adds ITKDev project template

@rimi-itk
rimi-itk marked this pull request as ready for review September 1, 2026 09:08
jeppekroghitk and others added 30 commits September 14, 2026 12:30
…tom-attribute

Source config as custom attribute
# Conflicts:
#	CHANGELOG.md
#	src/Source/Osm/HandicapParking.php
The test sources were written against the SourceInterface and Definition
as they were before the source refactoring, so they no longer matched:

* Pass the Wgs84Transformer to createNgsiEntity instead of injecting it
  into the constructor, as the real sources now do.
* Forward the new dataType through TestDefinition, and declare it on each
  test source so the right importer unwraps the feed.
* Read the url and query of an accessUrl through Definition rather than
  destructuring the array in every caller, so a source declaring a query
  can be fetched as well as read.

Refreshed the OpenStreetMap test fixture while we were at it.
The access URL was a string|array union: a plain URL, or a map of url and
query for the one source that needs a long Overpass QL script. Two reader
methods hid the union from callers, but the raw property stayed public and
two of its users never learned to disambiguate it.

So the OSM source published its whole Overpass script as the NGSI source
property of every entity, and as access_url in the catalogue, where a URL
belongs. The mapping test asserted the property against the definition it
came from, so it compared the array with itself and passed.

Splitting the query into its own field settles it: the access URL is a
string again and cannot be anything else, accessUrlBase() and
accessUrlQuery() are gone, and their two callers read the properties.
Sources that send no query say nothing, as before.
This reverts commit 14b4dad.

The string|array access URL is the shape feature/source-stuff settled on,
so reshaping it belongs with that work rather than here. This branch stays
what its name says: the test setup aligned with the importer approach.

accessUrlBase() and accessUrlQuery() stay. They are part of that alignment
— they moved the destructuring out of SourceReader::getData so the fetch
command can reach a source's url and query too.
Refactored sources and releated services
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants