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

Add ability to have default config options for spark #830

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

c2zwdjnlcg
Copy link
Contributor

@c2zwdjnlcg c2zwdjnlcg commented Aug 17, 2023

Adds a session_configs_defaults config option that gets merged with session_configs

This way users can use the configure magic to change session configs but any settings set in as defaults are preserved unless explicitly overridden by the user

Checklist

  • Wrote a description of my changes above
  • Formatted my code with black
  • Added a bullet point for my changes to the top of the CHANGELOG.md file
  • Added or modified unit tests to reflect my changes
  • Manually tested with a notebook
  • If adding a feature, there is an example notebook and/or documentation in the README.md file

@dosubot dosubot bot added the kind:enhancement A new Sparkmagic feature label Aug 17, 2023
@devstein devstein self-requested a review August 17, 2023 15:15
Copy link
Collaborator

@devstein devstein left a comment

Choose a reason for hiding this comment

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

@c2zwdjnlcg Thanks for making a PR! This is a common feature request from users.

I like the implementation -- it's simple, but satisfies the requirements.

Copy link
Member

@Carreau Carreau left a comment

Choose a reason for hiding this comment

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

I don't have much experience with sparkmagic, but things seem ok to me.

If anything maybe a docstring in def _recursive_merge that warns the both(?) arguments are mutated and that it is recommended to deepcopy them before passing it in – which you do when you use it. But it my not be obvious at first glance.

Adds a session_configs_defaults config option that
gets merged with session_configs

This way users can use the configure magic to change
session configs but any settings set in as defaults
are preserved unless explicitly overridden by the user
@c2zwdjnlcg
Copy link
Contributor Author

I don't have much experience with sparkmagic, but things seem ok to me.

If anything maybe a docstring in def _recursive_merge that warns the both(?) arguments are mutated and that it is recommended to deepcopy them before passing it in – which you do when you use it. But it my not be obvious at first glance.

Added a docstring to recommend deepcopy

@devstein
Copy link
Collaborator

@c2zwdjnlcg Thanks for contributing!

@devstein devstein merged commit 54a3690 into jupyter-incubator:master Aug 24, 2023
1 check passed
@c2zwdjnlcg
Copy link
Contributor Author

@devstein thanks for merging. When is the next release scheduled for?

@devstein
Copy link
Collaborator

@c2zwdjnlcg I need to fix an outstanding issue with CI failing (help is welcome!).

Once that's fix I'll create a new release. I'm busy with other work, so my best guess is 2-3 weeks

@c2zwdjnlcg
Copy link
Contributor Author

thanks, i opened #831 hopefully that helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:enhancement A new Sparkmagic feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants