Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Pav A
    @rs2
    @pganssle Please can you review https://github.com/dateutil/dateutil/pull/749/
    Pav A
    @rs2
    Also the 1995 Kiritimati test results are platform-dependent: https://ci.appveyor.com/project/dateutil/dateutil/build/2.3.1455/job/2d5pece9qpxlbe4w vs https://travis-ci.org/dateutil/dateutil/jobs/389742832. KIR should be west of the International date line from 1995, i.e. 2 Jan in the test.
    Paul Ganssle
    @pganssle
    Johannes Löthberg
    @kyrias
    Hey, I'm looking into a problem in the python-iCalendar test suite using dateutil 2.7, but I got a bit sidetracked because it seems the dateutil exception thrown is actually wrong.
    The problem is when the test suite is trying to parse https://github.com/collective/icalendar/blob/2003b292f63ef834a153cdd68c912b6686856b1e/src/icalendar/tests/america_new_york.ics#L7. The exception thrown says 'RRULE UNTIL values must be specified in UTC when DTSTART is timezone-aware', but here the UNTIL value is in UTC, while DTSTART is tz-naive.
    And I'm unclear as to whether the exception is just incorrectly worded, or if the test ics file is incorrect.
    Johannes Löthberg
    @kyrias
    Ah, just found the place in the RFC, and it seems like the exception message is indeed incorrectly worded.
    Paul Ganssle
    @pganssle
    I suppose you could take the if to be if and only if in that situation.
    Paul Ganssle
    @pganssle
    Oh I guess it's actually a "when"
    Matt Cooper
    @vtbassmatt
    Hey hey. Normally I would send you a phone number, but I'm in an all-afternoon training right now so chat is better :)
    Our test analytics stuff (currently) requires you to upload JUnit (or NUnit, or TRX, or a bunch of other formats) results in order to track them. Instead of making you call a REST API or something, we have a "PublishTestResults" task.
    Paul Ganssle
    @pganssle
    Ah.
    Is there any way to upload an artifact to somewhere where we can look at it?
    Matt Cooper
    @vtbassmatt
    Since the "docs" leg doesn't create any JUnit results, the PublishTestResults task was throwing a warning about no results found. That's not a problem, it's intended, so I just made that step skip when running the Docs job
    Yes! There's a PublishBuildArtifacts task which will create an "artifact" that then gets attached to the build.
    You can download a ZIP after the build finishes.
    Paul Ganssle
    @pganssle
    Hm... Would be preferable if we could view the contents directly like a website, though a zip file would still be an improvement over "clone the PR branch and build the docs"
    I might just bite the bullet on permissions and go with netlify.
    Matt Cooper
    @vtbassmatt
    Yeah... that's one I've heard a few times. You can string something together with an Azure static content publishing feature, but we haven't made that seamless and easy yet. In fact, I ran out of time to publish the blog post I was trying to write on the topic.
    Paul Ganssle
    @pganssle
    Yeah, no problem. I think Steve Dower was planning on doing something similar for CPython's documentation.
    Matt Cooper
    @vtbassmatt
    I got it working somewhere... let me find that link
    Paul Ganssle
    @pganssle
    On the other question - are the permissions going to be automatically linked to the GH org? Is there any way to achieve that?
    Matt Cooper
    @vtbassmatt
    Yeah, was just about to mention that.
    We don't have that feature yet. It's something we desperately want to do.
    Paul Ganssle
    @pganssle
    It's not a big deal if not, I just know that I've had that problem with Appveyor especially. When I inherited the dateutil config I ended up getting access to some private Google appveyor jobs because it was linked to the former maintainer's appveyor account.
    Matt Cooper
    @vtbassmatt
    In the short term, it won't actually affect you much. You can set up an account with us, but the project is world-readable (well, you have to set it that way), and almost all the interaction happens from GitHub.
    Paul Ganssle
    @pganssle
    Fixed that up but it's something I'd like to avoid. For now I don't think it will be a problem, I'll just create a custom live account for dateutil.
    Matt Cooper
    @vtbassmatt
    Yeah. That's the problem for now.
    Or, you can add several other people as administrators.
    Paul Ganssle
    @pganssle
    Yeah, dateutil is a pretty small project so I'm less worried about that.
    I imagine it'll come soon enough anyway since GH is owned by MS now.
    Matt Cooper
    @vtbassmatt
    But yeah... I'm hopeful we get to sync permissions soon. I'm not involved in any work there but I know it's going to happen.
    Found where I got this working on Azure static sites: https://github.com/vtbassmatt/static-site-test
    Paul Ganssle
    @pganssle
    Anyway, thanks for all the help. I do think this will be useful for the sprint, so very timely!
    Matt Cooper
    @vtbassmatt
    Great, thank you so much! If we can do anything else to support you, don't hesitate to reach out
    I don't check work mail on weekends, but you can always tag me on GitHub and it goes to my personal mail.
    Paul Ganssle
    @pganssle
    No worries. I wouldn't want you to have to work on the weekends anyway :P
    Matt Cooper
    @vtbassmatt
    I try to hold the line. It's hard sometimes :)
    Anyhow... back to this training. TTYL and good luck with the sprint!
    Paul Ganssle
    @pganssle
    Thanks, enjoy the training!
    Matthew Gilbert
    @matthewgilbert

    Was hoping to get a bit of feedback on designing a rrule. I'm wondering what the best way to create a minutely rule is but omit entire days. So for example get 5 minute intervals every weekday between some time but omit certain holidays. I thought of using something like

    INTERVAL = 5
    BUCKETS = int(60 / INTERVAL * 24)
    WEEKDAYS = (MO, TU, WE, TH, FR)
    nyd = rrule(MONTHLY, dtstart=datetime(2019, 1, 1, 0, 0), bymonth=1, byminute=range(0, 59, INTERVAL), byhour=range(0,24), bysetpos=range(1, BUCKETS + 1), byweekday=WEEKDAYS, count=300)

    which works, but I'm wondering if this is some non recommended hackery. The reason I ask is because bysetpos only supports values up until 366. For minutely and secondly data you could have situations where you want to use bysetpos up to 1440 and 86400 respectively, so I'm wondering if bysetpos is not intended for this use?

    Paul Ganssle
    @pganssle
    @matthewgilbert I'm not sure, the best thing to do would be to check the RFC.
    Seems like it could just be a bug in dateutil.
    One thing that may be useful would be to use an rruleset with an exrule.
    So like this:
    INTERVAL = 5
    BUCKETS = int(60 / INTERVAL * 24)
    WEEKDAYS = (MO, TU, WE, TH, FR)
    rrule_base = rrule(MINUTELY, dtstart=datetime(2019, 1, 1, 0, 0), count=300, byweekday=WEEKDAYS)
    rrset = rruleset()
    rrset.rrule(rrule_base)
    for dt in holidays:
        rrset.exrule(rrule_base.replace(dtstart=dt, until=(dt + timedelta(days=1)), count=None))
    Paul Ganssle
    @pganssle
    Not sure I fully understand what your rule is intended to do, and replacing dtstart and until will not always give you the same result as rrule.between(x, y), but you can see what I am getting at here.
    Another way to do this (though possibly less efficient) would be to do something like:
    for dt in holidays:
        for inst in rrule_base.between(dt, dt + timedelta(days=1)):
            rrset.exdate(inst)
    There's video, slides and a repo of me going through similar examples as part of a talk I've given about dateutil a few times: https://ganssle.io/talks/#python-dateutil-talk
    The Taiwanese Data Professionals one is the best video quality. The rrule stuff starts at 38:54
    Matthew Gilbert
    @matthewgilbert
    Okay great much appreciated. Ya that example is just a toy example but the idea was to have something like 5 minute intervals between 9:30 a.m. and 4:00 p.m. on weekdays, but then excluding certain holidays such as the first business day of the new year. Your way of doing this definitely looks cleaner, thanks!