Skip to content

Modularization and rewrite of the main functionality#69

Merged
yamilbknsu merged 57 commits intodevfrom
yep/modularization
Jul 14, 2025
Merged

Modularization and rewrite of the main functionality#69
yamilbknsu merged 57 commits intodevfrom
yep/modularization

Conversation

@yamilbknsu
Copy link
Collaborator

@yamilbknsu yamilbknsu commented May 20, 2025

The model.py file which originally contained all the logic for all of the modules was broken up into individual files in a new models module. The logic of each function was refactored for consistency, readability and scalability.

Several behaviors were changed according to discussions with the group, which were documented in an internal file. After the refactoring, a benchmark was performed to make sure any differences in simulation output were small enough to be attributed to randomness or minor edge cases.

While some of the structure of the modules is going to change in the future to accommodate further enhancements (refactoring of the calibration code and cleaning of input data for instance), this version of the repo provides improved speeds that can be leveraged in parallel efforts.

With this PR, I aim to:

  • Refactor modules with simulation logic into individual pieces
  • Standardize the use of orca functions
  • Refactor each module for performance

closes #62

…it is different to 1.

Might reconsider adding it in the future
@yamilbknsu yamilbknsu changed the base branch from main to dev May 22, 2025 16:48
@yamilbknsu yamilbknsu marked this pull request as ready for review June 9, 2025 14:27
@yamilbknsu yamilbknsu requested a review from jhoshiko June 9, 2025 14:27
Copy link
Collaborator

@jhoshiko jhoshiko left a comment

Choose a reason for hiding this comment

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

Nice! The modularization changes look fantastic and while there are plenty of issues remaining to be addressed (unrelated to modularization), I think this all looks good aside for a few comments I've left (mostly clarification questions).

Before I approve this pull request, I would like to run the refactored code on my machine too (this won't catch any small issues but is quick check to see if anything explodes on my end). Are the installation instructions good enough to test the build on Windows?

@yamilbknsu
Copy link
Collaborator Author

Nice! The modularization changes look fantastic and while there are plenty of issues remaining to be addressed (unrelated to modularization), I think this all looks good aside for a few comments I've left (mostly clarification questions).

Before I approve this pull request, I would like to run the refactored code on my machine too (this won't catch any small issues but is quick check to see if anything explodes on my end). Are the installation instructions good enough to test the build on Windows?

Sounds good! I'll go through the comments in the meantime. It should be fine to create the environment on windows with the requirements.txt file in this branch. Let me know if that breaks!

yamilbknsu and others added 2 commits July 7, 2025 12:01
@jhoshiko
Copy link
Collaborator

@yamilbknsu I've install and ran this branch and everything is working on my end! I think we can consider this PR finished and ready to merge!

@yamilbknsu yamilbknsu merged commit 07e3a2d into dev Jul 14, 2025
@yamilbknsu yamilbknsu deleted the yep/modularization branch July 14, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants