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

split skbio.util.exception into subpackage-specific exception modules #577

Closed
jairideout opened this issue Aug 6, 2014 · 2 comments · Fixed by #581
Closed

split skbio.util.exception into subpackage-specific exception modules #577

jairideout opened this issue Aug 6, 2014 · 2 comments · Fixed by #581
Assignees

Comments

@jairideout
Copy link
Contributor

@ebolyen, @gregcaporaso, and I discussed the following:

skbio.util.exception has many exceptions, most of which are specific to subpackages. For example, there are several exception classes specific to distance matrices, while others are specific to trees. Many of the names are not immediately obvious; for example, it isn't clear what skbio.util.exception.NoLengthError refers to (it happens to be a tree-related error, but could easily apply to a sequence or alignment). Likewise, it isn't obvious that skbio.util.exception.MissingIDError is related to distance matrices.

We propose that each subpackage has its own exception (and warning, if there are any) module with these custom types defined. These exceptions/warnings will be included in the subpackage documentation, just as functions and classes are documented.

This has the advantage of making the exception types clearer; in the above example, skbio.tree.exception.NoLengthError is more descriptive than skbio.util.exception.NoLengthError. This also prevents us from having a huge exception/warning file that contains all exceptions/warnings defined in scikit-bio.

If there are any truly general exceptions or warnings, these will live at a top-level skbio.exception/skbio.warning module.

Assigning to myself.

@wasade
Copy link
Collaborator

wasade commented Aug 6, 2014

+1, that is awesome. A subpackage specific error module could be useful too

@gregcaporaso
Copy link
Contributor

👍

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 a pull request may close this issue.

3 participants