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

Fix binder #5257

Merged
merged 9 commits into from Jul 18, 2023
Merged

Fix binder #5257

merged 9 commits into from Jul 18, 2023

Conversation

MarcSkovMadsen
Copy link
Collaborator

@MarcSkovMadsen MarcSkovMadsen commented Jul 14, 2023

@MarcSkovMadsen MarcSkovMadsen changed the title Fix/binder Fix binder Jul 14, 2023
@@ -139,3 +139,13 @@ doc/reference/*
!/panel/dist/css
!/panel/dist/css/*.css
.venv2/
.npm/*
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The files below are added to the root of the Panel project on binder. So to not show them in VS code git changes I remove them.

@philippjfr
Copy link
Member

pre-commit.ci autofix

@philippjfr
Copy link
Member

@maximlt How much of a pain would this rebase be for you if I merged it right now?

@maximlt
Copy link
Member

maximlt commented Jul 14, 2023

No problem go for it.

@MarcSkovMadsen
Copy link
Collaborator Author

Thanks guys. I'm just checking once more on Binder to be 100% certain this works.

@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Merging #5257 (19ac7b0) into main (f2cefe3) will decrease coverage by 0.23%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #5257      +/-   ##
==========================================
- Coverage   83.83%   83.60%   -0.23%     
==========================================
  Files         274      274              
  Lines       39606    39649      +43     
==========================================
- Hits        33203    33149      -54     
- Misses       6403     6500      +97     
Flag Coverage Δ
ui-tests 39.53% <ø> (-1.03%) ⬇️
unitexamples-tests 73.72% <ø> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 15 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@MarcSkovMadsen
Copy link
Collaborator Author

With the Fix Binder PR at least I have one place to point users to a working environment. It might not be optimal and well performing. But its there.

At work we can have a new employee up and running on our Jupyter hub with tools, repositories, python environments, data etc. in 15 minutes. When we install repositories for development we can always just do pip install -e .[dev]. When we want to build the docs we can just do mt build.docs etc. So its very, very easy for people not familiar with coding, git etc. to get started.

I would really, really love to get closer to a situation like that for this project too.

@philippjfr
Copy link
Member

philippjfr commented Jul 14, 2023

Indeed, that's the goal of the hatch work. The main difference to the packages you're used to is that we also have non-Python dependencies (e.g. nodejs) and that there are additional build steps needed such as invoking npm and running the bundling step. For the doc builds to become more tractable we'll have to find ways of doing only partial builds because there's no way getting around the fact that even on a good machine a full docs build will take over an hour.

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Jul 14, 2023

We also have lots of non-python dependencies. But they are pre-installed on the docker notebook/ vs code images we provide to developers.

That is why I wanted to try getting it working for codespaces in #5250

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Jul 14, 2023

This PR has been tested in practice with success.

  • pytests panel/tests works
  • vscode works
  • panel apps works

image
image
image

@maximlt
Copy link
Member

maximlt commented Jul 15, 2023

At work we can have a new employee up and running on our Jupyter hub with tools, repositories, python environments, data etc. in 15 minutes. When we install repositories for development we can always just do pip install -e .[dev]. When we want to build the docs we can just do mt build.docs etc. So its very, very easy for people not familiar with coding, git etc. to get started.

Oh I'm sure you're not comparing the capabilities of a large energy company with those of an OSS project! Good job anyway, of course not all large companies have such a good set up process, it must be great to work at your place.

We also have lots of non-python dependencies. But they are pre-installed on the docker notebook/ vs code images we provide to developers.

I have never had to use a docker image to contribute to a Python project. I can easily imagine that would be a barrier to contribution.


Overall what we have is:

  • complex and large environments to build, there are not many Python projects like Panel or HoloViews that integrate with so many other libraries
  • many projects to manage, making sure it's done in a consistent way
  • deep and widespread tech debt to handle with pyctdev, nbsite, etc.
  • a complicated python packaging/project management landscape, we're going to try hatch and to be honest it's hard to know whether it's a good choice yet. It might well be that pdm becomes the most popular one and in two years hatch is unmaintained and we're back to square one.
  • unsurprisingly contributors don't fancy that much helping with infra work

There's no magic trick to improve all of that, you just have to put in a lot of hard work. What would help a lot would be dedicated funding, maybe there are special funding for helping OSS projects with managing their infrastructure and improving their contributor's experience. I doubt any company would fund that work, but who knows!

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Jul 15, 2023

Just to be sure. Users dont care about or use Docker. They just log into jupyter or vs code on the web.

Its the same that binder and codespaces provides. Ours is just more powerful and with resources and data integrated.

What I wanted to try out for Panel was codespaces to see if the free tier is powerful enough to provide the same experience.

Copy link
Member

@philippjfr philippjfr left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@philippjfr philippjfr merged commit 2d13aa1 into main Jul 18, 2023
10 of 15 checks passed
@philippjfr philippjfr deleted the fix/binder branch July 18, 2023 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants