Skip to content

Commit

Permalink
build: switch to Poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Dec 21, 2021
1 parent e35cf38 commit fcd4c9d
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 62 deletions.
40 changes: 23 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,35 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, macOS-10.15, windows-2019]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python3 -m pip install .[test]
- name: Run tests
run: pytest
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
export PYTHONIOENCODING=utf-8
python3 -m pip install poetry
poetry install -v
- name: Run tests
run: poetry run pytest

style:
runs-on: ubuntu-latest

strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Setup python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: x64
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run -a
- name: Install dependencies
run: |
export PYTHONIOENCODING=utf-8
python3 -m pip install poetry
poetry install -v
- name: Run linters
run: poetry run pre-commit run -a
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.tox
/.gitignore
__pycache__
*.egg-info
poetry.lock
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,18 @@ Example usage:

# Contributing

This project uses [precommit](https://pre-commit.com/). You can install it with
`python3 -m pip install --user pre-commit` and running `pre-commit install`.
To set up the project:
```sh
pip install --user poetry

git clone https://github.com/rr-/pycrcmanip.git
cd pycrcmanip

poetry install
poetry run pre-commit install
```

To run tests:
```
poetry run pytest
```
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "docstring_parser"
version = "0.13"
description = "Parse Python docstrings in reST, Google and Numpydoc format"
authors = ["Marcin Kurczewski <[email protected]>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/rr-/docstring_parser"
classifiers = [
"Environment :: Other Environment",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Documentation :: Sphinx",
"Topic :: Text Processing :: Markup",
"Topic :: Software Development :: Libraries :: Python Modules",
]
packages = [
{ include = "docstring_parser" }
]
include = ["docstring_parser/py.typed"]

[tool.poetry.dependencies]
python = ">=3.6,<4.0"

[tool.poetry.dev-dependencies]
pre-commit = {version = ">=2.16.0", python = ">=3.9"}
pytest = "*"

[tool.black]
line-length = 79
py36 = true
Expand Down
38 changes: 0 additions & 38 deletions setup.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions setup.py

This file was deleted.

0 comments on commit fcd4c9d

Please sign in to comment.