26 Oct 2019 |
@jzapp:matrix.org | @timvde:matrix.org: I'm quite sure I've seen the hour:minute format, yeah. We are doing quite a lot already to parse nonstandard formats, since a lot of recipe websites are honestly just poorly made | 06:23:25 |
timvde | I saw that, yes :p | 06:52:41 |
timvde | So okay, I'll add that regex (when I get back) | 06:53:13 |
danielroehrig | Couldn't we just use minutes? Recipes seldom take longer than an hour and even then 120 minutes is easy to understand. I found it to be quite cumbersome to enter the time the way it is to be honest | 06:53:42 |
timvde | We will support plain minutes after my change | 06:54:31 |
@jzapp:matrix.org | @danielroehrig:matrix.org: that's unrelated to the issue @timvde:matrix.org is solving, but I agree we could make the input easier | 06:54:33 |
danielroehrig | I know, it's just something I struggled with. | 06:55:06 |
@jzapp:matrix.org | Oh right, forget my comment, we will support any time signature after this updatr | 06:55:10 |
danielroehrig | Yay! | 06:55:23 |
timvde | Check my regex here: https://github.com/mrzapp/nextcloud-cookbook/issues/95#issuecomment-546297778 | 06:55:50 |
danielroehrig | That sounded sarcastic. But I meant it | 06:55:59 |
timvde | But I'm out for the weekend, so I'll probably only write the patch tomorrow evening or Monday | 06:57:10 |
timvde | But yea, good point about manual input. Even if websites always use nice ISO-8601, it's also just easier for users | 06:57:55 |
timvde | And it should change "120" to "PT2H0M" too, which shows as "2:00" | 06:59:22 |
danielroehrig | We should write unit tests for the parser. | 07:00:08 |
timvde | (Atm as "2:0", but I'll fix that too) | 07:00:19 |
timvde | Agreed, but I'm not a php dev, so I know nothibg about unit testing frameworks at all | 07:00:40 |
timvde | But if you add it, I'll gladly write tests | 07:00:58 |
danielroehrig | Oh, phpunit is in place and working. Point me at he method and I will gladly test the hell out of it | 07:01:55 |
danielroehrig | ...in my 45 minutes of spare time every other day so it might take a few days | 07:02:37 |
timvde | Just add some tests for me that I can copy :P | 07:02:51 |
danielroehrig | There are some tests available | 07:03:09 |
danielroehrig | In tests/unit | 07:03:17 |
timvde | Oh, totally missed that | 07:03:24 |
timvde | Great, I'll add tests then | 07:03:31 |
timvde | My previous PR should totally have been rejected then | 07:03:50 |
danielroehrig | You'd be the first. :,-) | 07:03:59 |
timvde | At work, we have 100% unit test coverage and 95%+ e2e coverage | 07:04:45 |
timvde | You get used to writing tests, and the benefits are real | 07:05:22 |
danielroehrig | You don't have to sell me to the idea of testing. That's preaching to the choir | 07:10:20 |