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

Data repo #303

Closed
wants to merge 33 commits into from
Closed

Data repo #303

wants to merge 33 commits into from

Conversation

ThierryO
Copy link
Member

This PR solves #301. It is mainly a port from functions available in our n2khelper package. Therefor, the testthat framework is used for unit testing.

Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
Signed-off-by: Thierry Onkelinx <[email protected]>
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.1%) to 76.507% when pulling 5d72b62 on ThierryO:data_repo into 047a9ba on ropensci:master.

Signed-off-by: Thierry Onkelinx <[email protected]>
@ThierryO
Copy link
Member Author

Don't merge yet. I'll be adding some more unit tests

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 77.852% when pulling 1267d58 on ThierryO:data_repo into 047a9ba on ropensci:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 77.941% when pulling 36e3d63 on ThierryO:data_repo into 047a9ba on ropensci:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 77.941% when pulling 36e3d63 on ThierryO:data_repo into 047a9ba on ropensci:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 77.87% when pulling 3a44df0 on ThierryO:data_repo into 047a9ba on ropensci:master.

@stewid
Copy link
Member

stewid commented Jan 4, 2018

Hi @ThierryO

I have looked through the code and have identified two calls to command-line git that we must replace with functionality in git2r. Unfortunately, neither git ls-tree -r HEAD path nor git log -n 1 --date=iso path are yet supported in git2r, but I can fix that, hopefully tomorrow. I have also identified a couple of places where we can use functionality already in git2r, for example, is.git -> in_repository. But let me start by adding new functionality.

Thanks

@ThierryO
Copy link
Member Author

I'll update the PR when the new functionality becomes available.

@stewid
Copy link
Member

stewid commented Jan 19, 2018

I have added the ls_tree functionality.

head(ls_tree(repo = "."))
#>     mode type                                      sha path            name   len
#> 1 100644 blob 1257be2f7b69861fd93ec186b063c05b87f296dc        .Rbuildignore   245
#> 2 100644 blob b61efef40fb2b94bad32c5f15244e7cb8fa3c491           .gitignore   255
#> 3 100644 blob 87a0f9d2621ee32df25023a70c819a6144dc2d3c          .travis.yml   898
#> 4 100644 blob c5cde7bc087d0595661f9ffc8737e5455f79e3b9      CONTRIBUTING.md  7811
#> 5 100644 blob 31857cf173efc03ceda2d65b6d0e301faed7693d          DESCRIPTION  1396
#> 6 100644 blob d7f105139782ab695d86613e343916f7372f4ac0              LICENSE 18026

I'm currently changing S4 methods to standard R functions and S4 classes to S3 classes. This might take me a couple of weeks. Since that work also affect code in this PR, I let you know when I have completed it.

@ThierryO
Copy link
Member Author

I'm curious why you want to switch from S4 to S3.

@stewid
Copy link
Member

stewid commented Jan 25, 2018

The reason I want to switch to S3 is to simplify the design and make future development easier. With this change, most of the R functions are one-liners that only pass data to the C-level of git2r.

@ThierryO
Copy link
Member Author

I'm working on a new (and improved) version of this based on the new S3 classes.

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 this pull request may close these issues.

3 participants