-
-
Notifications
You must be signed in to change notification settings - Fork 218
Pr/1183 #1185
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
Pr/1183 #1185
Conversation
Hm, can you explain how that is supposed to work when a) we have no Makefile and b) nobody calls make test and c) you only committed to It has been a while since I wrote new non-standard tests but we have a lot of them in the package you could study. There are even ones for package building etc (though not all may run at all times). One could attempt building a package (including a call to |
If @traversc is not familiar with |
Me too, of course. Always happy to help with |
@traversc Checking your |
And we have done just that: embed mock packages bnelow inst/tinytest/ to be used (only !!) by the tests. |
Okay, I added some tiny tests. The test script is test_attribute_package.R which builds the package testRcppAttributePackage. The test script tests two things:
The test package only contains correct syntax so doesn't test for handling incorrect syntax within a package, but since it's the same code path to build R function signatures inline and via package, I think that's 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.
Comments inline. Also, please:
- Add yourself to the copyright header in the
src/attributes.cpp
file. - Rebase this branch to avoid conflicts with the latest changes in Adding Rcpp signature attribute #1183.
## This now (Dec 2011) appears to fail on Windows | ||
.onWindows <- .Platform$OS.type == "windows" |
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.
Did you test this? Does this fail on Windows?
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.
I went ahead and tested it on windows.
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.
And... does it work?
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.
Tested and working on windows (and also in CI).
@Enchufa2 Replies inline. A bunch of commits for minor things, but hopefully they can be squashed at the end. Also, one comment: I noticed the ChangeLog is a mixture of spaces and tabs -- is that intentional? |
Looking very good, thanks for all the changes! I left a few more comments. I also activated the CI and everything passes (don't worry about the covr report).
Sure, no problem.
Yeap, I asked the same thing some time ago, but I don't recall @eddelbuettel's answer. :) |
Spaces vs tabs is accidental, we don't have control over all the editors in the world. I usually just resists global changes across the file as large white-space only commits are just noise. I can clean it up another time (there is yet another emacs function for it that does it well). |
Yes. We actually addressed that in the branch this would merge into. So thanks for making all the changes (even if you some commits are sequentlial with the same commit message --> I prefer the |
Updated, hopefully I addressed everything properly this time :) |
That looks pretty good now. There are two trivial whitespace things I might change but it's not worth making an issue over now. |
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.
Yep that's the idea: by squashing it into our pr/1183 branch the pending PR #1184 should auto-update. Giving that a whirl now. |
I added some syntax checking based on @Enchufa2 's feedback.
Tests here: https://github.com/traversc/RcppTest/tree/master/inst. These tests incorporate the examples from @Enchufa2.
Currently, you can run them with
make install && make test
, but I'm not sure the best way to add the tests as a pull request.