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

Clean up and add docstrings #539

Merged
merged 9 commits into from
Jul 24, 2024
Merged

Clean up and add docstrings #539

merged 9 commits into from
Jul 24, 2024

Conversation

palday
Copy link
Collaborator

@palday palday commented Jul 18, 2024

No description provided.

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.69%. Comparing base (b6f4f19) to head (2bd1599).

Files Patch % Lines
src/types.jl 70.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #539      +/-   ##
==========================================
+ Coverage   80.65%   80.69%   +0.03%     
==========================================
  Files          26       26              
  Lines        1701     1704       +3     
==========================================
+ Hits         1372     1375       +3     
  Misses        329      329              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@palday palday requested review from dmbates and ararslan July 19, 2024 07:02
src/callback.jl Outdated Show resolved Hide resolved
Copy link
Member

@dmbates dmbates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning this code up. I have a couple of minor suggestions.

I noticed that the tests on nightly are failing, apparently because of a change in the REPL implementation. I assume the failure is unrelated to these changes. Is that the case?

src/types.jl Outdated Show resolved Hide resolved
src/callback.jl Outdated Show resolved Hide resolved
@dmbates
Copy link
Member

dmbates commented Jul 19, 2024

I'll let @palday handle the merging of the changes in base into this branch. Those kinds of git operations make me want to run away and hide.

src/types.jl Outdated Show resolved Hide resolved
src/types.jl Outdated Show resolved Hide resolved
src/types.jl Outdated Show resolved Hide resolved
src/types.jl Outdated Show resolved Hide resolved
@ararslan
Copy link
Member

I assume the failure is unrelated to these changes. Is that the case?

Yes, nightly has been failing on all recent PRs.

src/callback.jl Outdated Show resolved Hide resolved
@@ -213,23 +505,26 @@ mutable struct RObject{S<:Sxp}
r
end
# SymSxps are not garbage collected, so preserve not necessary.
RObject{S}(p::Ptr{SymSxp}) where S = new{S}(p)
RObject{SymSxp}(p::Ptr{SymSxp}) = new{SymSxp}(p)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't functionally the same as what was written but I'm not sure whether what was written before was intentional. It was implicitly relying on convert(Ptr{S}, p::Ptr{SymSxp}) but I don't know enough about how this package works to know whether that's a sensible conversion to do. With this change, RObject{S}(::Ptr{SymSxp}) for S != SymSxp will be a MethodError, won't it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think it will be a method error, but I think that having a method error there makes sense. The usual call would be RObject(p), which invokes this definition:

RObject(p::Ptr{S}) where S<:Sxp = RObject{S}(p)

and thus would always use the narrowest possible construction.

@palday palday enabled auto-merge (squash) July 23, 2024 19:09
@palday palday requested a review from ararslan July 23, 2024 20:58
@palday palday merged commit 12fdd5b into master Jul 24, 2024
15 checks passed
@palday palday deleted the pa/docstrings_types branch July 24, 2024 01:52
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