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

Facilitate Jupyter testing with nbmake #418

Merged
merged 4 commits into from
Sep 22, 2022
Merged

Conversation

thewtex
Copy link
Collaborator

@thewtex thewtex commented Sep 21, 2022

With nbmake, the connection file is a temp file such as '/tmp/tmpabc123.json'. Use the name of this file for the kernel id in this case.

@thewtex thewtex requested a review from oeway September 21, 2022 19:04
@thewtex
Copy link
Collaborator Author

thewtex commented Sep 21, 2022

CC @bnmajor

Copy link
Contributor

@oeway oeway left a comment

Choose a reason for hiding this comment

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

Great! Thanks!

else:
# nbmake
self.kernel_id = Path(connection_file).stem
print('kernel_id', self.kernel_id)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to keep the print statement here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah, no! :-)

@oeway
Copy link
Contributor

oeway commented Sep 21, 2022

Could you please run black . to fix the format error too?

With nbmake, the connection file is a temp file such as
'/tmp/tmpabc123.json'. Use the name of this file for the kernel id in
this case.
@thewtex
Copy link
Collaborator Author

thewtex commented Sep 22, 2022

Could you please run black . to fix the format error too?

Yes, done 👍

Could we please get a release with this? It will help us get started on testing 💚

@oeway
Copy link
Contributor

oeway commented Sep 22, 2022

Great!

Could we please get a release with this? It will help us get started on testing 💚

Yes, the CI will make the release if we change the version number in 3 places (VERSION file, pakcage.json and pakcage-lock.json).

@oeway oeway merged commit 4a8156b into imjoy-team:master Sep 22, 2022
@thewtex
Copy link
Collaborator Author

thewtex commented Sep 22, 2022

@oeway awesome, thanks!

@thewtex thewtex deleted the nbmake branch September 22, 2022 01:42
connection_file = ipykernel.connect.get_connection_file()
if "kernel-" in connection_file:
self.kernel_id = re.search(
"kernel-(.*).json", ipykernel.connect.get_connection_file()
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we not use connection_file here in the re.search call?

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