Coder Social home page Coder Social logo

jupyterlab / mimerender-cookiecutter-ts Goto Github PK

View Code? Open in Web Editor NEW
20.0 6.0 25.0 52 KB

Cookie cutter for JupyterLab mimerenderer extensions using TypeScript

License: BSD 3-Clause "New" or "Revised" License

TypeScript 26.19% Python 61.07% JavaScript 12.73%

mimerender-cookiecutter-ts's Issues

Error during pip install -e .

Just tried the cookie cutter in the conda env defined in https://github.com/jupyterlab/extension-examples.

It breaks at pip install -e ..
See logs below.

How to fix this ?

❯ pip install -e .
Obtaining file:///home/olivier/GDrive/dev/jupyterlab-explo/jupyterlab_graphviz
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
ERROR: Exception:
Traceback (most recent call last):
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
    status = run_func(*args)
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
    return func(self, options, args)
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 339, in run
    requirement_set = resolver.resolve(
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 75, in resolve
    collected = self.factory.collect_root_requirements(root_reqs)
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 506, in collect_root_requirements
    req = self._make_requirement_from_install_req(
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 468, in _make_requirement_from_install_req
    cand = self._make_candidate_from_link(
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 188, in _make_candidate_from_link
    self._editable_candidate_cache[link] = EditableCandidate(
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 313, in __init__
    super().__init__(
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 158, in __init__
    self.dist = self._prepare()
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 227, in _prepare
    dist = self._prepare_distribution()
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 323, in _prepare_distribution
    return self._factory.preparer.prepare_editable_requirement(self._ireq)
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 609, in prepare_editable_requirement
    dist = _get_prepared_distribution(
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 58, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 43, in prepare_distribution_metadata
    self.req.isolated_editable_sanity_check()
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/req/req_install.py", line 488, in isolated_editable_sanity_check
    and not self.supports_pyproject_editable()
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_internal/req/req_install.py", line 229, in supports_pyproject_editable
    return "build_editable" in self.pep517_backend._supported_features()
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", line 159, in _supported_features
    return self._call_hook('_supported_features', {})
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", line 332, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 89, in _build_backend
    obj = import_module(mod_path)
  File "/home/olivier/miniconda3/envs/jlab-ext-examples/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/tmp/pip-build-env-iggnieuw/overlay/lib/python3.10/site-packages/jupyter_packaging/__init__.py", line 6, in <module>
    from .setupbase import *
  File "/tmp/pip-build-env-iggnieuw/overlay/lib/python3.10/site-packages/jupyter_packaging/setupbase.py", line 37, in <module>
    from setuptools.config import StaticModule
ImportError: cannot import name 'StaticModule' from 'setuptools.config' (/tmp/pip-build-env-iggnieuw/overlay/lib/python3.10/site-packages/setuptools/config/__init__.py)

Archiving this repository

This repository is part of the repositories listed as inactive during the JupyterLab team call. Starting with JupyterLab 4, this is part of the aggregate extension template repository.

This issue is to ping anyone listening for changes in this repository that starting from today if no volunteer propose him/herself to maintain this repository it will be archived in 2 weeks (aka July 27th, 2023).

How can we call a javascript file from custom mimerender?

I am trying to call local javascript file from my custom mimerenderer. But I can not see anything in jupyterlab when I send a message with my mimetype. I developed custom javascript file which creates simple chart. And I want to see this chart when I send the message with my mimetype in Jupyterlab. I created index.tsx file and I called the javascript file from my mimerender extension as follows

import * as test from "./js/test.js";

tsconfig.json ;
{
"compilerOptions": {
"noImplicitAny": true,
"noEmitOnError": true,
"noUnusedLocals": true,
"sourceMap": true,
"module": "commonjs",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"target": "ES5",
"outDir": "./lib",
"allowJs": true,
"lib": ["ES5", "ES2015.Promise", "DOM"],
"jsx": "react",
"types": []
},
"include": ["src/*"]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.