Beeminder Forum

Beelint: Another take on weekends-off & vacations


#1

Howdy,

I’ve always struggled with the general problem that certain days are not suitable to work on certain Beeminder goals. I gave up on the automatically-adjust-the-road approach (https://github.com/DrTall/beevacay) last year when it became clear that road editing is not for the faint of heart.

The new approach is detect-and-complain, or “lint”: https://github.com/DrTall/beelint This is still pretty experimental so it’s far from tried-and-true but I’m pretty excited about it.

My current Beelint config has 4 parts:

  • Weekends-off goals
  • Weekends-only goals
  • A vacation coming up in February (blocks all goals)
  • A Google Calendar based blacklist for nights where I have events after work. I’m using this to detect these “Late nights” and then forbidding those goals which I find really annoying to deal with when I get home late.

My Beelint goal is updated by the script with the list of goals with problems:

This also integrates with my Beedash, by highlighting lint errors in pink. Orange is still a real eep!:

If anybody checks it out let me know if it works for you!


My So-Called Beeminder Life
New feature: Dashboard view
#2

That’s brilliant.

I wonder whether we could do something similar to bump goals up the gallery and/or make them more visible.

Seems like it’d be a stepping stone toward enabling goal-specific calendars.


#3

Very cool! I’m trying this out today. A few issues I have run into: (1) the instructions for getting a Google Calendar API key seem not to match the interface. Maybe the interface has changed? I tried to figure out the right thing to do but I am not at all sure that I did. (2) When I run it I get “No module named dateparser”. What’s the canonical way to get that Python module (on Ubuntu)? I tried ‘sudo apt-get install python-dateutil’ which seemed a likely candidate, but no dice.


#4

Awesome, glad to have you check it out!

Oh yeah you are right the steps I listed are totally out of date. I’ve updated them now to be a pointer to Google’s new quickstart guide: https://developers.google.com/google-apps/calendar/quickstart/python

I believe that pip is the way you want to install python packages. You should be able to run it without sudo since it installs for your user by default. e.g. pip install --upgrade python-dateutil.


#5

OK, I was able to install dateparser with pip install --user dateparser. The next error I ran into is “No module named apiclient.discovery”; after some Googling I found I needed to pip install --user google-api-python-client. And then… it worked! Well, I still don’t know if the Calendar integration works, I don’t have any calendar-based rules set up yet. But at least the date-pattern rules worked.


#6

Great!! Oh but I am sorry if it wasn’t clear that the Calendar integration is optional if you don’t want to use any calendar based rules. :o


#7

I wouldn’t say it was clear, but that’s what I guessed anyway. But in any case I may want to use some calendar based rules, I just don’t have any set up yet.


#8

@dreev Any chance to get an API trigger for “Derail this goal” ? It would be useful for this project! Currently if I fail to deal with a lint violation it will always be there tomorrow, and the next day, etc. forever. So I sort of have to set a low pledge cap, but that also fails to motivate me. It would be nice to be able to get the safety buffer behavior instead.


#9

What, like an uncle button? Excellent plan. :wink:


#10

Oh doh! Yes exactly that! Can’t believe I didn’t think of it.


#11

I’m still very glad that you mentioned it. I hadn’t thought of an API trigger, and that might be the best way to ease into having an uncle button and seeing what use folks make of it.

Also saves anybody figuring out how to smoothly incorporate it into the UI… :slight_smile:


#12

That’s true! And hopefully if it is ever implemented it won’t assume that people only want to uncle on an eep! day. The goal I ought to have uncled on last night has 9 days of safety buffer. :slight_smile:


#13

This is awesome, thanks so much! I have several goals k want weekdays only do this a brilliant idea.


#14

Let me know what you find useful / not useful about it. :slight_smile:


#15

FYI I’ve made a few tweaks to make it so:

  • A goal won’t show a lint error if today is also an illegal day for that goal. The idea being you can’t work on it on the illegal days, so linting it on such a day is pointless.
  • A config option to mark goals as always_valid_if_data_today which makes it so that the goal won’t show lint errors if Beeminder has any data points for that goal today. Useful for true/false goals where you can only make limited progress every day.