-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fix #23: Expose application_name to magic #24
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24 +/- ##
==========================================
+ Coverage 85.31% 85.48% +0.16%
==========================================
Files 6 6
Lines 429 434 +5
==========================================
+ Hits 366 371 +5
Misses 63 63 Continue to review full report at Codecov.
|
spylon_kernel/init_spark_magic.py
Outdated
@@ -37,8 +39,9 @@ def cell_init_spark(self): | |||
|
|||
globals_dict = self.env | |||
exec(self.code, globals_dict) | |||
application_name = globals_dict.get('application_name', None) |
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'm looking at a diff quickly, but I'm guessing you could just put "ScalaMetaKernel" here in place of the None and remove the check later. Also, it should probably be "spylon-kernel" by default.
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.
How about a global DEFAULT_APPLICATION_NAME
in scala_interpreter.py
that can be used in both files? I just used "ScalaMetaKernel"
as it's the init_spark_session
default.
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.
Since I instantiate it as None
, get
is never actually going to return the default. Removing it for clarity.
🍰 |
Addresses #23