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

Complete Library Overhaul: Refactoring, OOP, Documentation, and API Improvements #78

Merged
merged 63 commits into from
Jun 14, 2023

Conversation

bisejdiu
Copy link
Member

@bisejdiu bisejdiu commented Apr 22, 2023

Description of Changes to the GitHub Repository

This update to the repository represents a complete overhaul and refactoring of the library, with a focus on improving code logic, syntax, and writing style. The primary goal was to make the library more modular and maintainable, while also improving its functionality and user experience. The changes encompass both the Python library and API, as well as minor updates to the visualization frontend.

Major Changes

  • Adopted an Object-Oriented Programming (OOP) approach to design the library
  • Improved performance of the library by around 1.5-2x.
  • Completely rewrote the library and refactored the code for improved maintainability and flexibility
  • Implemented a metric computation interface, including residence time calculation
  • Added type annotations and extensive documentation throughout the codebase
  • Created several Jupyter notebooks with tutorials and an overview of the new API
  • Designed novel analysis methods to combine multiple cutoffs for contact calculation

Detailed Overview of Changes

  • Library and API Overhaul

    • Rewrote server.py, making major changes to contact calculations
    • Fixed various bugs and issues, such as the reload issue and JSON serializability
    • Improved performance and simplified code in several areas, like iterating over pairs and handling contact durations
  • Modularity and OOP

    • Refactored contacts API and abstracted server payload
    • Improved registry access and refactored MetricRegistry with cleaner syntax
    • Cleaned up unused code and tested the new core class design
    • Migrated library to use the new Universe and AtomGroup interfaces
  • Documentation and Tutorials

    • Added extensive documentation throughout the codebase, including comments and docstrings
    • Created Jupyter notebooks to showcase the new API and provide tutorials for users
  • Visualization Frontend

    • Changed layers in the timeseries app and fixed issues with button and select element styling
    • Fixed table column formatting and other minor frontend bugs
  • Miscellaneous Changes

    • Implemented several normalization schemes for contacts and added contact arithmetic
    • Added convenience methods, fixed small bugs, and removed old or unnecessary files

Summary

This update represents a significant improvement to the library, with a complete overhaul of the codebase and a focus on modularity and maintainability. The new OOP approach, comprehensive documentation, and various performance improvements should make the library more user-friendly and versatile. With the added Jupyter notebooks and visualization frontend updates, users can expect a smoother and more informative experience.

@codecov
Copy link

codecov bot commented Apr 22, 2023

Codecov Report

Merging #78 (491ebb3) into main (c295cd8) will decrease coverage by 23.05%.
The diff coverage is 23.70%.

@bisejdiu bisejdiu self-assigned this May 1, 2023
@bisejdiu bisejdiu mentioned this pull request May 1, 2023
@bisejdiu
Copy link
Member Author

bisejdiu commented May 1, 2023

These changes basically rewrite the entire library. The ideas remain largely the same but the code has largely been completely refactored. I have added several notebooks in docs to document the new API and highlight some of the new features. There are several things on the to-do list, but I think the most important points are:

(1) Testing/comparing changes for accuracy,
(2) Rewriting the tests with the new API
(3) Updating/re-adding interactive selection and contact export functionalities
(4) Update/Fix/Change the macro interface

Once you have completed point (1) above, we can proceed with merging the changes.

@bisejdiu bisejdiu changed the title Contact and server improvements Complete Library Overhaul: Refactoring, OOP, Documentation, and API Improvements May 1, 2023
@danielpastor97 danielpastor97 merged commit ee21866 into main Jun 14, 2023
@danielpastor97 danielpastor97 deleted the contact_and_server_improvements branch May 6, 2024 09:34
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