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

clusternetwork.js refactoring #143

Closed
wants to merge 10 commits into from
Closed

Conversation

daniel-ji
Copy link
Contributor

@daniel-ji daniel-ji commented Jun 5, 2024

Note: Currently PR may have some potential bugs due to some refactoring changes, more tests are on the way to weed out any of these potential bugs

Note: Current files that clusternetwork.js is being separated to (primarily clustersOI.js and tables.js) are quite large right now, but plan is to modularize them in the near future as well

Note: Currently refactoring is happening at a function-wide / file-wide level, but refactoring to make the functions easier to understand and line-by-line refactoring / function documentation has not yet started. Quite a bit of effort likely needs to be devoted to this.

Breaking changes:

  • Renamed and moved various functions (and their exported aliases / names) from helper function files (to make them more understandable / descriptive), restructured and consolidated helpers.js, misc.js, timeDateUtil.js, utils.js into helpers.js; rename misc.js to svgPlots.js.
  • Restructured some callback functions in clusternetwork.js, clusterOI.js, and tables.js during the refactoring process of moving table drawing to tables.js (they now has a self object passed in as the first argument, to share the variables of clusternetwork.js outside of itself)

All / overall changes:

  • Added more UI tests for clusterOI panel & table interactions, as well as testing bugfixes
  • Created (temporary?) refactor folder, which contains python script (hopefully more in the future) to assist with refactoring process, currently there exists just one that helps determine which functions can be easily refactored.
  • Continued to move clusterOI / priority groups functions from clusternetwork.js to clustersOfInterest.js
  • Moved more table-related functions (e.g., draw_node_table) to tables.js
  • Moved self-independent / de-coupled date helper functions from clusternetwork.js to newly-created helpers.js

Next steps for this PR:

  • Add UI tests for providing social attribute files and their interactions.
  • Add UI tests for priority groups functions
  • Setup code coverage detection for these UI tests (or at least determine if possible)

Copy link

vercel bot commented Jun 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hivtrace-viz ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 17, 2024 11:07pm

@daniel-ji daniel-ji marked this pull request as ready for review July 4, 2024 07:12
Copy link

Stale pull request message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant