Skip to content

Commit 2fc729c

Browse files
committed
build: switch to Poetry
1 parent e35cf38 commit 2fc729c

File tree

6 files changed

+80
-62
lines changed

6 files changed

+80
-62
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,43 @@ name: Build
22

33
on: [push, pull_request]
44

5+
env:
6+
PYTHONIOENCODING: "utf-8"
7+
58
jobs:
69
build:
710
runs-on: ${{ matrix.os }}
811
strategy:
912
fail-fast: false
1013
matrix:
1114
os: [ubuntu-20.04, macOS-10.15, windows-2019]
12-
python-version: [3.6, 3.7, 3.8, 3.9]
15+
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
1316
steps:
14-
- uses: actions/checkout@v2
15-
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v2
17-
with:
18-
python-version: ${{ matrix.python-version }}
19-
- name: Install dependencies
20-
run: python3 -m pip install .[test]
21-
- name: Run tests
22-
run: pytest
17+
- uses: actions/checkout@v2
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install dependencies
23+
run: |
24+
python3 -m pip install poetry
25+
poetry install -v
26+
- name: Run tests
27+
run: poetry run pytest
2328

2429
style:
2530
runs-on: ubuntu-latest
26-
31+
strategy:
32+
fail-fast: false
2733
steps:
2834
- uses: actions/checkout@v2
29-
- name: Setup python
35+
- name: Set up Python
3036
uses: actions/setup-python@v2
3137
with:
3238
python-version: 3.9
33-
architecture: x64
34-
- name: Install pre-commit
35-
run: pip install pre-commit
36-
- name: Run pre-commit
37-
run: pre-commit run -a
39+
- name: Install dependencies
40+
run: |
41+
python3 -m pip install poetry
42+
poetry install -v
43+
- name: Run linters
44+
run: poetry run pre-commit run -a

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
.tox
1+
/.gitignore
22
__pycache__
33
*.egg-info
4+
poetry.lock

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,18 @@ Example usage:
3737

3838
# Contributing
3939

40-
This project uses [precommit](https://pre-commit.com/). You can install it with
41-
`python3 -m pip install --user pre-commit` and running `pre-commit install`.
40+
To set up the project:
41+
```sh
42+
pip install --user poetry
43+
44+
git clone https://github.com/rr-/pycrcmanip.git
45+
cd pycrcmanip
46+
47+
poetry install
48+
poetry run pre-commit install
49+
```
50+
51+
To run tests:
52+
```
53+
poetry run pytest
54+
```

pyproject.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1+
[build-system]
2+
requires = ["poetry-core>=1.0.0"]
3+
build-backend = "poetry.core.masonry.api"
4+
5+
[tool.poetry]
6+
name = "docstring_parser"
7+
version = "0.13"
8+
description = "Parse Python docstrings in reST, Google and Numpydoc format"
9+
authors = ["Marcin Kurczewski <[email protected]>"]
10+
license = "MIT"
11+
readme = "README.md"
12+
repository = "https://github.com/rr-/docstring_parser"
13+
classifiers = [
14+
"Environment :: Other Environment",
15+
"Development Status :: 4 - Beta",
16+
"Intended Audience :: Developers",
17+
"License :: OSI Approved :: MIT License",
18+
"Natural Language :: English",
19+
"Operating System :: OS Independent",
20+
"Programming Language :: Python :: 3.6",
21+
"Programming Language :: Python :: 3.7",
22+
"Programming Language :: Python :: 3.8",
23+
"Programming Language :: Python :: 3.9",
24+
"Topic :: Documentation :: Sphinx",
25+
"Topic :: Text Processing :: Markup",
26+
"Topic :: Software Development :: Libraries :: Python Modules",
27+
]
28+
packages = [
29+
{ include = "docstring_parser" }
30+
]
31+
include = ["docstring_parser/py.typed"]
32+
33+
[tool.poetry.dependencies]
34+
python = ">=3.6,<4.0"
35+
36+
[tool.poetry.dev-dependencies]
37+
pre-commit = {version = ">=2.16.0", python = ">=3.9"}
38+
pytest = "*"
39+
140
[tool.black]
241
line-length = 79
342
py36 = true

setup.cfg

Lines changed: 0 additions & 38 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)