Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Paul Ganssle
    @pganssle
    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!

    Following up on your comments about bysetpos and the RFC, I don't see any mention of restricting this. My guess is that it was implemented with DAILY frequency in mind? The docstrings also don't mention anything

    If given, it must be either an integer, or a sequence of integers,
    positive or negative. Each given integer will specify an occurrence
    number, corresponding to the nth occurrence of the rule inside the
    frequency period. For example, a bysetpos of -1 if combined with a
    MONTHLY frequency, and a byweekday of (MO, TU, WE, TH, FR), will
    result in the last work day of every month.

    As a contrived example, lets say I want the 367th minute on Mondays, I could do something like
    list(rrule(MINUTELY, dtstart=datetime(2019, 1, 1, 0, 0), bysetpos=367, count=3, byweekday=MO))
    Matthew Gilbert
    @matthewgilbert
    ^^^ I realise this probably isn't the approach you would want to use but just to illustrate an example of using the behaviour

    In addition in playing around with this I think there may be an issue more broadly with bysetpos when using MINUTELY. This runs fine

    In [11]: list(rrule(MINUTELY, dtstart=datetime(2019, 1, 1, 0, 0), bysetpos=1, count=1, byweekday=MO))
    Out[11]: [datetime.datetime(2019, 1, 7, 0, 0)]

    but this seems to run indefinitely

    list(rrule(MINUTELY, dtstart=datetime(2019, 1, 1, 0, 0), bysetpos=2, count=1, byweekday=MO))
    although possibly I am misunderstanding something. Not exactly sure what is going on but my guess is the rrule._iter yield statement is never reached? Or else the algorithm is just taking a very long time, still haven't fully grokked how _iter works
    Matthew Gilbert
    @matthewgilbert
    If this stuff looks unexpected to you as well @pganssle let me know and I'll file an issue. Can try and dig a little deeper as well as some point to try and see what's involved with fixing
    Paul Ganssle
    @pganssle
    @matthewgilbert Definitely seems worth hashing out in an issue.
    Paul Ganssle
    @pganssle
    The parser needs the most love right now, a lot of stuff is stalled on that, but after that's done I'm hoping to rework the rrule internals.
    I think that in most cases (and bysetpos may be an exception here), I can transform the inputs the the rule to some canonicalization so that freq=MINUTELY, interval=60 and freq=HOURLY, interval=1 "compile down" to the same thing, which I can then optimize.
    RandomWolf
    @RandomWolf
    Quick question, how can I insr
    Sorry, how can I install dateutil, skipping that it searches for packages online?
    I'm on a machine that's completely cut off from the internet, and I have to painstakingly copy everything I need from my phone to the machine. Its always searching for setuptools, but I already have that installed