-
Notifications
You must be signed in to change notification settings - Fork 42
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
Proposal: read.adp.ad2cp() should only read one "data type" #2005
Comments
|
Two very good ideas, thanks. |
Work on this issue, likely to begin on the weekend, will be in a branch named |
@richardsc I'd like to settle on the param name. I'll give some notes, then I'll vote, and then I'll ask you to vote. Presently, we have an argument that does this called I'm not keen on I prefer My vote:
Can you vote, @richardsc so I can make a plan? |
I vote +1 for |
Good. I'll go with |
As usual, I am starting with the documentation. It is below, in first-draft form, so the wording might change but not the meaning -- unless @richardsc interjects soonish. As I go along, I am also modifying the test suite as appropriate. But I have not commented-out the now-failing tests, so that the package in this branch will not build-test without error. (I want those errors to tell me what to do next.) |
Here's an example of the unspecified- [1] "~/Dropbox/oce_secret_data/ad2cp/secret1_trimmed.ad2cp"
> read.adp.ad2cp(f1)
IDhex IDdec name occurance
1 0x15 21 burst 88
2 0x16 22 average 11
3 0xa0 160 text 1 |
NB: I'm changing some warnings to messages, because they don't indicate a problematic state. This will involve changing tests like expect_warning(
expect_warning(
d1 <- read.oce(f1, dataType="average"),
"using to=100 based on file contents"),
"setting plan=0") to read instead like expect_message(
expect_message(
d1 <- read.oce(f1, dataType="average"),
"using to=100 based on file contents"),
"setting plan=0") An advantage of this is that people might use |
I've made some progress in the "i2005" branch, commit b2199da. Only a small part of plotting is known to work (and I've not even begun to update its documentation). |
I am going to use this comment, which will be edited in-place, for a checklist of items remaining to be done.
|
I have started looking at this again, because I want this in the new CRAN. As a first step, I updated "ad2cp" based on "develop". Then I updated "i2005" based on "ad2cp" (which was tricky because there was a merge conflict that amounted to several hundred lines). Then I tested "ad2cp" and since it passed, I deleted the "i2005" branch. My next step will be to merge "ad2cp" into "develop", and then to delete "ad2cp". Why the branch deletions? Because the longer code sits in a branch other than "develop", the more likely it becomes that there will be merge conflicts that (a) waste my time and (b) may introduce errors because it's hard to compare logic flow across similar-but-different 200-line code chunks. Since the |
I've merged the "ad2cp" branch into "commit", and deleted "ad2cp" locally and on github. |
@richardsc I think this issue ought to be closed. It was basically completed a few months ago, and if there are problems, they ought to be discussed in new issues. Note that the "ad2cp" branch no longer exists; testing ought to be done in the "develop" branch. Closing this gets us one step closer to being able to contemplate a CRAN release. And I always like to have a month or so of stable code before doing that. I am not too worried that |
During a discussion, CR and I decided to merge this. I've done that, checked that local build/check works, and pushed to GH as commit 68fb448 of the "develop" branch, so I am closing this issue. |
Basically, rather than try and read all the present data types into a single object (currently handled by doing, e.g. obj@data$average$... for the 'average' data type), we create an argument for
read.adp.ad2cp()
that specifies which one to read. The argument could betype
ordataID
ordataType
(I like the latter).This allows objects to fit the traditional oce style of
@data
and@metadata
slots, without mixing up things that have different data fields and metadata. If an analyst needs to work with more than one of the data types together (e.g. velocities and echosounder), they can devise their own methods based working with the separate objects.The text was updated successfully, but these errors were encountered: