-
Notifications
You must be signed in to change notification settings - Fork 18
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
Attrs refactor #219
Merged
Merged
Attrs refactor #219
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
Codecov Report
@@ Coverage Diff @@
## master #219 +/- ##
==========================================
+ Coverage 98.80% 98.88% +0.07%
==========================================
Files 77 75 -2
Lines 5778 5997 +219
==========================================
+ Hits 5709 5930 +221
+ Misses 69 67 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Merging for now, I am feeling much better about DASCore's internals. Hopefully no more huge PRs like this one. |
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.
Description
This PR refactors how attributes work in DASCore and fixes a few other small issues.
Admittedly, this PR got a bit too large as I was working without internet on a roadtrip which made it harder to do a series of smaller PRs.
Here are the highlights:
Rather than containing {dim}_min, {dim}max, d{dim} there is now a coordinate dictionary attached to the attributes. This allows for arbitrarily named dimensions to be tracked rather than just time and distance.
In light of 1, attrs.{dim}min, attrs.{dim}max, attrs.d{dim} are still accessible, but they are just properties which fetch the correct attributes from the coordinates dictionary. attrs.d{dim} is deprecated in favor of attrs.{dim}_step which is more clear and fits better when attribute names are sorted.
PatchSummary
is no longer a public facing class, butPatchAttrs
can just be to summarize a patch.Now only time is used to index a patch by
DirectorySpool
and other dimensional queries are fully supported.DASCore's
DirectorySpool
now keeps track of where index files for each directory, so if a non-default index is specified it will be used with each new DirectroySpool without having to specify it. Also, if the user can't write to the data directory, a new, suitable location is chosen automatically.Patch.__init__
andPatch.new
now behave in a more structured way.Fixes Time axis label in waterfall plots #213
Fixes Better unit display #209
Fixes support for datetime and timedelta #207
Fixes Can't get gauge length from attributes - PRODML v. 2.0 format #194
Fixes DASCore index to support missing time or distance values #163
Fixes Could not index PRODML v. 2.0 format #221
Checklist
I have (if applicable):