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 63Continue to review full report at Codecov.
|
spylon_kernel/init_spark_magic.py
Outdated
|
|
||
| globals_dict = self.env | ||
| exec(self.code, globals_dict) | ||
| application_name = globals_dict.get('application_name', None) |
There was a problem hiding this comment.
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.
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.
Since I instantiate it as None, get is never actually going to return the default. Removing it for clarity.
|
🍰 |
Addresses #23