diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 2d8d29a..e12ad12 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -11,7 +11,7 @@ Please, create an issue with `icon` label. Report a bug ------------ -Please, create an issue with `bug` and `generator` labels. +Please, create an issue with `bug` label. Fix a typo in documentation --------------------------- @@ -26,9 +26,15 @@ First of all, configure your workspace. * Install formatter, linter and test system: `pip install black flake8 pytest`. * Be sure to run `git config --local core.hooksPath data/githooks` to enable Git hooks. +If you are using Pycharm, you may want to set up user dictionary as well: + + * `cp data/dictionary.xml .idea/dictionaries/.xml` + * in `.idea/dictionaries/.xml` change `%USERNAME%` to your user name, + * restart Pycharm. + ### Code style ### -We use [Black](http://github.com/psf/black) code formatter with maximum 80 characters line lenght for all Python files within the project. Reformat a file is as simple as `black -l 80 `. +We use [Black](http://github.com/psf/black) code formatter with maximum 80 characters line length for all Python files within the project. Reformat a file is as simple as `black -l 80 `. If you create new Python file, make sure you add `__author__ = " "` and `__email__ = ""` string variables. diff --git a/.gitignore b/.gitignore index 9d28a3f..d667d03 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ dist/ doc/*.html doc/*.svg doc/*.wiki -missed_tags.yml out/ # Cache @@ -22,3 +21,6 @@ cache/ work precommit.py + +venv +.idea diff --git a/data/githooks/commit-msg b/data/githooks/commit-msg index 0316258..76600b9 100755 --- a/data/githooks/commit-msg +++ b/data/githooks/commit-msg @@ -1,4 +1,4 @@ -#!/usr/local/bin/python3 +#!/usr/bin/env python3 """ Commit message checking. """ diff --git a/data/githooks/pre-commit b/data/githooks/pre-commit index 41ddc82..8d43f7a 100755 --- a/data/githooks/pre-commit +++ b/data/githooks/pre-commit @@ -13,5 +13,5 @@ echo "Lint with Flake8..." flake8 \ --max-line-length=80 \ --ignore=E203,W503,ANN002,ANN003,ANN101,ANN102 \ - --exclude=work,python3.8 \ + map_machine setup.py tests \ || { echo "FAIL"; exit 1; } diff --git a/doc/contributing.moi b/doc/contributing.moi index 6c2cf63..7a9f4a7 100644 --- a/doc/contributing.moi +++ b/doc/contributing.moi @@ -12,7 +12,7 @@ Please, create an issue with \m {icon} label. \2 {Report a bug} {} -Please, create an issue with \m {bug} and \m {generator} labels. +Please, create an issue with \m {bug} label. \2 {Fix a typo in documentation} {} @@ -26,8 +26,15 @@ First of all, configure your workspace. {Install formatter, linter and test system\: \m {pip install black flake8 pytest}.} {Be sure to run \m {git config --local core.hooksPath data/githooks} to enable Git hooks.} +If you are using Pycharm, you may want to set up user dictionary as well: + +\list + {\m {cp data/dictionary.xml .idea/dictionaries/.xml}} + {in \m {.idea/dictionaries/.xml} change \m {%USERNAME%} to your user name,} + {restart Pycharm.} + \3 {Code style} {code-style} -We use \ref {http://github.com/psf/black} {Black} code formatter with maximum 80 characters line lenght for all Python files within the project. Reformat a file is as simple as \m {black -l 80 \formal {file name}}. +We use \ref {http://github.com/psf/black} {Black} code formatter with maximum 80 characters line length for all Python files within the project. Reformat a file is as simple as \m {black -l 80 \formal {file name}}. If you create new Python file, make sure you add \m {__author__ = "\formal {first name} \formal {second name}"} and \m {__email__ = "\formal {author e-mail}"} string variables. diff --git a/map_machine/color.py b/map_machine/color.py index b6d96cd..0984aea 100644 --- a/map_machine/color.py +++ b/map_machine/color.py @@ -13,7 +13,7 @@ __email__ = "me@enzet.ru" def is_bright(color: Color) -> bool: """ - Check whether color bright enough to have black outline instead of white. + Check whether color is bright enough to have black outline instead of white. """ return ( 0.2126 * color.red + 0.7152 * color.green + 0.0722 * color.blue