-
Notifications
You must be signed in to change notification settings - Fork 27
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
Simplify deltacode output #16
Comments
@johnmhoran Plan of attack:
|
Feel free to push your changes in a branch without opening a PR. This is easier and less noisy than constantly updating a PR. If you have questions or would like me to expand in detail on any of the above items, let me know. |
@MaJuRG I've modified
How do we want to handle the redundant category information? Replace the 4 category keys with a single key named
Also, I assume we want the missing header info added to the top of the JSON output file. If so, I think that means adding values to the top of the incoming OrderedDict created by |
* Modify Delta object to_dict function to return only minimal info (category and path). * Modify CSV ouput function to handle new data structure. * Refactor 9 failing tests and related test files. Signed-off-by: John M. Horan <johnmhoran@gmail.com>
@MaJuRG I just committed and pushed my work to date so you can vet including in connection with my recent questions. |
We can keep the redundant categories around for now. If you recall our conversation yesterday, the delta object's category field will no longer match the Deltas dict category keys once we add license/copyright information. |
I do recall, e.g., Re the 2nd question, do we want to add the missing header info to the top of the incoming OrderedDict. If yes, how does one do that? I've seen 2 approaches: rewrite the OrderedDict -- said to be slow but relatively straightforward -- or write a function to prepend. Finally, once I finish this, what shall I tackle next? |
@MaJuRG I can add the version header from inside the JSON function by moving the variable from |
@MaJuRG I'm able to add the stats by passing |
pass the deltacode object into |
Shouldnt need to move version to cli.py. Just |
Very nice. Thanks, @MaJuRG . My only open issue: the list comprehension you suggested -- still digging into how to include the 3 variable assignments and the |
@MaJuRG I believe I've answered my last question. Spent time yesterday trying to figure out how to address the double-nested multiple variable assignments and the Took a fresh look this morning and realized that I've seen this before in simpler form: initializing variables earlier than necessary. When all is said and done, it's just an And this:
. . . can be replaced with this:
All 79 tests pass. I want to do a little command-line testing just to be sure, and if all looks good, will clean up the code, commit, push and open a PR. |
Signed-off-by: John M. Horan <johnmhoran@gmail.com>
* Remove call to Delta.to_dict(). Signed-off-by: John M. Horan <johnmhoran@gmail.com>
#21 merged, closing this. |
For the csv output, it would be a better presentation if we simply included a single path value, instead of empty or repeated paths that are redundant.
The text was updated successfully, but these errors were encountered: