Skip to content

View patches#120

Merged
Chris7 merged 14 commits intomainfrom
patch-view
Jan 14, 2025
Merged

View patches#120
Chris7 merged 14 commits intomainfrom
patch-view

Conversation

@Chris7
Copy link
Contributor

@Chris7 Chris7 commented Jan 8, 2025

This will generate a .dot file from a patch. It's some of the starting work to explore how we can show changes to users in reviews, etc

}

#[derive(Debug)]
pub struct ChangesetModels {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all models aren't in here, should extend when needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

let mut previous_edges = HashSet::new();
let mut previous_paths = HashSet::new();
let mut previous_accessions = HashSet::new();
let mut previous_nodes = HashSet::new();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was missing when nodes were added

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

contents
}

fn parse_string(item: &ChangesetItem, col: usize) -> String {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes the parsing out of this stuff a lot easier

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Chris7 Chris7 changed the title patch view poc View patches Jan 10, 2025
@Chris7 Chris7 requested a review from dkhofer January 10, 2025 14:31
hash: parse_maybe_string(item, 2),
});
}
"edges" => created_edges.push(Edge {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realize brackets weren't needed for matching. Maybe do the same for the other one liners here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

use std::io::Read;

pub fn view_patches(patches: &[OperationPatch]) -> HashMap<String, HashMap<i64, String>> {
// For each blockgroup in a patch, a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incomplete comment?

Copy link
Contributor

@dkhofer dkhofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, comments are minor

@Chris7 Chris7 merged commit 9a09f6f into main Jan 14, 2025
1 check passed
@Chris7 Chris7 deleted the patch-view branch January 14, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants