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

Create virtual 4C tool #378

Merged
merged 5 commits into from
Sep 7, 2022
Merged

Create virtual 4C tool #378

merged 5 commits into from
Sep 7, 2022

Conversation

Phlya
Copy link
Member

@Phlya Phlya commented Aug 19, 2022

API and CLI for virtual 4C.
No support for expected (for now?).

@Phlya
Copy link
Member Author

Phlya commented Aug 19, 2022

Example how to use. Notice that using a viewpoint larger than binsize averages all bins within it, and masks out interactions inside the viewpoint.
Screenshot 2022-08-19 at 11 02 28

Copy link
Member

@gfudenberg gfudenberg left a comment

Choose a reason for hiding this comment

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

nice!
Couple q's:

@Phlya
Copy link
Member Author

Phlya commented Aug 19, 2022

Can try to see what smoothing does to this! But I'm not sure there really is a reason to smooth this, idk...

Don't mind putting into sandbox first!

@Phlya
Copy link
Member Author

Phlya commented Aug 22, 2022

For sandbox, is there a way to make the CLI accessible somehow?..

Instead of sandbox, add a note to the docstring that this is new and experimental

@Phlya
Copy link
Member Author

Phlya commented Aug 22, 2022

And is there an example how to use the smooth function somewhere? I'm not sure what it does exactly, and how it works...

@Phlya
Copy link
Member Author

Phlya commented Aug 22, 2022

For CLI tests to pass I had to add an empty return in the end, and assert that exit code==0, not ==1, any idea why? Otherwise the code was 2. In geneal, some of out tests assert code==0, and some==1. Why is that?

@agalitsyna
Copy link
Member

Exit codes seems like a serious issue, e.g. see here (exit_code==1, but not 0 for no reason):

assert result.exit_code == 1

This is dangerous for the tests, because if it's actual mistake it can also naturally have exit_code 1 and it will be never captured by our tests.

One of the ways to debug it is to output stderr and stdout alongside with exit_code while creating tests: pallets/click#737

@Phlya
Copy link
Member Author

Phlya commented Aug 26, 2022

I think in this case it's not an issue, since with an empty return statement at the end the code is 0. And I assume if there is an actual error it won't get to the return statement and will give an error-y code. So perhaps this should be a broader discussion in a separate issue? @agalitsyna

@Phlya
Copy link
Member Author

Phlya commented Aug 26, 2022

@gfudenberg added a note that it's new and experimental, do you think it's enough?

@gfudenberg
Copy link
Member

sounds good!

one question though: would these functions make more sense as part of cooler, if they don't modify/process in any way other than querying/balancing ?
cc @nvictus

@Phlya
Copy link
Member Author

Phlya commented Aug 26, 2022

It's also averaging bins within the viewpoint...

@gfudenberg
Copy link
Member

indeed!

@Phlya
Copy link
Member Author

Phlya commented Sep 7, 2022

@gfudenberg any more comments?

@gfudenberg
Copy link
Member

nope!

@Phlya
Copy link
Member Author

Phlya commented Sep 7, 2022

Ok to merge?

@gfudenberg
Copy link
Member

fine by me!

@Phlya Phlya merged commit 5f7fd82 into master Sep 7, 2022
@gfudenberg gfudenberg deleted the virtual4c branch October 24, 2022 20:32
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.

3 participants