-
Notifications
You must be signed in to change notification settings - Fork 25
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
Return file version #181
Return file version #181
Conversation
Thanks for the PR. I like your idea of mirroring the behavior of Do you have a specific instance were you want to use version_id instead of version_no? I've been working on adding a function, |
I believe the version_id is unique but the version_no is more inferred from modification dates? For my purposes, I need to have a direct identifier to the version and I think file_id & version_id provide that but version_no may not. |
Got it. Paired with a file_id, either a version_id or version_no is enough. Numbers are inferred, but the Box web-app does that too. I've personally found it humanly easier to work with version_no, but I like your idea of having both easily available to users. |
I agree, especially if using both boxr and Web App, the version_no is more straightforward to work with. I do think both should be provided. One case where the version_id matters is (at least in the enterprise version) is the URL for file version. This has the form https://{company_name}.app.box.com/file/{file_id}?sb=/activity/versions/{version_id} and as far as I know version_no can't be used in this way. |
Let me put my own spin on We are currently working on a successor to One of the things I might like to implement in For In short, I think that it would be good to standardize on the use of There's another PR that I want to get wrapped-up first, then we may have some specific suggestions for this one. Thanks! |
Another question - perhaps to the universe than to anyone specifically: the use of Of course, it was done this way for a reason - I would like to feel good about the reason while we have the question on the floor. |
Finally (for now), welcome @alexbrodersen! So that you can feel fully a part of the fun: I had a quick look through our code, and see that we refer to both As a first thought, it might be easiest for {boxr} to standardize on (As a side note, this discussion has really helped me clarify my thinking on |
@ijlyttle Regarding depreciating a column in a return variable, I suppose this may represent a breaking API change, and boxr should increment version number if it's completely removed? I do think the easiest solution, for now, is to leave that as is and extend the return with the new variables. Regarding |
Here's what I get from grep for the list of where version_id vs file_version_id is used. I can update my PR to change this based on whatever is decided?
|
Hi @alexbrodersen, I think we are on the same page here. If I were starting the package from scratch, I might have chosen We do plan to change the version number, but I think it would be "rude" for the The PR is in good shape now - I plan to get #159 taken care of immediately, then come back with specific suggestions for this PR - none of which will be very big or surprising. |
IMO if we keep The box web app also must be doing a similar version inference because it displays a v1, v2, v3, ... badge next to file names and in the version menu. I think we should continue to support both (human readable number and full ID) like |
Sounds good to me! I can provide some specific feedback here shortly. |
@alexbrodersen, I hit the wrong button before I could summarize the review. I don't think there is too much to do, once you are done, I'll be happy to bump the version. As @nathancday points out, it will be good to have a test, but I had a look at the test and it's not too user friendly, so I will be happy to add a test before merging. |
Merge remote-tracking branch 'refs/remotes/origin/master' Conflicts: DESCRIPTION
Codecov Report
@@ Coverage Diff @@
## master #181 +/- ##
==========================================
- Coverage 55.88% 2.91% -52.98%
==========================================
Files 24 25 +1
Lines 1555 1785 +230
==========================================
- Hits 869 52 -817
- Misses 686 1733 +1047
Continue to review full report at Codecov.
|
@alexbrodersen I'm doing some other work that will need to incorporate yours, so I hope it's OK that I made the changes. @nathancday can you have a look to make sure what I've done is OK? |
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.
Returning version_no
feels weird, the two identical columns. What about just version
and version_id
? Keep the legacy and add Alex's improvement for id
The legacy was already split; I prefer |
Yea totally forgot about the existing split across args. Sounds good to have the weirdness of dupes for consistancy. |
Thanks @alexbrodersen! |
The file version_id can be useful for tracking versions but is not available in box_previous_versions for the currently "active" version of the file. This pull request updates box_ls() and the s3 as.data.frame method to include the version_id, as well as alters the name of the value of the current "version" to "version_no".