Closed tijlleenders closed 7 months ago
@kobe-reygel @thinkrapido Another failing test case someone can pick up.
@thinkrapido I'm sorry - I didn't provide enough detail to make it clear what is required to solve this issue. Thanks for the work and solution provided. I'll see if I can build on that.
Hello @kobe-reygel @thinkrapido
I hope you are doing well.
I will work on this
I want make sure that I understand the issue to be resolved.
tijl/-/add-filler-goal-test
and found that filler-goal
failed which showing different results from expected.filler-goal
itself, I think I need to create new test case for this PR specifically if I'm not wrong!!!@moaz-mokhtar Why do you think the subGoal needs to go beyond the parent goal's deadline?
The subGoal is >>part of work Goal<< and as such the Activity it generates:
I did debug yesterday and would like to share below information.
Both tests stable/default-budgets
and stable/filler-goal
doesn't generate tasks which have children in addition it is not validating that child is valid. But stable/default-budgets
success because it is adjusted. I think it should generate task with Daily habits
if I'm not wrong.
I'm proposing a long-term solution to be applied when convenient. It is for set of rules that validating input goals:
start
and deadline
of a child's goal should not fall outside the start
and deadline
of its parent goal.budget_config
of a child's goal should not fall outside the budgeting of its parent goal.Filters
of a child's goal should not fall outside the filtering of its parent goal.min_duration
of a child's goal should not fall outside the duration, budgeting, or filtering of its parent goal.Happy scenario solution which I will work on it is will consider input validated and child goals fall inside the parent's goal
My proposal is:
parent_goal
information when generating activities to adjust based on that as below algorithm:
// goal.rs:42
pub fn get_adj_start_deadline(&self, calendar: &Calendar, parent_goal: Option<Goal>) -> (NaiveDateTime, NaiveDateTime) {
// if parent_goal.is_some -> means it is child goal, so do below:
// adjust generated goals with respect to parent_goal timing constraints
@moaz-mokhtar Please focus comments in this PR solely on the filler-goal test case.
If you think there is something wrong / to be improved in other test cases - please make a separate issue for that. Otherwise it will become very confusing very fast.
All I'm asking in this PR is a passing test case based on correctly generated Activities and output Tasks - while keeping input Goals immutable.
@moaz-mokhtar There have been some improvements to main while this PR was outstanding.
Please resolve the merge conflicts, respecting the improvements in main.
@moaz-mokhtar I think I merged correctly - but that resulted in the tests failing.
Please double-check and investigate.
The approach of adjusting Activities is convoluted and hard to follow. It' better to generate filler Activities as a separate step.
Placing in two separate steps is also not desired, as it implicitly says Budget Activities are less important than simple Goal Activities - and they can't interact with each other to optimize placing.
Test for filler-goal.
The idea is that when you have a big one-time thing of several hours - you might put a reservation of X hours on the calendar. Then as you think of more things - you add subGoals that can be independently achieved. If there is time left over in the parent goal after the specific subGoals have been achieved - that time also gets reserved on the calendar.
Another example would be a vacation day - where you have a few things you want to do - so you make specific subGoals for that - but the rest of the day is left open - but you still want the rest scheduled on the calendar as 'vacation day'.