chore: Remove small molecule test species#2433
Open
trisyoungs wants to merge 2 commits into
Open
Conversation
Comment on lines
+344
to
+345
| auto name = contents["species"]["name"].as_string(); | ||
| setName(name.str); |
Contributor
There was a problem hiding this comment.
Suggested change
| auto name = contents["species"]["name"].as_string(); | |
| setName(name.str); | |
| if (contents.contains("species")) | |
| deserialise(contents["species"]) |
I feel that my preference would be to have the species name set inside deserialise - this would contain the responsibility to fully initialise the species from TOML within a single method.
Then, this would become ^
Is there any reason we don't do this already?
Member
Author
There was a problem hiding this comment.
To be honest I've been ignoring this a bit, but ultimately the Species class doesn't need a name_ member as this should be the SpeciesNode name. However, the relationship between those two things is not quite clear to me at present. I agree that the name could / should be set in the deserialise(), so I'll make that change.
RobBuchananCompPhys
requested changes
May 15, 2026
trisyoungs
added a commit
that referenced
this pull request
May 15, 2026
trisyoungs
added a commit
that referenced
this pull request
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes yet more code-constructed test species and converts them to TOML. Also adds
Species::load()to load a species directly, useful in unit tests.This work removes most of the usages of modifying functions in the
Speciesclass, making refactor it a lot easier!