Skip to content

Commit

Permalink
Merge pull request #32 from yeger00/poetry
Browse files Browse the repository at this point in the history
Starting to add poetry
  • Loading branch information
yeger00 authored Dec 5, 2023
2 parents f47a6d6 + e912fb2 commit c5ec439
Show file tree
Hide file tree
Showing 9 changed files with 1,188 additions and 14 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish-pkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish Package
on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3

- name: Set up python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: install poetry
uses: snok/[email protected]

- name: build
run: make build

- name: publish
run: make publish PASSWORD=${{ secrets.PYPI_API_TOKEN }}
11 changes: 4 additions & 7 deletions .github/workflows/test-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ jobs:
with:
python-version: '3.10'

- name: install requirements
run: pip install -r requirements.txt

- name: install Pytest
run: pip install -r requirements.test.txt
- name: install poetry
uses: snok/[email protected]

- name: lint
run: ruff check .
run: make lint

- name: test
run: pytest
run: make test
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
install:
poetry install --no-interaction

build:
poetry build

lint:
poetry install --no-interaction --no-root --with tests
poetry run ruff check .

test:
poetry install --no-interaction --no-root --with tests
poetry run pytest

publish:
poetry install --no-interaction --no-root --with publish
TWINE_USERNAME="__token__" \
TWINE_PASSWORD="$(PASSWORD)" \
poetry run twine upload dist/*

bump:
poetry version patch
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pylspclient
[![image](https://img.shields.io/pypi/v/pylspclient.svg)](https://pypi.org/project/pylspclient/)
[![Test Package](https://github.com/yeger00/pylspclient/actions/workflows/test-pkg.yml/badge.svg)](https://github.com/yeger00/pylspclient/actions/workflows/test-pkg.yml)
(https://img.shields.io/github/license/python-ls/python-ls.svg)](https://github.com/yeger00/pylspclient/blob/main/LICENSE)
[![image](https://img.shields.io/github/license/python-ls/python-ls.svg)](https://github.com/yeger00/pylspclient/blob/main/LICENSE)

A Python 3.10+ implemntation of a [LSP](https://microsoft.github.io/language-server-protocol/) client.

Expand Down
1,101 changes: 1,101 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[tool.poetry]
name = "pylspclient"
version = "0.0.2"
description = "LSP client implementation in Python"
authors = ["yeger00 <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"

[tool.poetry.group.tests]
optional = true

[tool.poetry.group.tests.dependencies]
ruff = "^0.1.6"
pytest = "^7.4.0"
python-lsp-server = "^1.9.0"

[tool.poetry.group.dev]
optional = true

[tool.poetry.group.dev.dependencies]
ipython = "^8.8.0"
ipdb = "^0.13.11"

[tool.poetry.group.publish]
optional = true

[tool.poetry.group.publish.dependencies]
twine = "^4.0.2"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
2 changes: 0 additions & 2 deletions requirements.dev.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements.test.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

0 comments on commit c5ec439

Please sign in to comment.