-
Notifications
You must be signed in to change notification settings - Fork 17
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
0.3.4: pytest is failing because missing node_modules/y-websocket/package.json
file
#153
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
Did you install the node modules? |
Here is build output: + /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
* Building wheel...
Successfully built jupyter_ydoc-0.3.4-py3-none-any.whl |
If you want to run the tests you need to do the same as in the CI. |
So why all necessary steps are not part of the begin of the pytest session and some steps are coded outside pytest framework? 🤔 |
BTW line jupyter_ydoc/.github/workflows/test.yml Line 88 in eea2058
is wring. It was many times told by pytest told by pytest developers to not use pytest by python -m pytest because if python is executed by python -m foo it adds current directory to sys.path whcih usually mesess test suite.This is why pytest provides pytest script wrapper.
|
Just tested 1.0.0 and looks like on generate documentation is jet another issue + /usr/bin/sphinx-build -n -T -b man docs/source build/sphinx/man
Running Sphinx v6.1.3
making output directory... done
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:javascript
npm ERR! A complete log of this run can be found in:
npm ERR! /home/tkloczko/.npm/_logs/2023-03-29T13_27_10_716Z-debug-0.log
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main
app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 237, in __init__
self.config.setup(self)
File "/home/tkloczko/rpmbuild/BUILD/jupyter_ydoc-1.0.0/docs/source/conf.py", line 96, in setup
check_call(["npm", "install"], cwd=str(js))
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['npm', 'install']' returned non-zero exit status 1.
Exception occurred:
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['npm', 'install']' returned non-zero exit status 1.
The full traceback has been saved in /tmp/sphinx-err-3sxomjlk.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Building jupyterlab API docs |
That would be a nice improvement. Do you want to open a PR? |
Most of the time I'm spending on packaging. [tkloczko@pers-jacek SPECS]$ grep yarn python-*
python-ipyleaflet.spec:BuildRequires: yarnpkg
python-jupyterlab.spec:BuildRequires: yarnpkg |
But how would you get the node modules without access to the Internet? |
I've tested that currently even with opened access to the public network nothing tries to download sometbing. Generally it is alway possible to provide necessaty nodejs mdules installed locally. |
Currently you have to invoke |
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)On first look looks like some files are missing in git repo.
Here is pytest output:
Here is list of installed modules in build env
The text was updated successfully, but these errors were encountered: