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

IJulia docstrings + tests #542

Merged
merged 11 commits into from
Jul 24, 2024
Merged

IJulia docstrings + tests #542

merged 11 commits into from
Jul 24, 2024

Conversation

palday
Copy link
Collaborator

@palday palday commented Jul 24, 2024

closes #141

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 93.54839% with 2 lines in your changes missing coverage. Please review.

Project coverage is 81.14%. Comparing base (b6f4f19) to head (07607ae).
Report is 2 commits behind head on master.

Files Patch % Lines
src/macros.jl 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #542      +/-   ##
==========================================
+ Coverage   80.65%   81.14%   +0.49%     
==========================================
  Files          26       26              
  Lines        1701     1671      -30     
==========================================
- Hits         1372     1356      -16     
+ Misses        329      315      -14     

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

RCall.ijulia_init()
R"plot(1:10, 1:10)"
# throws a method error when running headless !
@test_throws(MethodError, RCall.ijulia_displayplots())
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ararslan if you have a better idea, I'd be keen. I considered pirating (in the tests) display(::MIME, Vector{UInt8}) but that seemed even worse

Copy link
Member

Choose a reason for hiding this comment

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

I don't think I fully understand the context. What's the desired/typical behavior? If you want to test that it throws a method error then this seems fine...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When called in a Jupyter notebook, this will result in the R plot (written to a temporary file) being read in and then displayed using the appropriate MIME type. But when called in a plain text, headless environment, you get a method error. I'm not too worried about it since we're testing the actual behavior separately (via the nbconvert stuff above), but not in a way that codecov detects it (due to the nesting of processes). So the run here is just re-running the same code that's in the notebook so that codecov gets it.

Copy link
Member

@ararslan ararslan left a comment

Choose a reason for hiding this comment

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

I know basically nothing about IJulia and have used it no more than twice ever, I believe, so if it's a meaningful review you're after, I'm not your guy. 😛 However, I have this rubber stamp next to me and the ink is still wet...

src/ijulia.jl Outdated Show resolved Hide resolved
RCall.ijulia_init()
R"plot(1:10, 1:10)"
# throws a method error when running headless !
@test_throws(MethodError, RCall.ijulia_displayplots())
Copy link
Member

Choose a reason for hiding this comment

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

I don't think I fully understand the context. What's the desired/typical behavior? If you want to test that it throws a method error then this seems fine...

Co-authored-by: Alex Arslan <[email protected]>
@palday palday merged commit e2dd2fa into master Jul 24, 2024
14 checks passed
@palday palday deleted the pa/ijulia branch July 24, 2024 02:21
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.

Test IJulia components
2 participants