Skip to content

Factory function(s)#308

Merged
ecomodeller merged 4 commits intomainfrom
factory
Dec 11, 2023
Merged

Factory function(s)#308
ecomodeller merged 4 commits intomainfrom
factory

Conversation

@ecomodeller
Copy link
Copy Markdown
Member

The class ModelResult doesn't return an instance of ModelResult but instead creates DfsuModelResult, PointModelResult etc. which is confusing.

This PR changes this to use a factory function where it should be clearer that it returns one of these classes.

@jsmariegaard jsmariegaard self-requested a review December 6, 2023 15:03
Copy link
Copy Markdown
Member

@jsmariegaard jsmariegaard left a comment

Choose a reason for hiding this comment

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

Great work!

In the longer run, I guess it would be nice to the model_result function have the actual implementation and let the obsolete ModelResult call that function. But I guess this doesn't matter too much.

By the way, how about deprecation warning 🤔...

@ecomodeller ecomodeller merged commit 703f540 into main Dec 11, 2023
@ecomodeller ecomodeller deleted the factory branch December 11, 2023 09:25
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