-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
calculating daily work time #3
base: master
Are you sure you want to change the base?
Conversation
@Ruin0x11 it is ready for code review, you can run it with Feedback welcome, especially regarding coding style, it is my first Rust code after all. Also, I find the output table ugly and inefficient, I'm wondering if there is a better way to display the data. |
@Ruin0x11 is there anything more I can do for this PR? Any feedback? |
…unt in the original algorithm
src/main.rs
Outdated
@@ -504,19 +536,72 @@ fn print_results_stdout(times: &Vec<CommitHours>) -> Result<()> { | |||
Ok(()) | |||
} | |||
|
|||
fn print_breakdown_results_stdout(times: &Vec<CommitHours>) -> Result<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it easier to have a separate function to have the breakdown results? I would prefer to have only one function with a flag or similar. I'm not too well versed in the table formatter, but I was thinking maybe you could have a conditional that adds the extra column to each row in breakdown mode. If it makes everything harder to read, I'm fine with this though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I'll think of a way for having a single function.
Sorry for the delay. To explain, I originally made this repo for the explicit purpose of estimating how much time I had spent working on one of my other projects. I got my answer (which turned out to be around 600-700 hours) and moved on. With this kind of motivation it's somewhat difficult for me to bring my attention back to other people if they legitimately want to help out after I've essentially accomplished all that I wanted to do with the project. I understand this is part of open sourcing and all and don't mean to make an excuse for it, since anyone is free to come and suggest things, and I don't mean to discourage others. I decided to open source my work because I did think it might be useful to other people, and I didn't feel like keeping it to myself, but I was mainly wanting to integrate this as once facet of my larger project, and essentially, the issue of not having the tool was just "standing in the way" of me ultimately getting what I personally wanted in the end, which was the time estimate. So it maybe that was a bit selfish of me (if so, I apologize). I think understanding that, as long as the comments I made are addressed, it should be good to merge. I'd rather merge this with a few minor changes and fix any pressing issues later than let it stagnate forever and let someone down a bit because I just never got around to responding. So thanks for being patient. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we also update the README.md with the usage info for the new flag?
I'm sorry to make you feel rushed, it was not my intention at all. Also, I want to tell you that I do understand your standpoint as my case is similar, I have this huge project and I need to know on which day how much I worked, so my approach was also very practical. I really appreciate your comments, they are very helpful. There is also a problem I discovered with original algorithm which is difficult to notice without breaking the work time per days. If we consider the following example:
Then we have five days and This is what I implemented in 978000e and I believe that is correct way however it breaks the compatibility with Of course I will update the readme accordingly to reflect the new features! |
@Ruin0x11 following up on the feature suggestion #2
Please note this is a work-in-progress, more commits are going to be added to this PR. Another disclaimer is, this is my first Rust code ever so please be gentle with the review ;P.