Skip to content
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

New Release #115

Merged
merged 50 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
3392ebc
Update CHANGES.rst
alcarney Oct 7, 2023
aadcf9c
Remove proof of concept web app
alcarney Oct 9, 2023
1f4ad97
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 9, 2023
e533706
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 9, 2023
d3a1c4d
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 16, 2023
38a1ad1
vscode: Add sphinx-build command
alcarney Oct 18, 2023
fce681d
pytest-lsp: Capture `clientInfo` as well as capabilities
alcarney Oct 18, 2023
ee97af4
docs: Add capabilities extension
alcarney Oct 18, 2023
c5551f6
docs: Add client capability index
alcarney Oct 18, 2023
411b962
lsp-devtools: formatting
alcarney Oct 18, 2023
d2e45f3
workflow: Create workflow for capturing neovim capabilities
alcarney Oct 18, 2023
5ffcc5c
workflow: FUSE workaround
alcarney Oct 18, 2023
1fb5d8d
Add client capabilities for Neovim v0.9.1
github-actions[bot] Oct 18, 2023
a32863a
docs: Add support for multiple versions of a client
alcarney Oct 21, 2023
9e9e163
pytest-lsp: Test against released version of pygls
alcarney Oct 21, 2023
5a800cb
pytest-lsp: Add syntax for selecting a specific version of a client
alcarney Oct 21, 2023
f413498
pytest-lsp: Drop optional dependencies
alcarney Oct 21, 2023
1c47c90
vscode: Add pytest config
alcarney Oct 21, 2023
dd0482a
pytest-lsp: Add client capabilities for neovim 0.7 and 0.8
alcarney Oct 21, 2023
2d2d416
pytest-lsp: Update changelog
alcarney Oct 21, 2023
2b8a348
lsp-devtools: Add test case
alcarney Oct 21, 2023
dd83bc8
docs: Update guide on contributing client capabilities
alcarney Oct 21, 2023
18a8fb2
pre-commit: Add hook to check client capabilities
alcarney Oct 21, 2023
a2a2f47
pytest-lsp: Add `workspace/configuration` support to the client
alcarney Oct 23, 2023
67838e9
pytest-lsp: Cleanup unecessary warnings
alcarney Oct 23, 2023
60016ee
pytest-lsp: Add spec compliance check for `workspace/configuration`
alcarney Oct 23, 2023
96a4c7e
docs: Document `workspace/configuration` support
alcarney Oct 23, 2023
b975d1a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 23, 2023
fbefe56
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 30, 2023
9652b9d
lsp-devtools: Expose server capabilities via the client
alcarney Oct 31, 2023
b3f7ede
lsp-devtools: Bump textual version
alcarney Oct 31, 2023
83db47b
lsp-devtools: Implement completion item selection
alcarney Oct 31, 2023
a51c9cb
lsp-devtools: Fix `lsp-devtools inspect` command
alcarney Nov 11, 2023
f3fa13e
pytest-lsp: Add option to integrate with `lsp-devtools`
alcarney Nov 12, 2023
bed8f55
docs: Rename `lsp-devtools tui` to `lsp-devtools inspect`
alcarney Nov 12, 2023
a36c701
docs: Add "How To" section to pytest-lsp docs
alcarney Nov 12, 2023
57a0ef5
docs: Rename capabilities to client capabilities
alcarney Nov 12, 2023
3ba4d36
lsp-devtools: Don't close server on client exit
alcarney Nov 12, 2023
6f63b78
pytest-lsp: Add test cases covering existing checks
alcarney Nov 12, 2023
e157ca3
pytest-lsp: Add checks for `window/workDoneProgress/create`
alcarney Nov 12, 2023
c0a3f11
pytest-lsp: Add support for `window/workDoneProgress/create`
alcarney Nov 12, 2023
4bac0a5
pytest-lsp: Use hatch for packaging
alcarney Nov 12, 2023
d82d615
workflow: Use make_release.py script
alcarney Nov 12, 2023
84f2a19
workflow: Align workflows to use hatch
alcarney Nov 12, 2023
0f0cbd0
pytest-lsp: Convert changelog to markdown
alcarney Nov 12, 2023
e1d6f89
lsp-devtools: Remove prometheus code
alcarney Nov 13, 2023
209023e
lsp-devtools: Use hatch for packaging
alcarney Nov 13, 2023
d0a7696
workflow: Align workflows to use hatch
alcarney Nov 13, 2023
e2b4eb5
lsp-devtools: Convert changelog to markdown
alcarney Nov 13, 2023
6173004
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Nov 13, 2023
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
43 changes: 43 additions & 0 deletions .github/workflows/capabilities-nvim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Neovim Capabilities
on:
workflow_dispatch:
inputs:
version:
description: 'Version to capture capabilities for'
required: true
type: string

jobs:
capture:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- run: |
gh release download ${{ inputs.version }} -p '*.appimage' -R neovim/neovim
ls -l

chmod +x nvim.appimage
./nvim.appimage --appimage-extract
./squashfs-root/usr/bin/nvim -l scripts/nvim-capabilities.lua

mv neovim_v*.json lib/pytest-lsp/pytest_lsp/clients/
ls -l

git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"

git checkout -b neovim-${{ inputs.version }}-capabilities
git add lib/pytest-lsp/pytest_lsp/clients/
git commit -m "Add client capabilities for Neovim ${{ inputs.version }}"
git push -u origin neovim-${{ inputs.version }}-capabilities

gh pr create --base develop --fill
name: Capture Neovim Capailities
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66 changes: 38 additions & 28 deletions .github/workflows/lsp-devtools-pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: lsp-devtools PR
name: 'PR: lsp-devtools'
on:
pull_request:
branches:
Expand All @@ -8,12 +8,40 @@ on:
- 'lib/lsp-devtools/**'

jobs:
lsp-devtools:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
cache-dependency-path: lib/lsp-devtools/pyproject.toml

- run: |
python --version
python -m pip install --upgrade pip
python -m pip install --upgrade hatch towncrier
name: Setup Environment

- run: |
set -e
./scripts/make_release.py lsp-devtools
name: Set Version

- uses: hynek/build-and-inspect-python-package@v1
with:
path: lib/lsp-devtools

test:
name: "Python v${{ matrix.python-version }} -- ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest]

steps:
Expand All @@ -22,39 +50,21 @@ jobs:
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
allow-prereleases: true
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: lib/lsp-devtools/pyproject.toml

- run: |
python --version
python -m pip install --upgrade pip
python -m pip install --upgrade build tox bump2version
python -m pip install --upgrade tox
name: Setup Environment

- run: |
set -e

# Despite the script's name, this is only used to obtain a
# dev version number e.g. v1.2.3-dev4
./scripts/make-release.sh lsp-devtools
name: Set Version
if: matrix.python-version == '3.10'

- run: |
cd lib/lsp-devtools

version=$(echo ${{ matrix.python-version }} | tr -d .)
python -m tox -e `tox -l | grep $version | tr '\n' ','`
name: Test

- name: Package
run: |
cd lib/lsp-devtools
python -m build
if: always() && matrix.python-version == '3.10'

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: 'dist'
path: lib/lsp-devtools/dist
if: always() && matrix.python-version == '3.10'
python -m tox run -f "py${version}"
shell: bash
name: Run Tests
9 changes: 3 additions & 6 deletions .github/workflows/lsp-devtools-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,16 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: "3.10"

- run: |
sudo apt update
sudo apt install pandoc

python --version
python -m pip install --upgrade pip
python -m pip install build bump2version towncrier docutils
python -m pip install hatch towncrier docutils
name: Install Build Tools

- run: |
Expand All @@ -44,7 +41,7 @@ jobs:
- name: Package
run: |
cd lib/lsp-devtools
python -m build
hatch build

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
Expand Down
62 changes: 35 additions & 27 deletions .github/workflows/pytest-lsp-pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: pytest-lsp PR
name: 'PR: pytest-lsp'
on:
pull_request:
branches:
Expand All @@ -8,10 +8,38 @@ on:
- 'lib/pytest-lsp/**'

jobs:
pytest-lsp:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
cache-dependency-path: lib/pytest-lsp/pyproject.toml

- run: |
python --version
python -m pip install --upgrade pip
python -m pip install --upgrade hatch towncrier
name: Setup Environment

- run: |
set -e
./scripts/make_release.py pytest-lsp
name: Set Version

- uses: hynek/build-and-inspect-python-package@v1
with:
path: lib/pytest-lsp

test:
name: "Python v${{ matrix.python-version }} -- ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest]
Expand All @@ -22,41 +50,21 @@ jobs:
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: lib/pytest-lsp/pyproject.toml

- run: |
python --version
python -m pip install --upgrade pip
python -m pip install --upgrade build tox bump2version
python -m pip install --upgrade tox
name: Setup Environment

- run: |
set -e

# Despite the script's name, this is only used to obtain a
# dev version number e.g. v1.2.3-dev4
./scripts/make-release.sh pytest-lsp
name: Set Version
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'

- run: |
cd lib/pytest-lsp

version=$(echo ${{ matrix.python-version }} | tr -d .)
python -m tox run -f "py${version}"
shell: bash
name: Test

- name: Package
run: |
cd lib/pytest-lsp
python -m build
if: always() && matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: 'dist'
path: lib/pytest-lsp/dist
if: always() && matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
name: Run Tests
14 changes: 5 additions & 9 deletions .github/workflows/pytest-lsp-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,29 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: "3.10"

- run: |
sudo apt update
sudo apt install pandoc

python --version
python -m pip install --upgrade pip
python -m pip install build bump2version towncrier docutils

name: Install Build Tools
python -m pip install tox hatch towncrier docutils
name: Setup Environment

- run: |
set -e

./scripts/make-release.sh pytest-lsp
./scripts/make_release.py pytest-lsp
name: Set Version
id: info

- name: Package
run: |
cd lib/pytest-lsp
python -m build
hatch build

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
Expand Down
17 changes: 14 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ exclude: '.bumpversion.cfg$'
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
exclude: 'lib/pytest-lsp/pytest_lsp/clients/.*\.json'
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.11.0
hooks:
- id: black
exclude: 'lib/pytest-lsp/pytest_lsp/gen.py'
Expand All @@ -35,7 +36,7 @@ repos:
exclude: 'lib/pytest-lsp/pytest_lsp/gen.py'

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.5.1'
rev: 'v1.7.0'
hooks:
- id: mypy
name: mypy (pytest-lsp)
Expand All @@ -62,3 +63,13 @@ repos:
- textual
- websockets
files: 'lib/lsp-devtools/lsp_devtools/.*\.py'

- repo: local
hooks:
- id: check-capabilities
name: check-capabilities
language: python
additional_dependencies:
- lsprotocol
files: 'lib/pytest-lsp/pytest_lsp/clients/.*\.json'
entry: python scripts/check_capabilities.py
14 changes: 13 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,17 @@
"**/*.egg-info": true,
"**/.pytest_cache": true,
"**/.mypy_cache": true,
}
},
"esbonio.sphinx.buildCommand": [
"sphinx-build",
"-M",
"html",
"docs",
"docs/_build"
],
"python.testing.pytestArgs": [
"lib/pytest-lsp/tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
}
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,3 @@ async def test_completion(client: LanguageClient):

assert len(result.items) > 0
```

## `app/` - Prototype Devtools Web UI

![UI Screenshot](https://user-images.githubusercontent.com/2675694/191863035-5bb5d1c9-00b6-40de-b3e2-f81cdb9eb375.png)

This is little more than a proof of concept, currently setup to communicate with an agent over websockets.
Hopefully, this can eventually be repurposed/extended to be used on lsp servers hosted entirely in the browser e.g. pyodide.
Loading