-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78b336f
commit f6ac7fe
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,45 @@ | ||
--- | ||
id: scip-python | ||
title: SCIP Python | ||
sidebar_label: SCIP Python | ||
--- | ||
|
||
import {OssOnly, FbInternalOnly} from 'internaldocs-fb-helpers'; | ||
import {SrcFile,SrcFileLink} from '@site/utils'; | ||
|
||
To index [Python](https://www.python.org) we use SourceGraph's [SCIP indexer for python](https://github.com/sourcegraph/scip-python). [SCIP](https://about.sourcegraph.com/blog/announcing-scip) is a new format for tools to share information about code. Releases of [scip-python](https://github.com/sourcegraph/scip-python) can be installed with `yarn` or `npm` and used as indexers for SCIP, which Glean will accept. The indexer itself requires a [python](https://www.python.org) runtime. | ||
|
||
## Run the indexer | ||
|
||
The indexer is run via the main `glean` CLI tool. | ||
|
||
``` | ||
> cabal build exe:glean | ||
``` | ||
|
||
And index your Python repository with: | ||
``` | ||
glean index scip-python DIR --db NAME/INSTANCE | ||
``` | ||
|
||
where | ||
|
||
* `DIR` is the root directory containing the Python project | ||
* `name/hash` is the name of the repository to create | ||
|
||
Provide the usual `--db-root` and `--schema` or `--service` arguments | ||
to `glean` | ||
|
||
## In the shell | ||
|
||
Python source can also be indexed directly from the Glean shell: | ||
|
||
``` | ||
:index scip-python DIR | ||
``` | ||
|
||
The shell will pick a DB name and hash for you based on `DIR`. | ||
|
||
## Schema | ||
|
||
The schema is in <SrcFile file="glean/schema/source/scip.angle" /> |