Enhancing _jupyter_types_experimental in completion metadata
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- jupyter-notebook, python
- Bereich
- backend-api-design
Rechercherichtung
Das Issue behandelt Abschlussantworten und die experimentellen _jupyter_types_experimental-Metadaten, nennt aber keine Implementierungsdateien oder Tests. Kläre zunächst mit den Maintainer:innen das Metadatendesign sowie die erwarteten Klassen- und Modul-Informationen; abgeschlossen wäre die Aufgabe erst mit einer vereinbarten Antwortstruktur, einem Implementierungsort und einer Abdeckung für Instanzvervollständigungen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hi all
I was wondering whether this additional metadata is being used, and whether the ipykernel team is open to enhancing it. In particular, the 'type' field could be more useful; it seems to return 'instance' for any class instance, without actually returning the name of the class or other potentially useful information.
This came up in a discussion on the Python team at Microsoft. We are (slowly) working on creating type stubs for scientific Python packages. Pandas is done and handed off to pandas team; we have stubs for matplotlib that are in reasonable shape at https://github.com/microsoft/python-type-stubs, and we're working on much more complete ones for sklearn and scipy, and trying to create them in a semi-automated fashion from a combination of execution traces, numpydoc docstrings, and human-in-the-loop corrections. Besides loading them up and seeing how they fare with some sample code, it can be hard to know when these stubs are wrong, unless people file issues in that repo. Besides contributing them to the community we use these stubs in Visual Studio Code for code completions, and in the case of Jupyter notebooks the code completions we infer from these stubs are enhanced by completions suggested by the kernel. We thought this could be a great place to detect stub errors - if the stubs say a type is X and the kernel says it is Y and Y is not a (sub)type of X, that could be a stub error. We could surface this mismatch in some way, like a code action that opens an issue in the stub repo. We got very excited when we saw that there was a 'type' field in the 'metadata' field in completion responses, only to find it didn't actually give us the class name.
Ideally in the case of an 'instance' we would also want the class name and the module it comes from. While we could query the kernel for this, that involves additional CPU time that we don't think is reasonable to use. Our hope is that this is readily available information that could be added to these messages for minimal cost.
- Vorherrschende Sprache
- Python
- Sterne
- 734
- Forks
- 411
- Ø Merge
- 1 T. 6 Std.
- Gemergte PRs (30 T.)
- 10
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ipython/ipykernel
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
-
ipython/ipykernel#1550 · 1 Kommentar · 1 Reaktion · 1 zugewiesene Person ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 66/100
Alle Issues in ipython/ipykernel
Ähnliche Issues
-
bug priority:low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
CyberAgent/psd2svg#436 ·
-
area/install-update comp/cli comp/desktop P3 sweeper:risk-compatibility type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
NousResearch/hermes-agent#122386 · 1 Kommentar ·
-
ai-generated
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
vllm-project/production-stack#1105 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100