Beelint: Another take on weekends-off & vacations

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!

7 Likes

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.

2 Likes

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.

2 Likes

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.

2 Likes

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.

2 Likes

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

1 Like

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.

1 Like

@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.

1 Like

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

4 Likes

Oh doh! Yes exactly that! Canā€™t believe I didnā€™t think of it.

1 Like

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:

2 Likes

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:

3 Likes

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

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

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.
2 Likes