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

Integrate model reference in mock table #5

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

Somtom
Copy link
Collaborator

@Somtom Somtom commented Oct 22, 2023

Problem

The current API is still a bit verbose and unclear, for example:

  • For all test cases we need to repetitively provide the table reference of the input data mocks. Usually those don't change.
  • To generate results from mock input data we currently use a method called from_inputs. The feels seems a bit unclear (i.e. what is "inputs")?.
  • When instantiating a class, we pass the data as list of dicts. However, there is also a from_inputs method. It can become unclear to the user what happens when

What changed

  • Added a table_meta decorator that can be used to pass MockTable metadata (at the moment only table_ref - we will be able to reuse this in the future for other metadata). This way, we can leave the class attribute definition to only column types
  • We renamed from_inputs to from_mocks
  • We added a wrapper method from_dicts that should make more clear what happens compared to the new from_mocks method

@Somtom Somtom self-assigned this Oct 22, 2023
@Somtom Somtom merged commit 6c327bb into main Oct 23, 2023
2 checks passed
@Somtom Somtom deleted the integrate-model-reference-in-mock-table branch October 23, 2023 09:10
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.

None yet

2 participants