-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
742 additions
and
700 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
{ | ||
"buildCommand": "changelog -u https:\/\/${repo.host}\/${repo.repository} -f CHANGELOG.md && sed -i 's\/^version = .*$\/version = ${version}\/g' setup.cfg && sed -i 's\/^VERSION = \".*\"$\/VERSION = \"${version}\"\/g' \"erichek\/eric_config.py\" && python setup.py bdist_wheel && twine upload dist\/*", | ||
"changelogCommand": "changelog -f -", | ||
"github": { | ||
"release": true, | ||
"tokenRef": "GITHUB_TOKEN" | ||
}, | ||
"npm": { | ||
"publish": false | ||
}, | ||
"safeBump": false | ||
{ | ||
"buildCommand": "changelog -u https:\/\/${repo.host}\/${repo.repository} -f CHANGELOG.md && sed -i 's\/^version = .*$\/version = ${version}\/g' setup.cfg && sed -i 's\/^VERSION = \".*\"$\/VERSION = \"${version}\"\/g' \"erichek\/eric_config.py\" && python setup.py bdist_wheel && twine upload dist\/*", | ||
"changelogCommand": "changelog -f -", | ||
"github": { | ||
"release": true, | ||
"tokenRef": "GITHUB_TOKEN" | ||
}, | ||
"npm": { | ||
"publish": false | ||
}, | ||
"requireCleanWorkingDir": false, | ||
"safeBump": false, | ||
"src": { | ||
"addUntrackedFiles": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,54 @@ | ||
.. target parameter necessary, that badges displayed in GitHub as inline elements, not as a block elements, see: | ||
.. https://github.com/badges/shields/issues/1491#issuecomment-364201130 | ||
.. Active repository status — http://www.repostatus.org | ||
.. image:: http://www.repostatus.org/badges/latest/active.svg | ||
:target: http://www.repostatus.org/#active | ||
:alt: Project Status: Active – The project has reached a stable, usable state and is being actively developed. | ||
|
||
.. PyPI version — https://badge.fury.io/py/ | ||
.. image:: https://badge.fury.io/py/erichek.svg | ||
:target: https://badge.fury.io/py/erichek | ||
:alt: PyPI version | ||
|
||
.. image:: https://img.shields.io/pypi/pyversions/erichek.svg?style=plastic | ||
:target: https://img.shields.io/pypi/pyversions/erichek.svg?style=plastic | ||
:alt: Python version | ||
|
||
.. image:: https://img.shields.io/pypi/wheel/erichek.svg?style=plastic | ||
:target: https://img.shields.io/pypi/wheel/erichek.svg?style=plastic | ||
:alt: Wheel | ||
|
||
.. image:: https://travis-ci.org/Kristinita/Erichek.svg?branch=master | ||
:target: https://travis-ci.org/Kristinita/Erichek | ||
:alt: Travis CI | ||
|
||
.. AppVeyor badge incorrect displayed in http://rst.ninjs.org — online reStructuredText Viewer | ||
.. image:: https://ci.appveyor.com/api/projects/status/gscnxa6gj2oej1gn?svg=true | ||
:target: https://ci.appveyor.com/project/Kristinita/erichek | ||
:alt: AppVeyor | ||
|
||
.. image:: https://circleci.com/gh/Kristinita/Erichek.svg?style=svg | ||
:target: https://circleci.com/gh/Kristinita/Erichek | ||
:alt: Circle CI | ||
|
||
.. image:: https://lintly.com/gh/Kristinita/Erichek/badge.svg?style=plastic | ||
:target: https://lintly.com/gh/Kristinita/Erichek/ | ||
:alt: Lintly | ||
|
||
.. image:: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=plastic | ||
:target: http://commitizen.github.io/cz-cli/ | ||
:alt: Commitizen-friendly | ||
|
||
|
||
.. Bold text in links | ||
.. https://stackoverflow.com/a/4836544/5951529 | ||
Erichek — validator for |Eric's rooms|_. | ||
|
||
See full description in |https://Kristinita.ru/Programs/Erichek|_ page. | ||
|
||
.. |Eric's rooms| replace:: **Eric's rooms** | ||
.. _Eric's rooms: https://github.com/Kristinita/Erics-Green-Room | ||
|
||
.. |https://Kristinita.ru/Programs/Erichek| replace:: **https://Kristinita.ru/Programs/Erichek** | ||
.. _https://Kristinita.ru/Programs/Erichek: https://Kristinita.ru/Programs/Erichek | ||
.. target parameter necessary, that badges displayed in GitHub as inline elements, not as a block elements, see: | ||
.. https://github.com/badges/shields/issues/1491#issuecomment-364201130 | ||
.. Active repository status — http://www.repostatus.org | ||
.. image:: http://www.repostatus.org/badges/latest/active.svg | ||
:target: http://www.repostatus.org/#active | ||
:alt: Project Status: Active – The project has reached a stable, usable state and is being actively developed. | ||
|
||
.. PyPI version — https://badge.fury.io/py/ | ||
.. image:: https://badge.fury.io/py/erichek.svg | ||
:target: https://badge.fury.io/py/erichek | ||
:alt: PyPI version | ||
|
||
.. image:: https://img.shields.io/pypi/pyversions/erichek.svg?style=plastic | ||
:target: https://img.shields.io/pypi/pyversions/erichek.svg?style=plastic | ||
:alt: Python version | ||
|
||
.. image:: https://img.shields.io/pypi/wheel/erichek.svg?style=plastic | ||
:target: https://img.shields.io/pypi/wheel/erichek.svg?style=plastic | ||
:alt: Wheel | ||
|
||
.. image:: https://travis-ci.org/Kristinita/Erichek.svg?branch=master | ||
:target: https://travis-ci.org/Kristinita/Erichek | ||
:alt: Travis CI | ||
|
||
.. AppVeyor badge incorrect displayed in http://rst.ninjs.org — online reStructuredText Viewer | ||
.. image:: https://ci.appveyor.com/api/projects/status/gscnxa6gj2oej1gn?svg=true | ||
:target: https://ci.appveyor.com/project/Kristinita/erichek | ||
:alt: AppVeyor | ||
|
||
.. image:: https://circleci.com/gh/Kristinita/Erichek.svg?style=svg | ||
:target: https://circleci.com/gh/Kristinita/Erichek | ||
:alt: Circle CI | ||
|
||
.. image:: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=plastic | ||
:target: http://commitizen.github.io/cz-cli/ | ||
:alt: Commitizen-friendly | ||
|
||
|
||
.. Bold text in links | ||
.. https://stackoverflow.com/a/4836544/5951529 | ||
Erichek — validator for |Eric's rooms|_. | ||
|
||
See full description in |https://Kristinita.ru/Programs/Erichek|_ page. | ||
|
||
.. |Eric's rooms| replace:: **Eric's rooms** | ||
.. _Eric's rooms: https://github.com/Kristinita/Erics-Green-Room | ||
|
||
.. |https://Kristinita.ru/Programs/Erichek| replace:: **https://Kristinita.ru/Programs/Erichek** | ||
.. _https://Kristinita.ru/Programs/Erichek: https://Kristinita.ru/Programs/Erichek |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,95 @@ | ||
# -*- coding: utf-8 -*- | ||
# @Author: SashaChernykh | ||
# @Date: 2018-01-22 07:32:05 | ||
# @Last Modified time: 2018-02-01 19:15:27 | ||
"""Run tests. | ||
Main file for running Erichek tests. | ||
""" | ||
|
||
import erichek.eric_asterisks as eric_asterisks | ||
import erichek.eric_body as eric_body | ||
import erichek.eric_encoding as eric_encoding | ||
import erichek.eric_head as eric_head | ||
import logbook | ||
|
||
from clize import run | ||
from erichek.eric_config import clize_log_level | ||
from erichek.eric_config import v | ||
from erichek.eric_config import version | ||
|
||
# Pyfancy — output color highighting | ||
# Disabled green background, because bad color in AppVeyor | ||
# https://github.com/appveyor/ci/issues/1138#issuecomment-355525721 | ||
# Import class, not a module | ||
# https://stackoverflow.com/a/4534443/5951529 | ||
from pyfancy.pyfancy import pyfancy | ||
|
||
# ASCII-art printing | ||
# [BUG] ASCII-ART output, when --help or --version | ||
# https://github.com/epsy/clize/issues/38#issue-290426111 | ||
# https://stackoverflow.com/a/9638532/5951529 | ||
# import sys | ||
# from colorama import init | ||
# from pyfiglet import figlet_format | ||
# from termcolor import cprint | ||
|
||
# strip colors if stdout is redirected | ||
# init(strip=not sys.stdout.isatty()) | ||
|
||
LOG = logbook.Logger("summary logbook") | ||
|
||
|
||
def red_foreground(redtext): | ||
"""Red foreground for error messages. | ||
Red foreground for error messages. | ||
Arguments: | ||
redtext {str} -- text, which will be colored in red. | ||
""" | ||
LOG.error(pyfancy().red().bold(redtext)) | ||
|
||
|
||
def green_foreground(greentext): | ||
"""Green foreground for notice messages. | ||
Green foreground for error messages. | ||
Arguments: | ||
greentext {str} -- text, which will be colored in green. | ||
""" | ||
LOG.notice(pyfancy().green().bold(greentext)) | ||
|
||
|
||
def main(): | ||
"""Run Erichek. | ||
Run all modules of Erichek. | ||
If no errors — validation success, | ||
Else — exit(1). | ||
""" | ||
run(clize_log_level, alt=[version, v], exit=False) | ||
eric_encoding.eric_encoding_summary() | ||
eric_body.eric_body_summary() | ||
eric_asterisks.eric_asterisks_summary() | ||
eric_head.eric_head_summary() | ||
|
||
# If all instead of multiple if and: | ||
# https://stackoverflow.com/a/9504681/5951529 | ||
if all([eric_body.BODY_EXIST, eric_encoding.ENCODING_WINDOWS_1251, eric_asterisks.ASTERISKS_EXISTS, | ||
eric_head.HEAD_DATA]): | ||
green_foreground( | ||
"Congratulations! You haven't errors in your packages!") | ||
# cprint(figlet_format('\nSuccess', font='starwars'), | ||
# 'white', 'on_green', attrs=['bold']) | ||
else: | ||
red_foreground( | ||
"You have errors in your packages. Please, fix them.") | ||
# cprint(figlet_format('\nFailure', font='starwars'), | ||
# 'yellow', 'on_red', attrs=['bold']) | ||
exit(1) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() | ||
# -*- coding: utf-8 -*- | ||
# @Author: SashaChernykh | ||
# @Date: 2018-01-22 07:32:05 | ||
# @Last Modified time: 2018-08-03 13:38:17 | ||
"""Run tests. | ||
Main file for running Erichek tests. | ||
""" | ||
|
||
import erichek.eric_asterisks as eric_asterisks | ||
import erichek.eric_body as eric_body | ||
import erichek.eric_encoding as eric_encoding | ||
import erichek.eric_head as eric_head | ||
import logbook | ||
|
||
from clize import run | ||
from erichek.eric_config import clize_log_level | ||
from erichek.eric_config import v | ||
from erichek.eric_config import version | ||
|
||
# Pyfancy — output color highighting | ||
# Disabled green background, because bad color in AppVeyor | ||
# https://github.com/appveyor/ci/issues/1138#issuecomment-355525721 | ||
# Import class, not a module | ||
# https://stackoverflow.com/a/4534443/5951529 | ||
from pyfancy.pyfancy import pyfancy | ||
|
||
# ASCII-art printing | ||
# [BUG] ASCII-ART output, when --help or --version | ||
# https://github.com/epsy/clize/issues/38#issue-290426111 | ||
# https://stackoverflow.com/a/9638532/5951529 | ||
# import sys | ||
# from colorama import init | ||
# from pyfiglet import figlet_format | ||
# from termcolor import cprint | ||
|
||
# strip colors if stdout is redirected | ||
# init(strip=not sys.stdout.isatty()) | ||
|
||
LOG = logbook.Logger("summary logbook") | ||
|
||
|
||
def red_foreground(redtext): | ||
"""Red foreground for error messages. | ||
Red foreground for error messages. | ||
Arguments: | ||
redtext {str} -- text, which will be colored in red. | ||
""" | ||
LOG.error(pyfancy().red().bold(redtext)) | ||
|
||
|
||
def green_foreground(greentext): | ||
"""Green foreground for notice messages. | ||
Green foreground for error messages. | ||
Arguments: | ||
greentext {str} -- text, which will be colored in green. | ||
""" | ||
LOG.notice(pyfancy().green().bold(greentext)) | ||
|
||
|
||
def main(): | ||
"""Run Erichek. | ||
Run all modules of Erichek. | ||
If no errors — validation success, | ||
Else — exit(1). | ||
""" | ||
run(clize_log_level, alt=[version, v], exit=False) | ||
eric_encoding.eric_encoding_summary() | ||
eric_body.eric_body_summary() | ||
eric_asterisks.eric_asterisks_summary() | ||
eric_head.eric_head_summary() | ||
|
||
# If all instead of multiple if and: | ||
# https://stackoverflow.com/a/9504681/5951529 | ||
if all([eric_body.BODY_EXIST, eric_encoding.ENCODING_UTF_8, eric_asterisks.ASTERISKS_EXISTS, | ||
eric_head.HEAD_DATA]): | ||
green_foreground( | ||
"Congratulations! You haven't errors in your packages!") | ||
# cprint(figlet_format('\nSuccess', font='starwars'), | ||
# 'white', 'on_green', attrs=['bold']) | ||
else: | ||
red_foreground( | ||
"You have errors in your packages. Please, fix them.") | ||
# cprint(figlet_format('\nFailure', font='starwars'), | ||
# 'yellow', 'on_red', attrs=['bold']) | ||
exit(1) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
Oops, something went wrong.