Skip to content

Commit

Permalink
Release 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristinita authored and Kristinita committed Aug 3, 2018
2 parents 94b3f4d + f31606f commit d073914
Show file tree
Hide file tree
Showing 14 changed files with 742 additions and 700 deletions.
26 changes: 15 additions & 11 deletions .release-it.json
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
}
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#### 0.3.1 (2018-08-03)

##### Continuous Integration

* **travis:** Test CI after pyfancy publishing ([89050bb7](https://github.com/Kristinita/Erichek/commit/89050bb709bff6c44bf9e9dd07bcf69b99ae872a))

##### New Features

* **version:** update ([94b3f4d3](https://github.com/Kristinita/Erichek/commit/94b3f4d3e15114b9062d6ce1b1090e62a2258656))

#### 0.2.1 (2018-02-09)

##### Bug Fixes
Expand Down
112 changes: 54 additions & 58 deletions README.rst
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
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ install:
# https://ci.appveyor.com/project/Kristinita/erichek/build/1.0.3
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"

- cmd: python -m pip install --upgrade pip
- cmd: pip install flake8
- cmd: pip install pydocstyle
- cmd: pip install pyfancy
- cmd: pip install pyroma
# Needs, because pyroma works incorrect in old setuptools versions:
# https://github.com/regebro/pyroma/issues/16#issuecomment-362795949
Expand Down
190 changes: 95 additions & 95 deletions erichek/__main__.py
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()
Loading

0 comments on commit d073914

Please sign in to comment.