Skip to content

Commit

Permalink
Merge pull request #87 from rocioar/switch-to-poetry
Browse files Browse the repository at this point in the history
Add poetry config, remove unnecessary files
  • Loading branch information
rocioar committed May 11, 2021
2 parents a87dc7d + 4ef991c commit 8b90816
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 734 deletions.
7 changes: 6 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[flake8]
max-line-length = 120
exclude = tests/fixtures/*
exclude =
.git,
__pycache__,
.venv,
build
tests/fixtures/*
21 changes: 11 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: pip install poetry && poetry install
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
run: poetry install
- name: Test
run: pytest
run: poetry run pytest

flake8:
runs-on: ubuntu-latest
steps:
Expand All @@ -34,10 +35,10 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: pip install flake8
- name: Install Dependencies
run: pip install poetry && poetry install
- name: Run flake8
run: git diff HEAD $(git merge-base HEAD origin/master) | flake8 --diff
run: git diff HEAD $(git merge-base HEAD origin/master) | poetry run flake8 --diff
coverage:
runs-on: ubuntu-latest
steps:
Expand All @@ -46,10 +47,10 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: pip install pytest-cov
- name: Install Dependencies
run: pip install poetry && poetry install
- name: Run Coverage
run: pytest --cov=.
run: poetry run pytest --cov=.
- name: Upload Coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down
674 changes: 0 additions & 674 deletions LICENSE

This file was deleted.

2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

1 change: 0 additions & 1 deletion flake8_django/VERSION

This file was deleted.

2 changes: 1 addition & 1 deletion flake8_django/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from flake8_django.checker import DjangoStyleChecker
from flake8_django.checker import DjangoStyleChecker # noqa: F401
2 changes: 1 addition & 1 deletion flake8_django/checkers/model_content_order.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ast import Assign, Call, ClassDef, FunctionDef
from ast import Assign, ClassDef, FunctionDef
from functools import partial

from .base_model_checker import BaseModelChecker
Expand Down
37 changes: 37 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[tool.poetry]
name = "flake8-django"
version = "1.1.1"
license = "GPL-3.0-or-later"
description = "Plugin to catch bad style specific to Django Projects."
authors = ["Rocio Aramberri Schegel <[email protected]>"]
readme = "README.md"
keywords = ["flake8", "django", "lint"]
repository = "https://github.com/rocioar/flake8-django"
classifiers=[
"Framework :: Flake8",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
]

[tool.poetry.plugins]
[tool.poetry.plugins."flake8.extension"]
DJ0 = "flake8_django:DjangoStyleChecker"

[build-system]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.dependencies]
python = "^3.6"
flake8 = "^3.8.4"

[tool.poetry.dev-dependencies]
pytest = "^6.2.2"
pytest-cov = "^2.11.1"
44 changes: 0 additions & 44 deletions setup.py

This file was deleted.

0 comments on commit 8b90816

Please sign in to comment.