-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Évaluer les validateurs GBFS #1891
Comments
J'ai testé gbfs-validator via l'API "cachée", voici ce que j'obtiens. Extraction des donnéesPremière étape, sortir une liste des select r.dataset_id, d.datagouv_id, d.slug, r.url
from dataset d
join resource r on d.id = r.dataset_id
where d.type = 'bike-scooter-sharing' and d.is_active
and (r.url like '%gbfs.json' or r.format = 'gbfs') and not r.url ~ 'station|free_bike' me donne 23 lignes sur les 28 jeux de données, sans doublon de J'enregistre ceci dans un Appel de l'APIJe fais le code Python 🐍 suivant (pas taper) import requests
import csv
def is_valid_gbfs(url):
response = requests.post(
"https://gbfs-validator.netlify.app/.netlify/functions/validator",
json={"url": url},
headers={"user-agent": "[email protected]"},
)
try:
response.raise_for_status()
except requests.RequestException as e:
print(f"request failed {str(e)}")
return
return response.json()["summary"]
with open("urls.csv") as f:
reader = csv.DictReader(f)
for row in reader:
print(row["url"])
print(is_valid_gbfs(row["url"])) et j'obtiens l'output suivant en quelques seconds
plutôt satisfaisant ! |
J'en profite pour signaler l'erreur de timeout pour le GBFS de Smoove à Paris MobilityData/gbfs-validator#55 |
J'ai contacté par email Pony pour les erreurs GBFS pour les URLS |
J'ai ouvert une PR MobilityData/gbfs-validator#56 pour pouvoir passer directement une URL de GBFS au validateur web (par exemple https://gbfs-validator.netlify.app/?url=https://transport.data.gouv.fr/gbfs/amiens/gbfs.json). On pourrait s'en servir pour afficher un nombre d'erreurs sur le PAN et faire un lien vers le validateur GBFS, dans un premier temps. |
J'ai envoyé un email à Grenoble pour les informer des erreurs sur les flux GBFS de Tier et Pony |
Fait dans la PR citée ! |
Nous avons l'ambition d'avoir un validateur GBFS sur le PAN. Un outil web, une API, une redirection vers d'autres outils, de la documentation uniquement, on ne sait pas encore.
Cette issue listera ce que j'ai fait et trouvé concernant cette fonctionnalité.
Première étape, j'ai regardé la liste des outils GBFS qui ne comporte qu'un seul validateur, MobilityData/gbfs-validator.
J'ai demandé si on pouvait l'utiliser en CLI ou en API MobilityData/gbfs-validator#53
The text was updated successfully, but these errors were encountered: