Skip to content

Conversation

ucapbba
Copy link
Contributor

@ucapbba ucapbba commented Jun 5, 2024

Closes #151
How this PR improves usability for the developer (who updates fields with text editor) and user (who calls fields in Jupyter):

  • The fields code is smaller as logic has been removed in some place
  • Logic removed to check columns for square brackets, weight now passed as a named param
  • "Check Columns" is a simple base method which checks within the method that the columns are as expected
    • A developer can "see" what is expected in the variables passed to the method
    • Previously the init_columns called by init_subclass which was called by inherited classes of the base was how this was done, and it was hard to understand what was happening
  • Abstract base class setup maintained because prototype would required rewriting all the member variables and constructor for each "inherited". Member variables set up with @Property are clear
  • Option to pass spin removed - this flexibility was overkill, so setting it in the class, away from the user, makes the implementation clearer.

@ucapbba ucapbba requested a review from ntessore June 5, 2024 17:10
@ucapbba ucapbba linked an issue Jun 5, 2024 that may be closed by this pull request
@ucapbba ucapbba marked this pull request as draft June 5, 2024 17:10
@ucapbba ucapbba changed the title #151 - reduce bass class code, simplify column and spin logic ENH(fields): reduce bass class code, simplify column and spin logic Jun 11, 2024
@ucapbba ucapbba marked this pull request as ready for review June 12, 2024 12:56
@ucapbba ucapbba changed the title ENH(fields): reduce bass class code, simplify column and spin logic ENH(fields): Refactor Fields Module Jun 12, 2024
@ntessore ntessore changed the title ENH(fields): Refactor Fields Module gh-151: Refactor Fields Module Aug 30, 2024
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.

Refactor Fields Module

1 participant