Announcing the Kite Integration for Spyder
brendan
Posted on December 10, 2019
We’re thrilled to announce Kite’s Python integration for Spyder, the popular open-source IDE for scientists, engineers, and data analysts. Kite is now available as a free Python code completions option for all Spyder users as part of the Spyder 4 release.
Spyder users can use Kite’s machine learning models to get more and better completions while coding with PyData libraries (e.g. NumPy, SciPy, Pandas, and Matplotlib). These libraries previously had minimal autocomplete support due to type analysis limitations of the completions engine Spyder used to exclusively rely on, called Jedi.
Kite worked alongside Spyder’s core contributors to incorporate several autocomplete improvements in the Spyder 4 release. This collaboration happened through Quansight’s Community Work Order program, a new framework for private companies to partner with open source projects.
TL;DR
- Kite can be selected as a free code completions option in Spyder 4. Download and install Spyder 4 via Anaconda or via Spyder’s Github repo.
- Spyder users will see autocomplete improvements when enabling Kite, including faster and more useful completions for numerics libraries. Watch an overview video about Kite for Spyder on our YouTube channel.
- Kite’s Intelligent Snippets, Line-of-Code Completions, Dictionary Key Completions, and Copilot desktop app are all supported for Spyder users.
- As with Kite’s other editor integrations, all code processing happens locally without leaving the user’s computer.
- Kite and the Spyder core contributors worked together on this integration via Quansight’s Community Work Order program.
- You'll need to have Kite installed on your computer to enable our Spyder integration. Download Kite here.
Getting more completions, more often for numerics libraries in Spyder
Spyder users have long reported issues with the completions for numerics libraries. This was largely due to type analysis limitations in the Jedi completions engine. It had difficulty analyzing third-party libraries for scientific computing (e.g. NumPy, SciPy, TensorFlow, etc.) that make use of compiled extensions. Without good type analysis, generating completions is inaccurate and resource intensive.
Enabling Kite in Spyder solves this problem, and goes beyond in a number of ways. Kite’s ML engine generates multi-token completions, and returns completions much faster.
To enable Kite in Spyder, go to Preferences/ Settings -> click on Completion and Linting -> click on the “Advanced” tab -> click “Enable Kite” under Providers -> click “Apply”.
Kite’s smarter completions features
Kite also features Line-of-Code Completions, Intelligent Snippets, and recently released, Dictionary Key Completions – all of which save you time and hassle while coding.
Line-of-Code Completions are multi-token completions for the top 100 Python libraries that are unique to Kite’s machine learning engine.
Intelligent Snippets allow you to complete complex, multi-token statements with ease by generating context-relevant code snippets as you type. Whereas editor snippets typically must be manually defined in advance, Kite’s Intelligent Snippets are generated in real-time based on the code patterns Kite finds in your codebase.
Dictionary Key Completions save you time by remembering the structure of dictionary objects in your codebase. These completions work for integer keys as well as string keys, the latter of which can be tedious to recall and prone to typos. Check out examples and a more detailed description of this new feature in our December release notes.
Improving completions performance in Spyder
Enabling Kite results in faster completions in Spyder for two main reasons. First, the Spyder and Kite teams worked together to make performance optimizations to reduce completions lag for Spyder 4. Second, Kite’s ML engine is continually optimized to show smarter completions, faster.
At Kite we invest in routine optimization of application and ML model performance to limit impact on users’ CPU and memory resources. For instance, Kite intelligently caches index builds based on whether your Python files have changed recently. It also only loads parts of its ML engine based on whether relevant libraries are used in users’ codebases. So if you’re only using numerics libraries, only relevant parts of the Kite engine will be running to conserve resources.
Did we mention one-click docs search?
Another nice perk of enabling Kite is access to Kite’s Copilot app and one-click docs search within Spyder. Check out the Kite Copilot here for more information.
Leveraging Quansight’s Community Work Order
Quansight’s Community Work Order (CWO) was an ideal framework to collaborate with the Spyder core contributors on improving the completions experience, a feature which had been the center of a lot of user feedback.
Given all of the resources we’ve invested into completions intelligence at Kite, we saw a natural fit to work with the Spyder team to improve Spyder’s completions infrastructure and get AI-powered completions in the hands of more developers for free.
However, structuring projects between open source communities and private companies is challenging across a number of dimensions: What work should be done? Who does the work? How long will it take? Where does the funding come from and what is it spent on? Quansight’s CWO provided transparency for how to fund and structure a partnership of this nature. Read more about the principles of CWOs on Quansight’s blog.
The CWO we sponsored provided funds for the development hours needed to improve the completions experience for Spyder 4. Additionally, Kite engineers and product managers contributed hours towards performance improvements and debugging efforts within the Spyder codebase.
We enjoyed contributing to the Spyder 4 release, and we look forward to collaborating on ongoing efforts with the Spyder community to support free completions!
Share the news on Twitter with @Spyder_IDE and @KiteHQ. Download Kite here.
Posted on December 10, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.