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

Fix mocks for upcoming rcrunch changes #249

Merged
merged 1 commit into from
Jan 20, 2021
Merged

Fix mocks for upcoming rcrunch changes #249

merged 1 commit into from
Jan 20, 2021

Conversation

gergness
Copy link
Contributor

@gergness gergness commented Jan 20, 2021

In an upcoming version of rcrunch, CrunchCube arrays will contain an attribute that identifies what kind of measure type they are so that calculations like prop.table() and bases() can behave correctly on different kinds of measures (rather than assuming everything is a count, as they do now).

This broke one test in crunchtabs because one of the mock fixtures contains CrunchCubes without this new attribute. Fortunately, this change is backwards compatible, so it works with both the current version of rcrunch as well as my still-in-development version.

As discussed, this PR updates that fixture and also records the code I used to update it. I'm not totally sure the generate_mocks script will scale well for generating all mocks, but it's a start. Let me know if you had something else in mind.

@1beb
Copy link
Collaborator

1beb commented Jan 20, 2021

@gergness thank you very much. Appreciate the mock generation script as well.

@1beb 1beb merged commit 711cd29 into main Jan 20, 2021
@1beb 1beb deleted the rcrunch-measure-attr branch March 2, 2021 00:41
@gergness gergness restored the rcrunch-measure-attr branch July 13, 2023 20:15
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