-
Notifications
You must be signed in to change notification settings - Fork 35
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
Silent failures in straw/straw.py #42
Comments
I've got a branch that fixes these issues ready to compare. Some conflicts will be raised as it stands, so if the following could be answered, I could make the changes necessary to avoid the conflicts before merging:
|
Sorry we dropped the ball on this and thanks for all your work on this
repository.
For now I think it would be good to maintain compatibility with 3.<6, but
we are willing to hear other opinions.
For invalid norms - people can add arbitrarily named norms to hic files so
there's no such thing as an invalid norm anymore.
…On Sat, Oct 26, 2019 at 9:07 PM srcoulombe ***@***.***> wrote:
I've got a branch that fixes these issues ready to compare. Some conflicts
will be raised as it stands, so if the following could be answered, I could
make the changes necessary to avoid the conflicts before merging:
1.
The "norm" parameter to straw/straw.py is no longer being checked as
per 80644d9
<srcoulombe@85045e5>.
Should invalid norm values trigger an exception statement which would print
the valid norm values?
2.
Is there an incentive to maintain compatibility for python 3.<6? I'm
just asking because if we can assume users will have python 3.6+, then
f-strings would make some parts of the code much more legible.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#42?email_source=notifications&email_token=AAK2EW3UTTNKPGZRIFSRBL3QQTSVDA5CNFSM4JFPO572YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECKUD7I#issuecomment-546652669>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAK2EW3ZX64QSRZAETGBCX3QQTSVDANCNFSM4JFPO57Q>
.
--
Neva Cherniavsky Durand, Ph.D.
Pronouns: she, her, hers
Assistant Professor, Aiden Lab
www.aidenlab.org
|
Is your feature request related to a problem? Please describe.
Some functions in straw/straw.py print a message and return -1 when unexpected outcomes are encountered. Checking for a returned value of -1 could help, but 1) this isn't currently done in the code, 2) isn't ideal as it delegates the responsibility of catching these exceptions outside of the relevant function. Worse, it can let execution carry on for a while and then trigger an unexpected and hard-to-trace exception when the -1 value is subsequently used.
Describe the solution you'd like
Explicitely raising typed exceptions with informative messages and documenting common cases for their occurrence.
Describe alternatives you've considered
None, but suggestions are encouraged.
Example
The text was updated successfully, but these errors were encountered: