8000 docs: Improve development docs by varungandhi-src · Pull Request #97 · sourcegraph/scip-python · GitHub
[go: up one dir, main page]

Skip to content

docs: Improve development docs #97

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

8000 Merged
merged 1 commit into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,7 @@ The only changes that are inside there at this point are:
- Not bail out of indexing if it's taking a long time
- Not throw away indexed files if memory usage gets high
- Allow parsing of some additional files

## Contributing

See [pyright-scip/CONTRIBUTING.md](./packages/pyright-scip/CONTRIBUTING.md).
77 changes: 77 additions & 0 deletions packages/pyright-scip/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Contributing to scip-python

- [Development](#development)
- [Installing dependencies](#installing-dependencies)
- [Building the code](#building-the-code)
- [Running tests](#running-tests)
- [Publishing releases](#publishing-releases)

## Development

### Installing dependencies

1. Install [ASDF](https://asdf-vm.com/guide/getting-started.html).
2. Install the correct versions of Node and Python:
```bash
asdf plugin add nodejs
asdf plugin add python
# Install appropriate Node and Python versions based on .tool-versions
asdf install
````
3. Install dependencies:
```bash
# From the root of the repo
npm install
cd packages/pyright-scip
npm install
```

All the other commands should be run from the `packages/pyright-scip`
subdirectory.

### Building the code


```bash
# Build in development mode once
npm run webpack

# Build in development mode, watch for changes
npm run watch
```

To create a release build:

```bash
npm run build
```

**WARNING:** If you create the release build and then try to run tests,
you will not get useful stack traces because source maps are disabled
for the release build.

All of the above methods should produce an `index.js` file
in `packages/pyright-scip` which can be invoked with Node
to index a test project.

```
node --enable-source-maps ./index.js <other args>
```

### Running tests

```bash
npm run check-snapshots
```

**WARNING:** At the moment, there are [some known test failures on macOS](https://github.com/sourcegraph/scip-python/issues/91).

Using a different Python version other than the one specified
in `.tool-versions` may also lead to errors.

## Publishing releases

1. Change the version in `packages/pyright/package.json`
to `M.N.P` and land a PR with that.
2. Add a tag `vM.N.P` to the commit on the `scip` branch
and push that tag.
29 changes: 0 additions & 29 deletions packages/pyright-scip/development.md

This file was deleted.

0