widgetti / ipyvuetify

Jupyter widgets based on vuetify UI components
MIT License
348 stars 59 forks source link

build: use nox for tests and docs #240

Closed 12rambau closed 1 year ago

12rambau commented 1 year ago

Fix #239

In this PR I added a few configurations to build unit tests and documentation pages using nox. It creates isolated environments to ensure that the build will work when send to RDT. It's also the first step toward unit testing.

As I need to check the RDT build there will surely be test commits, I assume you will just squash my PR so I'm just sorry for the noise.

12rambau commented 1 year ago

@maartenbreddels, @mariobuikhuizen I would like the doc to be build on main (at least latest) but when I install in dev mode there are many npm command that start. Of course it wasn't an issue before because RDT was build from the pipy version. Would you have any guidance ?

maartenbreddels commented 1 year ago

I never build on rtd, because there wasn’t enough memory. Why do you want to do that?

12rambau commented 1 year ago

If I want to work on the API build in #238 I would like to make sure latest is on track with main. So I would need to run: pip install .[doc]

maartenbreddels commented 1 year ago

I think you should install Jupyter lab to be able to build

12rambau commented 1 year ago

thanks @maartenbreddels for the tips. The complete solution was "install jupyterlab before the lib to enable the build of jupyter extentions when npm install will be called from the js folder to execute webpack scripts".

with the pre-install job, it works like a charm. This is then ready for review

12rambau commented 1 year ago

@maartenbreddels things were working just fine when I finished my PR: https://readthedocs.org/projects/ipyvuetify/builds/19602806/ but now I get NPM warnings/errors everywhere: https://readthedocs.org/projects/ipyvuetify/builds/19959839/

Is there something to change there ? like node version ? python version ?

maartenbreddels commented 1 year ago

@12rambau i checked out nox, and i like it. So in principle I'm good with this PR. I only don't get why we see No module named 'jupyter_core', I don't understand which environment pip seems to be running in.

12rambau commented 1 year ago

The RDT build instructions are build here:

https://github.com/12rambau/ipyvuetify/blob/nox/.readthedocs.yaml

line 15 is forcing the installation of the complete jupyter suite line 22 onward is pointing to the lib + "doc" extra deps.

I saw that you added some extras there let's see what happend if I force install them in the yaml.

12rambau commented 1 year ago

sorry for the noise. I made many tests from RDT side. I hope they will help me find a solution from their side: https://github.com/readthedocs/readthedocs.org/issues/10223

mariobuikhuizen commented 1 year ago

This PR now depends on the fix in: https://github.com/widgetti/ipyvuetify/pull/259

12rambau commented 1 year ago

@mariobuikhuizen I rebased on the current master and solved the remaining RDT related issue. I think this one is also ready to go.