Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Revert use of search endpoint #370

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Revert use of search endpoint #370

wants to merge 15 commits into from

Conversation

remi-dupre
Copy link
Contributor

@remi-dupre remi-dupre commented Jul 19, 2022

Master, but without f9448d2, thanks to git rebase -i f70cc280b1eb22b687dcecee462ad28b46c7a841 magic

@remi-dupre remi-dupre self-assigned this Jul 19, 2022
@remi-dupre remi-dupre force-pushed the rm-search-endpoint branch from b084255 to 69b677f Compare July 19, 2022 15:07
@remi-dupre remi-dupre changed the title Remove search endpoint Revert use of search endpoint Jul 19, 2022
@remi-dupre remi-dupre marked this pull request as ready for review July 19, 2022 15:18
remi-dupre and others added 9 commits July 20, 2022 09:15
* rate limiter disabled for requests with no client hash

As we have no way to determine were the requests with no hash comes from,
there is not really any reason to perform the rate limiting for them:

 - if it comes from another internal component (eg. Erdapfel), it feels
   reasonable to just display a warning as said component should forward
   the header.

 - if the ha proxy fails to set the header value, it also feels better
   to just display a warning instead of penalizing the client for the
   overall traffic bandwidth.

 - the only other scenario I can think is some kind of internal stress
   test, which we are currently performing, in which case it is more
   convenient if the rate limiter is disabled.

* fix rate limiter test
* upgrade black and httpx

* upgrade black

* fix format

* fix lint

Co-authored-by: sdirollo <[email protected]>
* clean combigo direction code

* fix lint

* fix lint

* fix tests

* fix test and remove unused variable qwant direction

Co-authored-by: sdirollo <[email protected]>
* start navitia poc

* navitia poc: minimum working example

* cut linestring at instructions

* show directions (seems consistent for bikes)

* poc navitia: fix missing instructions for bikes

* poc navitia: fix cars and tweak some parameters

* s/NAVITIA/HOVE/g

* fix geojson construction for public transports summary

* moev navitia datasource into its own module

* rename navitia module into hove

* update to python 3.10 and fix line color correspondances

* fix unknown section modes

* hove: get leg distances from geometry

* update Python in the CI

* fix lints

* fix docker image

* remove pympler

* use alpine instead of debian

* fix Dockerfile paths

* install less dependancies in Dockerfile

* use a builder docker image to remove build dependancies from publish

* update to Python 3.10 in tests

* Dockerfile: fix user creation

* Dockerfile: fix apk permissions

* use alpine instead of debian

* fix

* fix

* remove chown useless

* fix ghost dependancies

* Dockerfile: remove last chown

* Dockerfile: fix prometheus permissions

* Dockerfile: replace ADD commands with COPY

Docker discourages using the ADD command for a general purpose. See
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy.

Co-authored-by: Rémi Dupré <[email protected]>
Co-authored-by: Aureliano Sinatra <[email protected]>
* pipenv update

* update fastapi and elasticsearch

* remove ipython dependency

* update black configuration to target Python 3.10
* use cache for docker images build

This should speedup builds by skipping the build of Python packages on
alpine for consecutive commits in a branch.

* update README.md

I mostly needed some superficial diff to test the cache.

* actions: use branch name as cache ref

This should help, the cache mechanism worked for pull_request but not
for specific commit ref.

* update README.md

Still just need it to test cache, that's a cool way to get motivated to
fix some outdated informations in the README.

* actions: fix docker cache ref

* update README.md

* actions: use github cache mechanism to build images

I don't manage to get it working with inline mode.

* update README.md
Add public transport support through Hove's API.

This is built by building a translation layer that will convert Hove's API
result into a format mostly compatible with Mapbox (a few structures are
extended with new fields), which can be interpreted by Erdapfel seamlessly and
in the same fashion as with former Combigo API.

I also took my change to move every directions-related stuff in
`idunn.datasources.directions`, which means a bit of refactoring in the mapbox
client.
* directions: specify arrive_by or depart_at parameters

* directions: fix arrive/depart query params

* directions: add basic tests for arrive_by/depart_at

* tiny lint fixes

* tiny lint fixes in tests
@remi-dupre remi-dupre force-pushed the rm-search-endpoint branch from 69b677f to 82d816a Compare July 20, 2022 07:19
@sdrll sdrll self-requested a review July 20, 2022 07:29
Current behavior was to rely on raise_for_status which would just raise
a 500 and not be very informative.
sdrll and others added 2 commits August 9, 2022 15:28
* generic ia for all maps request beginning with mappy ...

* Update patterns_to_ignore.txt

onjly ignore mappy word

* add pattern for derivate mappy top query

Co-authored-by: sdirollo <[email protected]>
* generic ia for all maps request beginning with mappy ...

* Update patterns_to_ignore.txt

onjly ignore mappy word

* add pattern for derivate mappy top query

* remove instruction without street name and with distance equal to 0

Co-authored-by: sdirollo <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants