Skip to content

Conversation

@lizliz
Copy link
Collaborator

@lizliz lizliz commented Nov 4, 2025

Description

Lots of folder cleanup, no changes to the code.

  • Added stuff to actions so that (hopefully) test installs will run on a PR so that we can't merge without those working.
  • Updated the make file to have lots of useful stuff.
  • Updated the contributing page of the documentation to actually explain how to do things.
  • Set up a code formatter (black) and ran it on the code. So any change in the cereeberus folder is just caused by the linting.

Motivation and Context

Neurotic cleanup. Plus we want a nice version for anonymizing later.

How has this been tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • [N/A] I have incremented the version number in the pyproject.toml file if a new version needs to be pushed to pypi (note that not incrementing the number won't push to pypi and throw an error, but it will update the documentation).
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation as necessary and compiled locally to ensure it is clean.
  • I have added tests to cover my changes, and all new and existing tests passed.

… deploy tests on a PR, cleand up the makefile, and added stuff to contributing on the documentation.
@lizliz lizliz requested review from Copilot and yemeen November 4, 2025 21:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR applies automated code formatting across the ceREEBerus codebase using Black, a Python auto-formatter. The changes standardize code style including quote consistency (single to double quotes), spacing around operators and parameters, line breaks, and indentation.

Key Changes

  • Converted all string quotes from single to double quotes throughout the codebase
  • Standardized spacing around operators, function parameters, and assignments
  • Reformatted long lines and function calls for better readability
  • Added trailing commas in multi-line structures
  • Removed extraneous blank lines and standardized comment formatting

Reviewed Changes

Copilot reviewed 36 out of 37 changed files in this pull request and generated 40 comments.

Show a summary per file
File Description
requirements.txt New file listing project dependencies
doc_source/contributing.rst Expanded contributing guide with formatting, testing, and PR guidelines
cereeberus/cereeberus/reeb/reebgraph.py Reformatted with consistent spacing and quote style
cereeberus/cereeberus/reeb/merge.py Reformatted with consistent spacing and quote style
cereeberus/cereeberus/reeb/mapper.py Reformatted with consistent spacing and quote style
cereeberus/cereeberus/reeb/lowerstar.py Reformatted with consistent spacing and quote style
cereeberus/cereeberus/reeb/embeddedgraph.py Reformatted with consistent spacing and quote style
cereeberus/cereeberus/reeb/init.py Reformatted with double quotes
cereeberus/cereeberus/distance/labeled_blocks.py Reformatted with consistent spacing and quote style
cereeberus/cereeberus/distance/interleave.py Reformatted with consistent spacing and quote style
cereeberus/cereeberus/distance/ilp.py Reformatted with consistent spacing and quote style
cereeberus/cereeberus/distance/init.py Reformatted with double quotes
cereeberus/cereeberus/data/*.py Multiple data module files reformatted with consistent style
cereeberus/cereeberus/compute/*.py Compute module files reformatted with consistent style
Comments suppressed due to low confidence (2)

cereeberus/cereeberus/distance/interleave.py:4

  • Import of 'block_diag' is not used.
from scipy.linalg import block_diag

cereeberus/cereeberus/distance/interleave.py:6

  • Import of 'UnionFind' is not used.
from ..compute.unionfind import UnionFind

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +103 to 104
viridis = mpl.colormaps["viridis"].resampled(16)

Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Variable viridis is not used.

Suggested change
viridis = mpl.colormaps["viridis"].resampled(16)

Copilot uses AI. Check for mistakes.
search_data = {}
search_data = {}

# -- Set the initial value of the distance bound to be infinity
distance_bound = np.inf
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Variable distance_bound is not used.

Suggested change
distance_bound = np.inf

Copilot uses AI. Check for mistakes.
titles[3] = f"$D_{{{end_graph}^{{n}}}}^{{V}} \\cdot ({titles[2][1:-1]})$"

fig, axs = self._draw_matrix_mult(Top, Bottom, Result, Result_Dist, titles = titles)
fig, axs = self._draw_matrix_mult(
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Variable fig is not used.

Suggested change
fig, axs = self._draw_matrix_mult(
self._draw_matrix_mult(

Copilot uses AI. Check for mistakes.
titles[3] = f"$D_{{{end_graph}^{{n}}}}^{{V}} \\cdot ({titles[2][1:-1]})$"

fig, axs = self._draw_matrix_mult(Top, Bottom, Result, Result_Dist, titles = titles)
fig, axs = self._draw_matrix_mult(
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Variable axs is not used.

Suggested change
fig, axs = self._draw_matrix_mult(
fig = self._draw_matrix_mult(

Copilot uses AI. Check for mistakes.

fig, axs = self._draw_matrix_mult(Top, Bottom, Result, Result_Dist, titles = titles)
fig, axs = self._draw_matrix_mult(
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Variable fig is not used.

Suggested change
fig, axs = self._draw_matrix_mult(
self._draw_matrix_mult(

Copilot uses AI. Check for mistakes.
Comment on lines +518 to +525
except:
print("Error")
print(f"c: {c}")
print(f"map_dict: {map_dict}")
print(f"cols_: {cols_}")
print(f"rows_: {rows_}")
print(f"blocks[i]: {self.blocks[i]}")
ValueError("Column object {c} not in map_dict")
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Except block directly handles BaseException.

Suggested change
except:
print("Error")
print(f"c: {c}")
print(f"map_dict: {map_dict}")
print(f"cols_: {cols_}")
print(f"rows_: {rows_}")
print(f"blocks[i]: {self.blocks[i]}")
ValueError("Column object {c} not in map_dict")
except KeyError:
print("Error")
print(f"c: {c}")
print(f"map_dict: {map_dict}")
print(f"cols_: {cols_}")
print(f"rows_: {rows_}")
print(f"blocks[i]: {self.blocks[i]}")
raise ValueError(f"Column object {c} not in map_dict")

Copilot uses AI. Check for mistakes.
try:
nx.shortest_path(S.to_undirected(), u, v)
return n
except:
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Except block directly handles BaseException.

Copilot uses AI. Check for mistakes.
comp_to_new_vert = {}
# comp_to_new_vert is a dictionary with keys as indices of connected components in the list C and values as the name of the vertex in R_eps
for i,c in enumerate(C):
for i, c in enumerate(C):
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Nested for statement uses loop variable 'i' of enclosing for statement.

Copilot uses AI. Check for mistakes.
for i,c in enumerate(C_edge):
V_inv, E_inv = self.inv_image(cv - delta)

for i, c in enumerate(C_edge):
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Nested for statement uses loop variable 'i' of enclosing for statement.

Copilot uses AI. Check for mistakes.
print(f"cols_: {cols_}")
print(f"rows_: {rows_}")
print(f"blocks[i]: {self.blocks[i]}")
ValueError("Column object {c} not in map_dict")
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Instantiating an exception, but not raising it, has no effect.

Suggested change
ValueError("Column object {c} not in map_dict")
raise ValueError(f"Column object {c} not in map_dict")

Copilot uses AI. Check for mistakes.
branches: [ "main" ]
pull_request:
branches: [ "main" ]

Copy link
Member

Choose a reason for hiding this comment

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

needs to be master instead

@yemeen yemeen merged commit 044e78a into master Nov 4, 2025
4 checks passed
@yemeen yemeen deleted the cleanup-actions branch November 4, 2025 21:36
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.

3 participants