-
Notifications
You must be signed in to change notification settings - Fork 13
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
Refactor / rewrite / remove convert.py #24
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
as part of refactor
These help test the EMBLFeature methods without involving the __init__ method
Don't compare dicitonaries with assertItemEquals, it only looks at keys
TODO: - tests are failing because the features / contigs are in a different order - remove duplication in Writer - delete some code - rename Writer
I'm not sure how this slipped through but the format of the features was wrong
fix some whitespace
As discussed
|
For some reason, despite deleting convert.py, the tests kept passing until I did a git clean. Must be a *.pyc thing.
The source feature within the EMBLHeader is now an actual EMBLFeature. This is so that it wraps nicely onto the next line just like other features
Made updates as discussed above |
andrewjpage
added a commit
that referenced
this pull request
Mar 19, 2015
Refactor / rewrite / remove convert.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As suggested, I've mostly focused on
convert.py
and made minimal changes elsewhere.I've gone for something a like a
Factory
without going too class mad. I could probably have added something likeFeatureFactory
orAttributes
or anAttributeFactory
but I don't think it would make things any readable yet.There is probably a little bit more that could be done in
EMBLWriter
. I'd consider little changes like passing around file handles rather than filenames which means that you could use aStringIO
in the tests (rather than writing to disk).Comments / suggested changes are welcome though :)