Skip to content

Commit

Permalink
Drop distutils dependency and test with Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsca committed Dec 4, 2021
1 parent 52d44af commit d5fb00e
Show file tree
Hide file tree
Showing 16 changed files with 255 additions and 423 deletions.
Binary file added .coverage
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ sdist/
site/*
var/
wheels/

.DS_Store
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
fail_fast: true
repos:
- repo: local
hooks:
- id: flake8
name: flake8
entry: make lint
language: system
types: [python]
pass_filenames: false
always_run: true
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": ".venv/bin/python"
}
178 changes: 0 additions & 178 deletions LICENSE

This file was deleted.

20 changes: 20 additions & 0 deletions MIT-LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2019 Juan-Pablo Scaletti

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 changes: 7 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
all: PHONY

help:
@echo "clean - remove build/python artifacts"
@echo "test - run tests"
@echo "lint - check style with flake8"
@echo "coverage - generate an HTML report of the coverage"
@echo "install - install for development"

clean: clean-build clean-pyc

clean-build:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
rm -rf pip-wheel-metadata
rm -rf *.egg-info

clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -rf {} +
find . -name '.pytest_cache' -exec rm -rf {} +

test:
pytest -x texteditor tests

Expand All @@ -32,5 +7,10 @@ lint:
coverage:
pytest --cov-report html --cov texteditor texteditor tests

install:
pip install -e .[dev]
typecheck:
mypy texteditor tests

setup:
pip install -U pip wheel
pip install -e .[dev,test]
pre-commit install
65 changes: 41 additions & 24 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = texteditor
version= 1.3
version= 1.4
url = https://github.com/jpsca/texteditor
project_urls =
Issue tracker = https://github.com/jpsca/texteditor/issues
Expand All @@ -10,8 +10,8 @@ classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
license = Apache License Version 2.0
license_file = LICENSE
license = MIT
license_files = MIT-LICENSE
description = Like webbrowser, but for the text editor.
long_description = file:README.md
long_description_content_type = text/markdown
Expand All @@ -21,51 +21,68 @@ packages = find:
include_package_data = true
python_requires = >=3.5,<4.0
install_requires =


[options.packages.find]
exclude =
tests

[options.extras_require]
test =
flake8
flake8-bugbear
flake8-import-order
flake8-logging-format
flake8-quotes
pytest
pytest-cov

dev =
black
flake8
pytest
pytest-cov
mypy
pre-commit
tox


[flake8]
application-package-names = texteditor
application-import-names = texteditor
import-order-style = pycharm

select =
B, # bugbear
B9, # bugbear opinionated
C, # mccabe, comprehensions, commas
E, # pycodestyle errors
F, # pyflakes
G, # logging format
I, # imports
B # bugbear
C # mccabe, comprehensions, commas
E # pycodestyle errors
F # pyflakes
G # logging format
I # imports
P,
Q, # quotes
RST, # rst docstring formatting
T0, # print
T4, # mypy
W, # pycodestyle warnings
Q # quotes
T4 # mypy
W # pycodestyle warnings

ignore =
W503, # W503 line break before binary operator
E203, # E203 whitespace before ':'
W503 # line break before binary operator
W504 # line break after binary operator
E203 # whitespace before ':'
E501 # line too long

max-line-length = 98
max-complexity = 10
max-line-length = 88

inline-quotes = double
multiline-quotes = double
docstring-quotes = double

statistics = true
doctests = True
doctests = true
accept-encodings = utf-8

exclude =
.git
.venv
__pycache__
conftest.py


[tool:pytest]
addopts = --doctest-modules
6 changes: 0 additions & 6 deletions setup.py

This file was deleted.

Empty file removed tests/conftest.py
Empty file.
Loading

0 comments on commit d5fb00e

Please sign in to comment.