Skip to content
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

Remove commented-out function definitions and delete files with no executable code #452

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

rileyjmurray
Copy link
Contributor

@rileyjmurray rileyjmurray commented Jun 7, 2024

NOTE: this is currently a draft PR. I'll convert it to a normal PR after my other PRs have been merged.

This PR aims to resolve #428. I'll note that some of my open PRs remove some of the same content removed here. I suspect Git will know how the reconcile the differences when those PRs are merged.

At time of opening this PR, the changes are quite likely over-zealous, so I'm happy to roll some changes back. That said, I suggest we be aggressive in removing this kind of unused text. Here's a proposal for how to decide what to actually keep and what to remove:

  • We can/should keep simple reference implementations of functions that are important but very complicated.
    • Example: there's an implementation of Levenberg-Marquardt from Wikipedia that I've kept. I think this is valuable because our actual LM code is very complicated, so having a reference is helpful for maintainability.
  • We could keep text that's related to memory profiling.
    • Rationale: The question of whether or not to bother trying to profile memory usage in a certain location requires a fair amount of expertise, so I think keeping this kind of text could serve as a flag for suspected hot code paths.
  • Commented-out pyx code should be removed unless we have a very good reason for keeping it.

Another source of criteria for figuring out what to keep is to look for a short note at the beginning of some commented-out code block. Often there are notes that say "FUTURE," "Removed," "unused," "REMOVE," "Debugging," etc...

Other, miscellaneous changes

  • Removed some unused imports.

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.

None yet

1 participant