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

refactor mappers #143

Open
samvanderzwan opened this issue Jul 24, 2024 · 3 comments
Open

refactor mappers #143

samvanderzwan opened this issue Jul 24, 2024 · 3 comments
Assignees

Comments

@samvanderzwan
Copy link
Contributor

Discussed with Michiel. The mappers should be refactored to handle all the esdl logic, This means creating an mapper function for each asset and also parsing the data in that mapper.
This can also help in simplifying some functions.

@MichielTukker
Copy link
Contributor

Use EsdlControllerMapper as an example, refactor EsdlEnergySystemMapper to match that pattern

@vanmeerkerk
Copy link
Contributor

For every asset - such as the pipe - create a mapper. The mapper will get all the properties from the ESDL-asset and assign them to the asset.

For the pipe, this would mean that the enitity pipe is constructed with an inner diameter, roughness, length, etc. The setpoints will not be assigned.

@vanmeerkerk
Copy link
Contributor

vanmeerkerk commented Sep 26, 2024

Goal: to not use the 'EsdlAssetObject' in our own entities, such as the pipe, the consumer, etc.

Start with the pipe and then ask for a review.

  • First look at the ESDL asset mapper to understand the structure
  • Look at the ESDL controller mapper and see what it takes from ESDL and assigns to our own 'assets'.
  • Refactor the pipe asset.
  • Create a Mapper object
  • Update the tests of the pipe
  • Create the tests for the mapper object

Take your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants