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

Use OperatorGroup for constrain and callback features #404

Open
wants to merge 10 commits into
base: update-0.3.3
Choose a base branch
from

Conversation

skim0119
Copy link
Collaborator

@skim0119 skim0119 commented Jun 29, 2024

resolve #401
resolve #402

Key update

  • Previously, only synchronize features used OperatorGroup. Now, both callback and constraint features use OperatorGroup to manage the operations.
  • Finalize methods is not converted since it is not specifically associated to a features (like FreeBC or OneEndFixedBC), but rather associated to a group (like Constraints or Forcing). Hence it does not require more complicated structure to manage the operation.

Minor update

  • partially resolve Re-organize unused files #402: explicit_steppers and related features are now moved to experimental folder.
    • This was because StepType was being refactored from rest of the OperatorType, and type-hinting for explicit stepper was causing more issues.
  • OperatorType now specifically means apply_forces, apply_torques, constrain_rates, etc.
    • OperatorType must take time as parameter inputs.
    • OperatorCallableType must take time and current_step as a parameter input.
  • StepType now specifically means callable functions used during the timestepping.
  • New test: condition to call callback at zero-step
  • Pytest-mock is added as part of dev-dependency for easier mock-testing.

@skim0119 skim0119 added the prio:low Priority level: low label Jun 29, 2024
@skim0119 skim0119 self-assigned this Jun 29, 2024
@skim0119 skim0119 force-pushed the wip/401 branch 3 times, most recently from 271c0fc to cddfa60 Compare June 30, 2024 02:19
@skim0119 skim0119 force-pushed the wip/401 branch 2 times, most recently from f0f6ccd to 4d6d315 Compare June 30, 2024 07:20
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 96.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 94.35%. Comparing base (92d8b91) to head (c8535a8).
Report is 1 commits behind head on update-0.3.3.

Current head c8535a8 differs from pull request most recent head 4f99538

Please upload reports for the commit 4f99538 to get more accurate results.

Files Patch % Lines
elastica/typing.py 71.42% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           update-0.3.3     #404      +/-   ##
================================================
+ Coverage         93.96%   94.35%   +0.39%     
================================================
  Files                53       51       -2     
  Lines              3295     3187     -108     
  Branches            335      324      -11     
================================================
- Hits               3096     3007      -89     
+ Misses              152      134      -18     
+ Partials             47       46       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@skim0119 skim0119 force-pushed the wip/401 branch 2 times, most recently from 454e9f7 to fed6ae3 Compare July 1, 2024 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio:low Priority level: low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant