Skip to content

Commit

Permalink
Merge pull request #52 from jacebrowning/drop-python-2
Browse files Browse the repository at this point in the history
Drop support for Python 2
  • Loading branch information
jacebrowning committed Nov 10, 2019
2 parents 2c24068 + 12854f5 commit 9686e3f
Show file tree
Hide file tree
Showing 33 changed files with 573 additions and 652 deletions.
10 changes: 4 additions & 6 deletions .appveyor.yml
Expand Up @@ -2,10 +2,6 @@ environment:
global:
RANDOM_SEED: 0
matrix:
- PYTHON_MAJOR: 2
PYTHON_MINOR: 7
- PYTHON_MAJOR: 3
PYTHON_MINOR: 4
- PYTHON_MAJOR: 3
PYTHON_MINOR: 5
- PYTHON_MAJOR: 3
Expand All @@ -14,7 +10,7 @@ environment:
PYTHON_MINOR: 7

cache:
- .venv -> Makefile
- .venv -> poetry.lock

install:
# Add Make and Python to the PATH
Expand All @@ -23,7 +19,9 @@ install:
- set PATH=C:\Python%PYTHON_MAJOR%%PYTHON_MINOR%;%PATH%
- set PATH=C:\Python%PYTHON_MAJOR%%PYTHON_MINOR%\Scripts;%PATH%
# Install system dependencies
- pip install poetry
- set POETRY_PREVIEW=true
- curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
- set PATH=%USERPROFILE%\.poetry\bin;%PATH%
- make doctor
# Install project dependencies
- make install
Expand Down
9 changes: 9 additions & 0 deletions .coveragerc
Expand Up @@ -2,6 +2,15 @@

branch = true

data_file = .cache/coverage

omit =
.venv/*
*/tests/*
*/__main__.py

[report]

exclude_lines =
pragma: no cover
raise NotImplementedError
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,6 +3,7 @@
*.egg-info
__pycache__
.ipynb_checkpoints
setup.py

# Temporary OS files
Icon*
Expand Down
5 changes: 4 additions & 1 deletion .isort.cfg
Expand Up @@ -2,12 +2,15 @@

not_skip = __init__.py

multi_line_output = 5
multi_line_output = 3

known_standard_library = dataclasses,typing_extensions
known_third_party = click,log
known_first_party = demo

combine_as_imports = true
force_grid_wrap = false
include_trailing_comma = true

lines_after_imports = 2
line_length = 88
7 changes: 7 additions & 0 deletions .mypy.ini
@@ -0,0 +1,7 @@
[mypy]

ignore_missing_imports = true
no_implicit_optional = true
check_untyped_defs = true

cache_dir = .cache/mypy/
7 changes: 5 additions & 2 deletions .pylint.ini
Expand Up @@ -124,6 +124,9 @@ disable=
too-many-arguments,
too-many-branches,
unpacking-non-sequence,
wildcard-import,
unused-wildcard-import,
singleton-comparison,

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand All @@ -143,7 +146,7 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme

# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details
msg-template={path}:{line}:{column}: {msg_id}: {msg} ({symbol})
#msg-template=

# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio).You can also give a reporter class, eg
Expand Down Expand Up @@ -267,7 +270,7 @@ indent-after-paren=4
indent-string=' '

# Maximum number of characters on a single line.
max-line-length=79
max-line-length=88

# Maximum number of lines in a module
max-module-lines=1000
Expand Down
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

1 change: 0 additions & 1 deletion .scrutinizer.yml
Expand Up @@ -3,7 +3,6 @@ build:
override:
- pylint-run --rcfile=.pylint.ini
- py-scrutinizer-run

checks:
python:
code_rating: true
Expand Down
15 changes: 7 additions & 8 deletions .travis.yml
@@ -1,14 +1,10 @@
dist: xenial

language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
matrix:
include:
- python: 3.7
dist: xenial
sudo: true
- 3.7

cache:
pip: true
Expand All @@ -20,7 +16,10 @@ env:
- RANDOM_SEED=0

before_install:
- pip install poetry
- curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | POETRY_PREVIEW=true python
- source $HOME/.poetry/env
- mkdir -p $HOME/.config/pypoetry
- touch $HOME/.config/pypoetry/config.toml
- make doctor

install:
Expand Down
6 changes: 3 additions & 3 deletions .verchew.ini
Expand Up @@ -6,17 +6,17 @@ version = GNU Make
[Python]

cli = python
version = Python 2.7.
version = 3.5 || 3.6 || 3.7

[Poetry]

cli = poetry
version = 0.12.
version = 1.0

[Graphviz]

cli = dot
cli_version_arg = -V
version = 2.
version = 2
optional = true
message = This is only needed to generate UML diagrams for documentation.
67 changes: 32 additions & 35 deletions CONTRIBUTING.md
@@ -1,79 +1,76 @@
# For Contributors
# Setup

## Setup

### Requirements
## Requirements

* Make:
* Windows: http://mingw.org/download/installer
* Mac: http://developer.apple.com/xcode
* Linux: http://www.gnu.org/software/make
* Poetry: https://poetry.eustace.io
* Graphviz: http://www.graphviz.org/Download.php
* macOS: `$ xcode-select --install`
* Linux: [https://www.gnu.org/software/make](https://www.gnu.org/software/make)
* Windows: [https://mingw.org/download/installer](https://mingw.org/download/installer)
* Python: `$ pyenv install`
* Poetry: [https://poetry.eustace.io/docs/#installation](https://poetry.eustace.io/docs/#installation)
* Graphviz:
* macOS: `$ brew install graphviz`
* Linux: [https://graphviz.org/download](https://graphviz.org/download/)
* Windows: [https://graphviz.org/download](https://graphviz.org/download/)

To confirm these system dependencies are configured correctly:

```sh
```text
$ make doctor
```

### Installation
## Installation

Install project dependencies into a virtual environment:

```sh
```text
$ make install
```

## Development Tasks
# Development Tasks

### Testing
## Manual

Manually run the tests:
Run the tests:

```sh
```text
$ make test
```

or keep them running on change:
Run static analysis:

```sh
$ make watch
```text
$ make check
```

> In order to have OS X notifications, `brew install terminal-notifier`.
### Documentation

Build the documentation:

```sh
```text
$ make docs
```

### Static Analysis
## Automatic

Run linters and static analyzers:
Keep all of the above tasks running on change:

```sh
$ make pylint
$ make pycodestyle
$ make pydocstyle
$ make check # includes all checks
```text
$ make watch
```

## Continuous Integration
> In order to have OS X notifications, `brew install terminal-notifier`.
# Continuous Integration

The CI server will report overall build status:

```sh
```text
$ make ci
```

## Release Tasks
# Release Tasks

Release to PyPI:

```sh
```text
$ make upload
```

0 comments on commit 9686e3f

Please sign in to comment.