mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-03 03:11:52 +02:00
Add dictionary to documentation.
This commit is contained in:
parent
96092fe43f
commit
916eb3d8fa
6 changed files with 23 additions and 8 deletions
10
.github/CONTRIBUTING.md
vendored
10
.github/CONTRIBUTING.md
vendored
|
@ -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/<user name>.xml`
|
||||
* in `.idea/dictionaries/<user name>.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 <file name>`.
|
||||
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 <file name>`.
|
||||
|
||||
If you create new Python file, make sure you add `__author__ = "<first name> <second name>"` and `__email__ = "<author e-mail>"` string variables.
|
||||
|
||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/bin/python3
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Commit message checking.
|
||||
"""
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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/<user name>.xml}}
|
||||
{in \m {.idea/dictionaries/<user name>.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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue