Skip to content

PR: Update package name, remove Python 2 compatibility and update CIs #2

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

Merged
merged 13 commits into from
Apr 14, 2021
Merged
57 changes: 0 additions & 57 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[run]
omit = pyls_jsonrpc/_version.py
omit = pylsp_jsonrpc/_version.py
40 changes: 40 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Static code analysis

on:
push:
branches:
- develop

pull_request:
branches:
- '*'

jobs:
build:
name: Static code analysis
runs-on: ubuntu-latest
env:
CI: 'true'
OS: 'linux'
timeout-minutes: 2
steps:
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: static-pip-${{ hashFiles('setup.py') }}
restore-keys: static-pip-
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
# TODO: check with Python 3, but need to fix the
# errors first
python-version: '3.6'
architecture: 'x64'
- run: python -m pip install --upgrade pip setuptools
- run: pip install -e .[test]
- name: Pylint checks
run: pylint pylsp_jsonrpc test
- name: Code style checks
run: pycodestyle pylsp_jsonrpc test
- name: Pyflakes checks
run: pyflakes pylsp_jsonrpc test
42 changes: 42 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Linux tests

on:
push:
branches:
- develop

pull_request:
branches:
- '*'

jobs:
build:
name: Linux Py${{ matrix.PYTHON_VERSION }}
runs-on: ubuntu-latest
env:
CI: 'true'
OS: 'linux'
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['3.9', '3.8', '3.7', '3.6']
timeout-minutes: 10
steps:
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-${{ hashFiles('setup.py') }}
restore-keys: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.PYTHON_VERSION }}
architecture: 'x64'
- run: python -m pip install --upgrade pip setuptools
- run: pip install -e .[all,test]
- run: pytest -v test/
# Enable this if SSH debugging is required
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# if: ${{ failure() }}
42 changes: 42 additions & 0 deletions .github/workflows/test-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Mac tests

on:
push:
branches:
- develop

pull_request:
branches:
- '*'

jobs:
build:
name: Mac Py${{ matrix.PYTHON_VERSION }}
runs-on: macos-latest
env:
CI: 'true'
OS: 'macos'
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['3.9', '3.8', '3.7', '3.6']
timeout-minutes: 10
steps:
- uses: actions/cache@v1
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-${{ hashFiles('setup.py') }}
restore-keys: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.PYTHON_VERSION }}
architecture: 'x64'
- run: python -m pip install --upgrade pip setuptools
- run: pip install -e .[all,test]
- run: pytest -v test/
# Enable this if SSH debugging is required
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# if: ${{ failure() }}
38 changes: 38 additions & 0 deletions .github/workflows/test-win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Windows tests

on:
push:
branches:
- develop

pull_request:
branches:
- '*'

jobs:
build:
name: Win Py${{ matrix.PYTHON_VERSION }}
runs-on: windows-latest
env:
CI: 'true'
OS: 'win'
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['3.9', '3.8', '3.7', '3.6']
timeout-minutes: 10
steps:
- uses: actions/cache@v1
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-${{ hashFiles('setup.py') }}
restore-keys: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.PYTHON_VERSION }}
architecture: 'x64'
- run: python -m pip install --upgrade pip setuptools
- run: pip install -e .[all,test]
- run: pytest -v test/
100 changes: 0 additions & 100 deletions .policy.yml

This file was deleted.

3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright 2017 Palantir Technologies, Inc.
Copyright 2017-2020 Palantir Technologies, Inc.
Copyright 2021 Python Language Server Contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include README.rst
include versioneer.py
include pyls_jsonrpc/_version.py
include LICENSE
include .pylintrc
include pylsp_jsonrpc/_version.py
recursive-include test *.py
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Python JSON RPC Server

A Python 3.6+ server implementation of the [JSON RPC 2.0](http://www.jsonrpc.org/specification) protocol. This library has been pulled out of the [Python LSP Server](https://github.com/python-lsp/python-lsp-server) project.

## Installation

pip install -U python-jsonrpc-server

## Examples

The examples directory contains two examples of running language servers over websockets. `examples/langserver.py` shows how to run a language server in-memory. `examples/langserver_ext.py` shows how to run a subprocess language server, in this case the Python LSP Server.

Start by installing `tornado` and `python-language-server`

pip install python-lsp-server[all] tornado

Then running `python examples/langserver.py` or `python examples/langserver_ext.py` will host a websocket on ``ws://localhost:3000/python``.
Loading