-
Notifications
You must be signed in to change notification settings - Fork 1.9k
DOC: add Windows Python-only dev setup and example notebook #5731
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
Open
Himanshu7921
wants to merge
3
commits into
chroma-core:main
Choose a base branch
from
Himanshu7921:doc/windows-python-dev-setup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| { | ||
| "cells": [ | ||
| { | ||
| "cell_type": "markdown", | ||
| "id": "8ec3ad5a", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "# Getting started: Python-only dev on Windows (PowerShell)\n", | ||
| "\n", | ||
| "This notebook shows a minimal example you can run after setting up the Python-only developer environment described in `DEVELOP.md` -> 'Python-only dev setup (Windows)'.\n", | ||
| "\n", | ||
| "If you installed the repository in editable mode (`pip install -e .`) in the same environment used to run this notebook, you can import `chromadb` directly below." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": 2, | ||
| "id": "9eec5697", | ||
| "metadata": {}, | ||
| "outputs": [ | ||
| { | ||
| "name": "stdout", | ||
| "output_type": "stream", | ||
| "text": [ | ||
| "Query results: {'ids': [['w1']], 'embeddings': None, 'documents': [['Hello from Windows']], 'uris': None, 'included': ['metadatas', 'documents', 'distances'], 'data': None, 'metadatas': [[{'source': 'notebook'}]], 'distances': [[0.8225913047790527]]}\n" | ||
| ] | ||
| } | ||
| ], | ||
| "source": [ | ||
| "# Minimal runtime example: create a client, a collection, add docs, and query\n", | ||
| "try:\n", | ||
| " import chromadb\n", | ||
| " client = chromadb.Client()\n", | ||
Himanshu7921 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| " collection = client.create_collection('example_windows')\n", | ||
| " collection.add(documents=['Hello from Windows','Second doc'], metadatas=[{'source':'notebook'},{'source':'notebook'}], ids=['w1','w2'])\n", | ||
| " results = collection.query(query_texts=['Hello'], n_results=1)\n", | ||
| " print('Query results:', results)\n", | ||
| "except Exception as e:\n", | ||
| " print('Make sure you have followed the Windows Python-only setup in DEVELOP.md and installed the package in the active virtualenv. Error:', e)" | ||
| ] | ||
| } | ||
| ], | ||
| "metadata": { | ||
| "kernelspec": { | ||
| "display_name": ".venv (3.13.7)", | ||
| "language": "python", | ||
| "name": "python3" | ||
| }, | ||
| "language_info": { | ||
| "codemirror_mode": { | ||
| "name": "ipython", | ||
| "version": 3 | ||
| }, | ||
| "file_extension": ".py", | ||
| "mimetype": "text/x-python", | ||
| "name": "python", | ||
| "nbconvert_exporter": "python", | ||
| "pygments_lexer": "ipython3", | ||
| "version": "3.13.7" | ||
| } | ||
| }, | ||
| "nbformat": 4, | ||
| "nbformat_minor": 5 | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.