-
Notifications
You must be signed in to change notification settings - Fork 73
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
Preserve translated functions hidden as they are in R #719
base: master
Are you sure you want to change the base?
Conversation
The failed Travis CI job is irrelative. I'm not making changes to |
The builds on Travis are broken. CI for the project is moving to GitHub Actions. |
Thanks. I had a look at the PR and I agree that package wrapper objects should only expose R objects exported by the R package. There is already code that indicates that this was the intent at some point in time, but if it is not the case something happened along the way (which might simply be that the extensive testing of this never happened). As it is the PR seems to change more code than necessary (e.g., the constructor for I am adding this as a bug to fix (issue #724) and hope to have a solution soon. |
Thank you for your review @lgautier. Sorry for not putting this up in the first place. To show the change made to Listing below reproduce steps to make it clearer:
The problem is that Admittedly, though, this problem reveals itself with the changes made to |
Codecov Report
@@ Coverage Diff @@
## master #719 /- ##
==========================================
Coverage 78.47% 78.53% 0.05%
==========================================
Files 39 39
Lines 5999 6011 12
==========================================
Hits 4708 4721 13
Misses 1291 1290 -1
Continue to review full report at Codecov.
|
Statement of Issue
Hidden R functions are not differentiable from the exported ones after translation.
Purpose
Maintain the "hidden" property of functions, to avoid confusion and misuse for any rpy2-wrapped Python lib's user.
Root Cause
symbol_r2python()
is not provided with context information, namely, what functions are exported.Changes
Passed in exported function names when carrying out the symbol mapping in the implementation
default_symbol_mapper
. And prefixing translated function names with double underscore__
following Python naming convention.The initiation of
WeakPackage
objects has been changed to avoid the side effects ofPackage.__init__
- specifically onself._exported_names
. This is reflected in the added testcase:Impacts
Any existing usages of unintentionally exposed hidden functions will break.
Tests
Unit test case added