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

Make constructors in Parameter trait fallible #161

Merged
merged 3 commits into from
Jul 3, 2023

Conversation

g-bauer
Copy link
Contributor

@g-bauer g-bauer commented Jun 26, 2023

Changes return types for constructor methods of Parameter to results. This is useful for parameters that contain assertions or have multiple, incompatible variants. Existing assertions/unwraps in implemented parameters have not been changed in this PR.

Since Parameter::subset is called on parameters that are usually created via the (now fallible) constructors, the method still returns the parameters without a results to keep the interfaces for property calculations clean. Added panic section to the doc strings.

@g-bauer g-bauer added breaking Contains breaking changes core related to features in feos-core labels Jun 26, 2023
CHANGELOG.md Outdated Show resolved Hide resolved
@prehner prehner changed the base branch from main to development July 3, 2023 10:42
@prehner
Copy link
Contributor

prehner commented Jul 3, 2023

Since these are breaking changes, it should be merged into development rather than main.

@prehner prehner changed the base branch from development to main July 3, 2023 10:45
@prehner prehner added this to the v0.5.0 milestone Jul 3, 2023
Co-authored-by: Philipp Rehner <69816385+prehner@users.noreply.github.com>
@g-bauer g-bauer merged commit c4f32f2 into main Jul 3, 2023
@g-bauer g-bauer deleted the fallible_parameters_constructors branch July 3, 2023 11:47
@g-bauer g-bauer restored the fallible_parameters_constructors branch July 3, 2023 11:48
@prehner prehner deleted the fallible_parameters_constructors branch July 3, 2023 12:00
bbbursik pushed a commit to bbbursik/feos that referenced this pull request Oct 17, 2023
* Make constructors in Parameter trait fallible

* Update changelogs

* Update CHANGELOG.md

Co-authored-by: Philipp Rehner <69816385+prehner@users.noreply.github.com>

---------

Co-authored-by: Philipp Rehner <69816385+prehner@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Contains breaking changes core related to features in feos-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants