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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a dedicated object that compares two grids #688

Open
1 task
rouille opened this issue Sep 27, 2022 · 0 comments
Open
1 task

Create a dedicated object that compares two grids #688

rouille opened this issue Sep 27, 2022 · 0 comments
Assignees
Labels
feature request Request for a new feature. (Only lives in Backlog)

Comments

@rouille
Copy link
Collaborator

rouille commented Sep 27, 2022

馃殌

  • Is your feature request essential for your project?

Describe the workflow you want to enable

Now that we have grid objects whose number of attributes and the shape of the attributes can vary from one grid model to another or even among the same grid model (e.g. extra column in bus data frame for demand flexibility, etc), the simple overwriting of __eq__ is not enough anymore.

Describe your proposed implementation, if applicable

  • Create a CompareGrid class living in a new powersimdata.input.compare_grid module
  • The constructor takes two Grid objects
  • Define multiple methods that compare individual portion of the Grid objects, e.g., compare_branch(). The function would have several parameters such as: columns that would define a list of columns to compare, tol that would define the tolerance on the comparison. Each methods would perform an assertion
  • Remove the overwriting of __eq__ in powersimdata.input.grid

Additional context

Some tests would need to be refactored

@rouille rouille added the feature request Request for a new feature. (Only lives in Backlog) label Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature. (Only lives in Backlog)
Projects
None yet
Development

No branches or pull requests

4 participants