-
Notifications
You must be signed in to change notification settings - Fork 7
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
Specialized Python exceptions #36
Specialized Python exceptions #36
Conversation
3b837f0
to
29e9dc6
Compare
BBIReadRaw::BigBedFile(_) | BBIReadRaw::BigBedFileLike(_) => { | ||
return Err(BBIFileClosed::new_err("Not a bigWig.")) | ||
} | ||
#[cfg(feature = "remote")] | ||
BBIReadRaw::BigBedRemote(_) => return Err(BBIFileClosed::new_err("Not a bigWig.")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these error types / messages correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that doesn't look right. Not sure the right exception but it shouldn't be file closed.
Thinking about it, could make BigWig and BigBed subclasses which effectively have no differences except extra methods.
Or just also implement this for bigBeds akin to values.
1d796d9
to
8318a0c
Compare
a84f7cc
to
f4160f4
Compare
Update test_bigwig tests Linting Update tests Update tests Add bigbed fixture Update tests Add test for info method
Update docstrings
f4160f4
to
4241744
Compare
ci: Install pybigtools[test] for testing
4241744
to
0591832
Compare
Exception
raises withValueError
,KeyError
,BBIFileClosed
orBBIReadError
.b.chroms(chrom)
will raise aKeyError
instead of returning None ifchrom
does not exist. This seems less surprising to me. The former behavior can be achieved more explicitly withb.chroms().get(chrom)
.open
supportpathlib.Path
objects.chrom
andend
args optional forb.values()
as inrecords
andzoom_records
.