-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add new write results function #18
Add new write results function #18
Conversation
add new count parameter. It's number of sorted results. It can be useful for a large number of identical results. It's acceptable to use numbers with minus sign(-5 as example), then results will be from the end of results list.
print_stat prints statistic for Result object
write_result writes Result object to file
write_results writes Result objects to files with hostname names
Hi, nice work. A couple of comments before diving into actual reviews:
|
add new count parameter to print the number of results. Useful for a lot of identical results
print_stat prints statistic for Result object
write_result writes Result object to file
add new count parameter to print the number of results. Useful for a lot of identical results
print_stat prints statistic for Result object
write_result writes Result object to file
write_results writes Result objects to files with hostname names
I think your PRs are still a bit messy with commits from different PRs landing on all of them |
4 PR, one after another, because I wanted to merge without conflicts It seemed to me that it would be convenient :) Although, there are really a lot of redundant commits. It looks dirty. Then, maybe, can i join all of the new features into one commit/pr, based on master? |
It is not about being cool. A PR should only contain what it is meant to contain. By introducing commits from other PRs the review process becomes more difficult and cumbersome as we need to figure out what’s what. This PR now has 12 commits and it will surely have more by the time we are done with all of the PRs. It also blocks the PR as it can’t be merged if the others aren’t merged. Fixing conflicts like the ones in the README are also very easy to fix and can even be done in the GH UI, however, having to sync commits and changes between all the PRs is probably going to end up being a lot of work for you. If you prefer to do it like this I am good with it but then we are going to be reviewing PRs one by one and ignore the rest until the "parent" is merged. Just let me know how you want to proceed. |
Replaced all new functions to single PR with |
write_results
:Result
objects to files with hostname nameswrite_result
returns list of tuples with hostname + diff between old file and new filedirname
- dirname you want to write the results.write_results
creates dirs with filenames (hostnames) if it's necessaryvars
,failed
,severety_level
write_host
- write hostname to file or notcount
is the same thatcount
fromprint_result
. It's number of sorted results (-5 or 5, for example). It can be useful for a large number of identical results. It's acceptable to use numbers with minus sign(-5 as example), then results will be from the end of results list.append
- "a+" or "w+" modeno_errors
- dont't write result with errors to files