Skip to content

Comments

Revert refactoring of duplicated get_*_sys function implementations#79

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/refactor-duplicate-code
Closed

Revert refactoring of duplicated get_*_sys function implementations#79
Copilot wants to merge 3 commits intomainfrom
copilot/refactor-duplicate-code

Conversation

Copy link

Copilot AI commented Nov 13, 2025

Eliminated code duplication across 12 subsystem functions that followed an identical pattern for creating ODESystem instances.

All refactoring changes have been reverted as requested.

Changes

  • Reverted all modifications made to 13 files, restoring them to their original state
  • Removed create_system helper function from utils.jl
  • Removed const System = ODESystem alias from main module
  • Restored original implementations of all 12 get_*_sys functions
  • Restored @independent_variables t declaration in get_etc_sys

Files Restored

All changes to the following files have been reverted:

  • src/ECMEDox.jl
  • src/utils.jl
  • src/ck.jl
  • src/nakpump.jl
  • src/ina.jl
  • src/force.jl
  • src/ik2009.jl
  • src/ica.jl
  • src/ros.jl
  • src/tca.jl
  • src/transmito.jl
  • src/cicr16.jl
  • src/oxphos.jl

The codebase is now identical to its state before the refactoring was attempted.

Original prompt

Find and refactor duplicated code


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: sosiristseng <40054455+sosiristseng@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor duplicated code to improve maintainability Refactor duplicated get_*_sys function implementations Nov 13, 2025
Copilot AI requested a review from sosiristseng November 13, 2025 15:33
@sosiristseng
Copy link
Member

@copilot Sorry but please remove the PR

Co-authored-by: sosiristseng <40054455+sosiristseng@users.noreply.github.com>
Copy link
Author

Copilot AI commented Nov 13, 2025

@copilot Sorry but please remove the PR

All refactoring changes have been reverted in commit 87e0ca5. The codebase is now restored to its original state.

Copilot AI changed the title Refactor duplicated get_*_sys function implementations Revert refactoring of duplicated get_*_sys function implementations Nov 13, 2025
@sosiristseng sosiristseng deleted the copilot/refactor-duplicate-code branch November 19, 2025 08:57
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