-
Notifications
You must be signed in to change notification settings - Fork 170
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
Custom completer example #169
Conversation
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.
Thanks for this great example @ohrely
Some general comment, could you upgrade the example to use the latest cookiecutter template?
You can achieve that thanks to scripts/upgrade_extensions.py
Could you add a note in the readme on the disabling core extension feature you are using?
For the tests, there is a bug in the ci for the other examples (fixed by #170). For your example, you need to have some configuration files matching the one in hello world - it should be ok one you upgrade all extensions. And you need to insert the code snippets in the readme using jlpm run embedme
at the root examples folder.
@fcollonval When I run this script, it makes modifications to setup.py and package.json in several of the example extensions and adds RELEASE.md to every extension. Is this the correct behavior? |
Yes this is expected as new commits have been pushed to the template project recently. If you can ignore those in the other extensions, it will be appreciated (so this PR keeps focusing on the new example alone). |
The two build_all tests are failing because one inserted code snippet is getting "corrected" by pre-commit linting, so it no longer matches the (more indented) source of the snippet. Is there a preferred way to address this? I'm not sure what to make of the three failing build_extensions checks. |
Thanks for pushing forward To fix the linter error in the Readme, you should wrap the code snippets between special comments; e.g.
Regarding the remaining error in the new example, you need to overwrite tsconfig.json, .eslintrc.js, .eslintignore and .gitignore with those in the hello-world example (this is to ensure homogenous config). |
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.
Thanks @ohrely I push a commit to fix all linter troubles to go forward. I have two comments in the code and one general one: could you use you
instead of we
in the readme?
Hi @ohrely and @fcollonval, I rebased from master and added a basic test. I'll update the extension to JupyterLab v3.1 too. |
@hbcarlos thanks for pushing this one. Could you please add a more advanced ui test that open a notebook, trigger the completer and check the suggestions are the one expected? |
@fcollonval I'm not sure where the CI test fail. Do you have any advice? |
We are getting closer 🙃 The integration test needs to be more robust. Did you try to run it locally before running it in the ci? |
Thanks for the advice, @fcollonval! Yes, I tested locally before pushing to CI. |
Btw, when running locally, If you don't run |
Thanks @hbcarlos I updated the test to trigger the custom completion and make it more robust. |
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.
Thanks to you for all the help!! |
Thank you both! |
Adds a basic example for customizing notebook completer functionality.
Inadvertently addresses #156 by disabling the notebooks plugin.