mapado / datection

Detect and normalize temporal expressions
0 stars 0 forks source link

add schedule_next_date method for faster access #22

Closed jdeniau closed 4 years ago

jdeniau commented 8 years ago

Pull request :twisted_rightwards_arrows: created by @jnieuviarts on 2016-01-14 15:25 Last updated on 2016-01-15 14:53 Original Bitbucket pull request id: 22

Participants:

  • bitbucket user dream (reviewer) :heavy_check_mark:
  • @jdeniau (reviewer) :heavy_check_mark:
  • @jnieuviarts
  • @dallegoet (reviewer)

Source: https://github.com/mapado/datection/commit/5eff6282932e on branch jn_fix_nextdate_slow Destination: https://github.com/mapado/datection/commit/fd6f4c8caa59 on branch master Merge commit: https://github.com/mapado/datection/commit/c644d4da2b28

State: MERGED

jdeniau commented 8 years ago

Bitbucket user dream approved :heavy_check_mark: the pull request on 2016-01-14 16:03

jdeniau commented 8 years ago

@jdeniau commented on 2016-01-15 07:40

Outdated location: line 236 of datection/export.py

Est-ce qu'on ne devrait pas utiliser le force_lower_bound = datetime.now ?

jdeniau commented 8 years ago

@jdeniau commented on 2016-01-15 07:40

Outdated location: line 238 of datection/export.py

Il vaut mieux stocker la valeur de now en dehors de la boucle for, sinon tu la recalcule à chaque itération

jdeniau commented 8 years ago

@jnieuviarts commented on 2016-01-15 08:55

Location: datection/export.py

Il vaut mieux stocker la valeur de now en dehors de la boucle for, sinon tu la recalcule à chaque itération

Bien vu ;-)

jdeniau commented 8 years ago

@jnieuviarts commented on 2016-01-15 08:57

Location: datection/export.py

Est-ce qu'on ne devrait pas utiliser le force_lower_bound = datetime.now ?

En effet, bonne idée. J'ai par contre conservé le test pour gérer le cas "None" renvoyé par l'itérateur.

J'ai aussi ajouté une condition dans l'itérateur qui ne gérait pas le cas ou le lower_bound était déjà un datetime (le time était écrasé)

jdeniau commented 8 years ago

@jdeniau approved :heavy_check_mark: the pull request on 2016-01-15 14:17