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 issue #100 fixed row labels names for hypothesis= revpairwise, pairwise, revreference, reference, revsequential, sequential #137

Conversation

artiom-matvei
Copy link
Contributor

@artiom-matvei artiom-matvei commented Nov 2, 2024

Fix for issue #100

Issue mentions revpairwise and pairwise, but this fixes revreference, reference, revsequential and sequential as well.

@artiom-matvei artiom-matvei marked this pull request as ready for review November 3, 2024 02:24
@artiom-matvei
Copy link
Contributor Author

@vincentarelbundock please, have a look and let me know if you have any comments.

@artiom-matvei artiom-matvei changed the title fix issue #100 fixed row labels names for pairwise hypothesis fix issue #100 fixed row labels names for hypothesis= revpairwise, pairwise, revreference, reference, revsequential, sequential Nov 3, 2024
Comment on lines 158 to 172
def test_hypothesis_shape_and_row_labels(h, label, impartiality_model):
for b in ["democracy", "continent"]:
c = comparisons(
impartiality_model,
by=b,
variables={"equal": [30, 90]},
hypothesis=h,
)
assert isinstance(c, pl.DataFrame)
if b == "democracy":
assert c.shape[0] == 1
assert c["term"][0] == label[b]
else:
assert c.shape[0] > 1
assert (c["term"] == label[b]).all()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vincentarelbundock do you agree on testing the labels here?

Choose a reason for hiding this comment

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

yes, that's fine.

@vincentarelbundock vincentarelbundock merged commit f759fc9 into vincentarelbundock:main Nov 5, 2024
5 checks passed
@vincentarelbundock
Copy link
Owner

thanks a lot for this. merged

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