-
Notifications
You must be signed in to change notification settings - Fork 59
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
build: refactor build strategy #259
Conversation
I think what we try to achieve here (igenerate the source upon installation) is not possible when the lib is build in isolation as the generate_source module is not yet available in the venv. Maybe an alternative solution could be:
@mariobuikhuizen, @maartenbreddels what do you think ? |
not ideal, i've always though a pip install should work. Why doesn't the isolated build pick up the generate source code, especially since it is in the manifest file, it should be available (maybe in a different directory.. ?) |
Did you rebase to get 778437a in? |
I don't remember rebasing but it's already in. I'm discovering the deps of setuptools with pyca developers, the |
@maartenbreddels, I'm moving forward with the installation process. Still few things to optimize but at least it works ( Things are still buggy in the tests though. I have several questions:
If you agree with my comments I'll move forward with my PR and revamp the test actions, the release one will deserve a dedicated PR. |
Great news!
I want the build step to be isolated, as to mimic as much as possible a release->user install process. We don't want that because of some artifact during build process, our tests succeed, but when installing the produced wheel it will not (this in fact caused a faulty release).
Yes, that's exactly what we want to test: Do the tests pass when the wheel that we build is released as it is. We don't "care" about the tests passing because we somehow managed to get it working.
No user installs it this way right? It's all comping from pypi, which means people install the wheel.
Not sure what you mean by this? It's in the test directory right, if you run |
PS: I'd rather have you rebase on master, then merge master back in, this is often confusing (at least for me) and leads to weird incomprehensible conflicts (again, at least for me:P) |
if you run
I know I'll try to make the test pass first and then rebase (which will be a pain for sure) |
I will believe that |
I reintroduced a build step (I think it's a duplicate but beter safe than sorry), dropped 3.6 and all the test are passing. The solara based ui assesment is not working and as I have 0 knowledge, could you have a look ? side note: I'm not 100% sure we need to check ui aspect of any widget as it will be displayed in the documentation anyway using jupyterlite. |
This makes sure we can never have a broken release. If the UI tests pass, we know it's working on classic notebook, lab, voila and solara. Why did you drop 3.6? We still need to support it. Are we using a non-supported feature in this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot see what is going wrong now, take a look at my comments so we can debug this.
Let me advocated on some of your suggestions:
Because it's strictly equivalent to running
I would like to use mystnb in the documentation which will build ALL the widgets. using pytest-regression, it will be super easy to check the produced html widgets. It will be equivalent to the test performed on solara without using playwrite which can be tricky (we are using it in pydata-sphinx-theme for a11y and that's is bugging on runners 1 time out of 2) and ensurin the test of all of them.
According to python documentation, 3.6 have reached end-of-life for a long time now and has been dropped by multiple other libs. |
everything seems ok now ! |
😍 |
@maartenbreddels did you had the time to have a look at the latest iteration ? |
I've taken a quick look, it looks nice! |
it seems it covers all cases as any build type requires to create a egg_info folder first. |
I was crowling in my notification dashboard, and I saw this was still requesting changes. @maartenbreddels is it a legacy request or should I change anything ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for fixing the build and sorry for the long delay.
Please try do fixes, adding linting, refactoring, etc in separate PR's next time. This makes them quicker/easier to review, discuss and merge.
A few small issues:
.github/workflows/test.yml
Outdated
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"] | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove python 3.6? Our experience is that some users are still tied to 3.6 because of other dependencies or slow upgrade cycles in companies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As 3.7 as already reached end of life, keeping the previous one that is already dead seems too much for me. if you would like to keep it please run the test again as I may have introduce some pathlib mechanism that were not available in 3.6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly the reality is that 3.6 it's not dead, especially in big companies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solved in f3980bb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems pytest-playwright is not compatible with 3.6 either, making the build fail. what should I do ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we only need solara[pytest] and thus ${wheel}[test]
in the ui-test job. Removing the [test]
from $(find dist -name *.whl)[test]
will fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First I would like to solve the 3.6 build. all the others from 3.7 to 3.11 worked but 3.6 failed because playwright is not working. I cannot drop [test] there as it's where the test requirements are but if they are based on playwright it seems my life will become more complicated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you removed [test]
from the ui-test
instead of the test
job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you were talking about the ui-test so I checked. I cannot remove [test] from the normal test as solara itself is set in it.
Just to advocate again in favor of dropping python 3.6, many of the top used widget libs that I know (+other packages that are not widgets) have already dropped it:
- ipywidgets: https://pypi.org/project/ipywidgets/ >=3.7
- ipyleaflet: https://pypi.org/project/ipyleaflet/ >= 3.7
- matplotlib: https://pypi.org/project/matplotlib/ >= 3.8
- pandas: https://pypi.org/project/pandas/ >= 3.8
To make the test work on 3.6 we should redesign them without use of playwright which is use directly as a fixture.
At the end of the day it will continue to work with 3.6 we will just stop making bug fixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fixed with removing [test]
in the test job. We can postpone dropping 3.6 support.
Co-authored-by: Mario Buikhuizen <[email protected]>
This reverts commit 0140143.
Probably because of the recent release of Jupyter Lab 4
Should we squash and merge this? |
As you see fit, I personnaly don't mind. It will ease readability in main though |
W.I.P but should fix #256
I clearley identify the
from generate_source import generate
as the culprit but I don't yet manage to find a way to load it BEFORE the end of the installation process. It seems to be unavailable in the isolated environment even if it's part of the egg_info folder.TODO