Skip to content

Refactored variableAttributeLoader#303

Merged
landinjm merged 14 commits intoprisms-center:masterfrom
fractalsbyx:VAL-refactor
Nov 21, 2024
Merged

Refactored variableAttributeLoader#303
landinjm merged 14 commits intoprisms-center:masterfrom
fractalsbyx:VAL-refactor

Conversation

@fractalsbyx
Copy link
Copy Markdown
Contributor

Previously, for every variable attribute, several copies of vectors of information were used in several places in the code. Now, attributes are stored in a single map that maps the field index to an attributes instance. In several places in the code, fields were looped by index, using the size of various different vectors, or the number of fields. Now, in most places, we loop by value. With a little more work, we can remove the requirement for field numbers to be concurrent and start at 0.

Known issues:

Need some checks in place to make sure that the user inputs are well-formatted (no two fields with the same name, 'change()' dependencies correct, dependencies make sense, etc).
Some unit tests became deprecated. May want replacements.
Not well-tested yet

Certain simplifications may be possible (postprocess fields may not need to be treated so differently, others...)

Closes #281 ?

Copy link
Copy Markdown
Contributor

@landinjm landinjm left a comment

Choose a reason for hiding this comment

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

Please add doxygen style comments to variableAttributeLoader.h and variableAttributes.h

@fractalsbyx fractalsbyx requested a review from landinjm November 21, 2024 06:54
Copy link
Copy Markdown
Contributor

@landinjm landinjm left a comment

Choose a reason for hiding this comment

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

Please clean up the commit history. daba1ce 38faae7 and 63e1fc4

Copy link
Copy Markdown
Contributor

@landinjm landinjm left a comment

Choose a reason for hiding this comment

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

looks good to me

@landinjm landinjm merged commit 4cbd6d9 into prisms-center:master Nov 21, 2024
@fractalsbyx fractalsbyx deleted the VAL-refactor branch November 22, 2024 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor variableAttributeLoader

2 participants