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

♻️ Make ipylab an optional dependency #282

Merged
merged 2 commits into from
May 6, 2024
Merged

♻️ Make ipylab an optional dependency #282

merged 2 commits into from
May 6, 2024

Conversation

falexwolf
Copy link
Member

No description provided.

Copy link

github-actions bot commented May 6, 2024

@github-actions github-actions bot temporarily deployed to pull request May 6, 2024 22:21 Inactive
Copy link

codecov bot commented May 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.35%. Comparing base (98974e1) to head (c50efa4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #282      +/-   ##
==========================================
+ Coverage   89.22%   89.35%   +0.13%     
==========================================
  Files          24       24              
  Lines        1039     1033       -6     
==========================================
- Hits          927      923       -4     
+ Misses        112      110       -2     

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

@falexwolf falexwolf merged commit 8b8afd5 into main May 6, 2024
5 checks passed
@falexwolf falexwolf deleted the ipylab branch May 6, 2024 22:37

# trying to init ipylab JupyterFrontEnd can lead to errors on jupyter notebook
try:
_init_frontend()
Copy link
Member

@Koncopd Koncopd May 6, 2024

Choose a reason for hiding this comment

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

I don't agree with this, this is here for a good reason and definitely should be called if ipylab is installed. I would prefer to revert this, also it is in try catch block, so no problems if ipylab is not installed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't very much mind if this is being reverted if it's not preventing to eliminate ipylab:

I removed it because I thought it may cause latency due to the error.

Alternatively, we port everything we need from nbproject into lamindb and no longer rely on nbproject.

But to be honest, I don't think anybody uses these interactive features, so, I don't think it's worth investing anytime that's not meant to streamline lamindb (make lamindb higher quality, faster, more lightweight, etc.).

Copy link
Member

Choose a reason for hiding this comment

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

The problem is that ipylab is used not only for interactive features, but also for detecting the notebook path if everything else fails, this is relevant for some cloud services and we should add a warning in such cases.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I saw this! If it's hitting it's now going to error with ipylab isn't installed. And if this is actually occurring somewhere, we'll then learn about it.

The logic is still there! I just made ipylab optional.

Copy link
Member

Choose a reason for hiding this comment

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

But it should not error in this case, it should till try the environment variable. Ok, i will make a PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, please, just make a PR that restores what you think should be there.

I also think it's perfectly fine if nbproject has an ipylab extra, but I'd prefer to not install it through lamindb[jupyter].

@Koncopd
Copy link
Member

Koncopd commented May 6, 2024

Can we pause this until i analyse how to disentangle this properly?

@Koncopd
Copy link
Member

Koncopd commented May 6, 2024

We should have an extra for ipylab and a warning somewhere at least. But i don't think it makes sense at all to have nbproject without ipylab.

@falexwolf
Copy link
Member Author

extra for ipylab

I hope we get away without ipylab. The jupyter lab extra is already too complicated, but we may need to keep it.

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.

2 participants