-
Notifications
You must be signed in to change notification settings - Fork 6
(Phase 1) Project wide refactor and generalization #2
base: master
Are you sure you want to change the base?
Changes from all commits
aac18f2
b1f5ae4
e0e4f3c
305a441
6bbad87
023120d
5d4c230
7a6ebac
2ccfa25
832f76e
3e7defd
f101593
9e84731
1a5f1c0
b6dc724
8c64f2a
5c5f87f
d56adf2
c60a565
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ coverage: | |
project: | ||
default: | ||
enabled: true | ||
target: 95% | ||
target: 100% | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
branch = True | ||
source = . | ||
omit = | ||
coala-langserver.py | ||
coalals/__main__.py | ||
tests/* | ||
|
||
[report] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,12 +26,6 @@ before_install: | |
sleep 3; | ||
fi | ||
|
||
- cd ./vscode-client | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please do not import the changes about vscode in this PR since we have a separate PR to do it 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, then we could remove it after #7 merged. |
||
- npm install | ||
- mkdir ./out | ||
- npm run vscode:prepublish | ||
- cd - > /dev/null | ||
|
||
- printf '%s\n' | ||
"$(cat test-requirements.txt requirements.txt)" | ||
> requirements.txt | ||
|
@@ -50,12 +44,7 @@ script: | |
# https://github.com/coala/coala-bears/issues/1037 | ||
- sed -i.bak '/bears = GitCommitBear/d' .coafile | ||
# Server side tests. | ||
- coverage run $(which behave) ./tests/server.features | ||
- coverage run -a -m unittest discover -s tests | ||
# Frontend tests. | ||
# - cd ./vscode-client | ||
# - npm test | ||
# - cd - > /dev/null | ||
- py.test --cov-report term --cov=coalals | ||
|
||
notifications: | ||
email: false | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,20 @@ | ||
# coala-vs-code | ||
# coala-ls | ||
|
||
[![Build Status](https://travis-ci.org/coala/coala-vs-code.svg?branch=master)](https://travis-ci.org/coala/coala-vs-code) | ||
[![codecov](https://codecov.io/gh/coala/coala-vs-code/branch/master/graph/badge.svg)](https://codecov.io/gh/coala/coala-vs-code) | ||
[![Build Status](https://travis-ci.org/coala/coala-ls.svg?branch=master)](https://travis-ci.org/coala/coala-ls) | ||
[![codecov](https://codecov.io/gh/coala/coala-ls/branch/master/graph/badge.svg)](https://codecov.io/gh/coala/coala-ls) | ||
|
||
A visual studio code plugin working via [Language Server Protocol (LSP)](https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md).Python versions 3.x is supported. | ||
A coala language server based on [Language Server Protocol (LSP)](https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md).Python versions 3.x is supported. | ||
|
||
## Feature preview | ||
|
||
![](./docs/images/demo.gif) | ||
![coala-ls demo](./docs/images/demo.gif) | ||
Watch full video on [YouTube](https://www.youtube.com/watch?v=MeybdlCB96U) | ||
|
||
## Setting up your dev environment, coding, and debugging | ||
|
||
You'll need python version 3.5 or greater, run `pip3 install -r requirements.txt` to install the requirements, and run `python3 langserver-python.py --mode=tcp --addr=2087` to start a local languager server listening at port 2087. | ||
|
||
Then you should update the `./vscode-client/src/extension.ts` to make client in TCP mode. | ||
|
||
```diff | ||
export function activate(context: ExtensionContext) { | ||
- context.subscriptions.push(startLangServer | ||
- (require("path").resolve(__dirname, '../coala-langserver.sh'), ["python"])); | ||
+ context.subscriptions.push(startLangServerTCP(2087, ["python"])); | ||
console.log("coala language server is running."); | ||
} | ||
``` | ||
|
||
To try it in [Visual Studio Code](https://code.visualstudio.com), open ./vscode-client in VS Code and turn to debug view, launch the extension. | ||
|
||
## Known bugs | ||
|
||
* [Language server restarts when `didSave` requests come](https://github.com/coala/coala-vs-code/issues/7) | ||
You'll need python version 3.5 or greater, run `pip3 install -r requirements.txt` to install the requirements, and run `python3 -m coalals --mode=tcp --addr=2087` to start a local language server listening at port 2087. Currently `stdio` mode is also supported and can be used by invoking coalals with `--mode=stdio`. | ||
|
||
## Reference | ||
|
||
* [python-langserver](https://github.com/sourcegraph/python-langserver) | ||
* [python-language-server](http://github.com/palantir/python-language-server) |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
|
||
cd "$(dirname "$0")" > /dev/null | ||
exec python3 ./coala-langserver.py | ||
exec python3 -m coalals | ||
cd - /dev/null |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jayvdb Do we enable the repository in codecov?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can this be 100% when the tests are not being run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test is added in another PR