-
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
Validateur NeTEx : validation "à la demande" #4158
Conversation
47e19b1
to
dadbc59
Compare
dadbc59
to
8403b88
Compare
Après plusieurs passages, je suis arrivé à la conclusion qu'extraire dans d'autres PRs plus petites certains de ces changements serait trop artificiel. Je la sors donc de draft pour qu'on puisse la review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Très bon boulot @ptitfred, félicitations 👏 Bravo d'avoir réussi à comprendre et modifier la validation à la demande et les différents templates. La mise en commun GTFS / NeTEx est à saluer !
Je t'ai fait quelques suggestions/point d'attention. Ce sera bon bientôt à envoyer en production.
@@ -104,6 +104,71 @@ defmodule Shared.DateTimeDisplay do | |||
|
|||
def format_datetime_to_paris(nil, _, _), do: "" | |||
|
|||
@doc """ | |||
Formats a duration in seconds to display, according to a locale. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si tu souhaites, on a déjà :cldr_utils
en dépendance et il devrait y avoir moyen d'utiliser https://hexdocs.pm/ex_cldr_calendars/Cldr.Calendar.Duration.html
Il faudrait mettre à jour la liste de providers
use Cldr, locales: ["en", "fr"], providers: [Cldr.Number], default_locale: "fr" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah merci, ça me fendait le coeur de le faire moi-même...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fait.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai dû exclure lib/cldr.ex de dialyzer faute d'avoir une bonne correction. L'erreur :
lib/cldr.ex:1:overlapping_contract
Overloaded contract for Transport.Cldr.Calendar.localize/3 has
overlapping domains; such contracts are currently unsupported and
are simply ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu peux ouvrir une issue là-bas ? J'étais tombé sur un bug similaire récemment elixir-cldr/cldr#236
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apps/transport/lib/transport_web/controllers/validation_controller.ex
Outdated
Show resolved
Hide resolved
apps/transport/lib/transport_web/templates/resource/_netex_generic_issue.html.heex
Outdated
Show resolved
Hide resolved
apps/transport/lib/transport_web/templates/resource/_netex_generic_issue.html.heex
Show resolved
Hide resolved
apps/transport/lib/transport_web/templates/resource/_resources_details.html.heex
Show resolved
Hide resolved
apps/transport/lib/transport_web/templates/validation/show_netex.html.heex
Outdated
Show resolved
Hide resolved
apps/transport/priv/gettext/fr/LC_MESSAGES/validations-explanations.po
Outdated
Show resolved
Hide resolved
Dialyzer is mean to me. |
Merci ; je pense que c'est à jour en réaction à tes commentaires. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci pour la prise en compte de mes suggestions et les améliorations apportées 👏
Cette PR introduit le support du format NeTEx dans la validation à la demande en ajustant le job
Transport.Jobs.OnDemandValidationJob
et le controlleur et templates associés du validateur à la demande.Des aperçus du résultat de la validation :
Les résultats de validation ne sont pas encore en effet très utile au grand public.
Voir #4153.