Skip to content

Commit

Permalink
Resolve conflict in poetry lock
Browse files Browse the repository at this point in the history
  • Loading branch information
caufieldjh committed Aug 2, 2023
2 parents 1cf7ea0 + 66e310a commit 03bafc4
Show file tree
Hide file tree
Showing 4 changed files with 1,007 additions and 1,494 deletions.
3 changes: 2 additions & 1 deletion kg_covid_19/make_holdouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ def _generate_negative_edges(
warnings.warn(
"Couldn't generate %i negative edges - only %i edges left "
"after removing positives and reflexives"
% (edges_df.shape[0], negative_edges.shape[0])
% (edges_df.shape[0], negative_edges.shape[0]),
stacklevel=2
)
negative_edges = negative_edges.head(negative_edges.shape[0])
else:
Expand Down
9 changes: 6 additions & 3 deletions kg_covid_19/transform_utils/intact/intact.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ def run(self, data_file: Optional[str] = None):
os.makedirs(self.output_dir, exist_ok=True)

with open(output_node_file, "w") as node, open(output_edge_file, "w") as edge:

# write node.tsv header
node.write("\t".join(self.node_header) + "\n")
edge.write("\t".join(self.edge_header) + "\n")
Expand Down Expand Up @@ -170,7 +169,7 @@ def interaction_to_edge(
interaction_type_str = (
interaction_type[0]
.getElementsByTagName("shortLabel")[0]
.firstChild._data
.firstChild._data # type: ignore
)

participants = interaction.getElementsByTagName("participant")
Expand Down Expand Up @@ -353,7 +352,11 @@ def parse_experiment_info(self, xmldoc: minidom.Document) -> Dict[int, str]:
# interaction detection method
try:
method = experiment.getElementsByTagName("interactionDetectionMethod")
label = method[0].getElementsByTagName("shortLabel")[0].firstChild.data
label = (
method[0]
.getElementsByTagName("shortLabel")[0]
.firstChild.data # type: ignore
)
exp_dict[exp_id]["detection_method"] = label
except (KeyError, IndexError, AttributeError):
pass
Expand Down
Loading

0 comments on commit 03bafc4

Please sign in to comment.