Skip to content

Commit

Permalink
refractor
Browse files Browse the repository at this point in the history
  • Loading branch information
bitranox committed Aug 8, 2020
1 parent c052e34 commit a458717
Show file tree
Hide file tree
Showing 17 changed files with 118 additions and 167 deletions.
2 changes: 1 addition & 1 deletion .docs/README_template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ rst_include
===========


Version v2.0.9 as of 2020-08-07 see `Changelog`_
Version v2.1.0 as of 2020-08-08 see `Changelog`_


.. include:: ./badges.rst
Expand Down
17 changes: 2 additions & 15 deletions .docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,17 @@
python -m pip --upgrade pip
python -m pip --upgrade setuptools
python -m pip --upgrade wheel
.. include:: ./installation_via_pypi.rst

- to install the latest development version from github via pip:
- to install the latest version from github via pip:


.. code-block:: bash
# normal install
python -m pip install --upgrade git+https://github.com/bitranox/rst_include.git
# to test without installing (can be skipped)
python -m pip install git+https://github.com/bitranox/rst_include.git --install-option test
# to install and upgrade all dependencies regardless of version number
python -m pip install --upgrade git+https://github.com/bitranox/rst_include.git --upgrade-strategy eager
- include it into Your requirements.txt:

Expand All @@ -39,19 +32,13 @@
python -m pip install --upgrade -r /<path>/requirements.txt
- to install the latest development version from source code:

.. code-block:: bash
# cd ~
$ git clone https://github.com/bitranox/rst_include.git
$ cd rst_include
# to test without installing (can be skipped)
python setup.py test
# normal install
python setup.py install
Expand Down
4 changes: 0 additions & 4 deletions .docs/installation_via_pypi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@

.. code-block:: bash
# install latest release from PyPi
python -m pip install --upgrade rst_include
# test latest release from PyPi without installing (can be skipped)
python -m pip install rst_include --install-option test
2 changes: 1 addition & 1 deletion .docs/tested_under.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tested on linux "bionic" with python 3.6, 3.7, 3.8, 3.8-dev, pypy3 - architectures: amd64, ppc64le, s390x, arm64

`100% code coverage <https://codecov.io/gh/bitranox/rst_include>`_, codestyle checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://travis-ci.org/bitranox/rst_include>`_, automatic daily builds and monitoring
`100% code coverage <https://codecov.io/gh/bitranox/rst_include>`_, flake8 style checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://travis-ci.org/bitranox/rst_include>`_, automatic daily builds and monitoring
66 changes: 39 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,23 @@ env:
- cPIP="python -m pip"
# switch off wine fix me messages
- WINEDEBUG=fixme-all
# mypy path

# PYTEST
- PYTEST_DO_TESTS="True"

# FLAKE8 tests
- DO_FLAKE8_TESTS="True"

# MYPY tests
- MYPY_DO_TESTS="True"
- MYPY_OPTIONS="--follow-imports=normal --implicit-reexport --no-warn-unused-ignores --strict"
- MYPYPATH="./rst_include/3rd_party_stubs"

# coverage
- DO_COVERAGE="True"
- DO_COVERAGE_UPLOAD_CODECOV="True"
- DO_COVERAGE_UPLOAD_CODE_CLIMATE="True"

# package name
- PACKAGE_NAME="rst_include"
# the registered CLI Command
Expand All @@ -24,9 +39,6 @@ env:
# the target file for rst_include (rebuild rst file includes)
- RST_INCLUDE_TARGET="./README.rst"

# do flake8 tests
- DO_FLAKE8_TESTS="True"

# secure environment variable
- secure: "Qe9oava9KsQAqDpYwKl3s51ZZTj6j1aZw+vrSJYz8GXanGGGVfoe1FLDjm9TyQTMDkiQd4HF0zKAbUGfgR3DKpfg17BgWZn9r8qt4WE4GclO0h3cXnqp7F3DmZqIBDyZfOgXalng51/g02G78rCeugA7jZ+pPFEzkPkmuhWrsalnsVKUpxxmsaBWCP8jftUTXbnuu7xB6RZPmd8Vz9eYbEwujES1cAo/Yz79crJfBIw3jYkU8GYGEVt9QojBTZXieD6WN6wexRzLRChzn32SDfhT6NQVKOqjNBItRXqJd8luwLbon6k63lyvA5VNNgA70Roa4SpsDwxmqeGLone2Y5WXXKcZgIxQcMVzxJMDYGNEtGX5rGuwOU1Fn6JM1LBC9AW79y1dusyAJJHumPa0f5FknIiUvIdJ5sz/emS/tuoSKtf12vSeXvQskZ2m/Fe5HWSym+qeOuNHqvmOcN+s2aiNFMTQWWxuhyN5o96AeDvn6eF8fpbQqTD1nSwzlZ13BZzB8FtokCU1ASxhqL9e0H6fXOWg8MjXFzgYYW5R6nx31CGOCSWUPWxX5Y2NfdJi9PCMZLOPMbWw0jOO6P3Fw2TuCxQGuAfSWuxMrWHFfrQpfG3eoaYYluzUKA9z2rAy7O9l7tu9dSSfl6IEmLi/dLnBKEIerNKNQpN1xWd8lAQ=" # CC_TEST_REPORTER_ID.secret
- secure: "DrfW5T9mXVPBREpmvqHm/lGeNINRXo7aCFXiW5RVGoyFR2GsdZuF8GQQX9SFBGm46bgQ9cuCQErEkwxxa5nBIXbfEIpn4TMDZ/JSbS7zWk4WT6VSuRXl2ibiKfZP53mR/+AAdJvoSY72JlDr6q1p/M9AMj816n5mvanDmebUQNiUHIksuRZR3I2RBAHj3aWb1AOYSg6WIMZernacamSnY4KCodYL5FXxjASHuyxP2vtU+tgrLmUxRtFX5zvPFAMv/0372cS/QSizwnuYbX2MU8UFuxsrBZISGuUtehItJ7/aYjhFzYN8CKad90OFqQNwQ+Tbd828vxq3kbKByVrZqbh5eJGDGBfZobFxOyEXIqfNcwVrVE5XDVbY6+BTu+YMXCJe/scHL6nxkKM8vs32LgofHo4RChY9HG8IHPzN2hgwohivBCnmzh4MpArfOXpAVXhhpioFcvKpaigiX35c1+Z4S3tdz6ERyzCox+tVAlZs5gUgNsU+ZVUbquHSRSo3+e+fAfc7NqZs+VjzIApUbxGHYn2GMSACuIwQLKOrNsWlAvJZ0BalstVyDEXESRjDwx0Z45WP88MjXUFVJIfFHMJzu0OtGPFY3QGIZIgxiZMei3/D0c8dU0gyMLZuwJZGHCkchTKTo6ZgdsNGnf+e3x3J0VyXHTENT0GuyYhKN88=" # PYPI_PASSWORD.secret
Expand Down Expand Up @@ -64,7 +76,7 @@ matrix:
- export DEPLOY_SDIST="False"
- export DEPLOY_WHEEL="False"
- export DEPLOY_TEST="False"
- export MYPY_STRICT="True"
- export MYPY_DO_TESTS="True"


- os: linux
Expand All @@ -74,10 +86,10 @@ matrix:
python: "3.6"
before_install:
- export BUILD_DOCS="False"
- export DEPLOY_SDIST="False"
- export DEPLOY_WHEEL="False"
- export DEPLOY_SDIST="True"
- export DEPLOY_WHEEL="True"
- export BUILD_TEST="True"
- export MYPY_STRICT="True"
- export MYPY_DO_TESTS="True"

- os: linux
arch: "amd64"
Expand All @@ -86,10 +98,10 @@ matrix:
python: "3.7"
before_install:
- export BUILD_DOCS="False"
- export DEPLOY_SDIST="False"
- export DEPLOY_SDIST="True"
- export DEPLOY_WHEEL="False"
- export BUILD_TEST="True"
- export MYPY_STRICT="True"
- export MYPY_DO_TESTS="True"

- os: linux
arch: "amd64"
Expand All @@ -101,7 +113,7 @@ matrix:
- export DEPLOY_SDIST="True"
- export DEPLOY_WHEEL="True"
- export BUILD_TEST="True"
- export MYPY_STRICT="True"
- export MYPY_DO_TESTS="True"

- os: linux
arch: "amd64"
Expand All @@ -110,10 +122,10 @@ matrix:
python: "3.8-dev"
before_install:
- export BUILD_DOCS="False"
- export DEPLOY_SDIST="False"
- export DEPLOY_WHEEL="False"
- export DEPLOY_SDIST="True"
- export DEPLOY_WHEEL="True"
- export BUILD_TEST="True"
- export MYPY_STRICT="True"
- export MYPY_DO_TESTS="True"

- os: linux
arch: "amd64"
Expand All @@ -122,10 +134,10 @@ matrix:
python: "pypy3"
before_install:
- export BUILD_DOCS="False"
- export DEPLOY_SDIST="False"
- export DEPLOY_WHEEL="False"
- export DEPLOY_SDIST="True"
- export DEPLOY_WHEEL="True"
- export BUILD_TEST="True"
- export MYPY_STRICT="False"
- export MYPY_DO_TESTS="False"

- os: linux
arch: "ppc64le"
Expand All @@ -134,10 +146,10 @@ matrix:
python: "3.8"
before_install:
- export BUILD_DOCS="False"
- export DEPLOY_SDIST="False"
- export DEPLOY_WHEEL="False"
- export DEPLOY_SDIST="True"
- export DEPLOY_WHEEL="True"
- export BUILD_TEST="True"
- export MYPY_STRICT="True"
- export MYPY_DO_TESTS="True"

- os: linux
arch: "s390x"
Expand All @@ -146,10 +158,10 @@ matrix:
python: "3.8"
before_install:
- export BUILD_DOCS="False"
- export DEPLOY_SDIST="False"
- export DEPLOY_WHEEL="False"
- export DEPLOY_SDIST="True"
- export DEPLOY_WHEEL="True"
- export BUILD_TEST="True"
- export MYPY_STRICT="True"
- export MYPY_DO_TESTS="True"

- os: linux
arch: "arm64"
Expand All @@ -158,10 +170,10 @@ matrix:
python: "3.8"
before_install:
- export BUILD_DOCS="False"
- export DEPLOY_SDIST="False"
- export DEPLOY_WHEEL="False"
- export DEPLOY_SDIST="True"
- export DEPLOY_WHEEL="True"
- export BUILD_TEST="True"
- export MYPY_STRICT="True"
- export MYPY_DO_TESTS="True"

- os: osx
if: true
Expand All @@ -178,7 +190,7 @@ matrix:
- export DEPLOY_SDIST="False"
- export DEPLOY_WHEEL="False"
- export DEPLOY_TEST="True"
- export MYPY_STRICT="True"
- export MYPY_DO_TESTS="True"


install:
Expand Down
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ Changelog
- new MINOR version for added functionality in a backwards compatible manner
- new PATCH version for backwards compatible bug fixes

v2.1.0
--------
2020-08-08: service release
- fix documentation
- fix travis
- deprecate pycodestyle
- implement flake8

v2.0.9
---------
2020-08-07: implement flake8 - transitional
Expand Down
32 changes: 11 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ rst_include
===========


Version v2.0.9 as of 2020-08-07 see `Changelog`_
Version v2.1.0 as of 2020-08-08 see `Changelog`_

|travis_build| |license| |pypi|

Expand Down Expand Up @@ -69,7 +69,7 @@ Python version required: 3.6.0 or newer

tested on linux "bionic" with python 3.6, 3.7, 3.8, 3.8-dev, pypy3 - architectures: amd64, ppc64le, s390x, arm64

`100% code coverage <https://codecov.io/gh/bitranox/rst_include>`_, codestyle checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://travis-ci.org/bitranox/rst_include>`_, automatic daily builds and monitoring
`100% code coverage <https://codecov.io/gh/bitranox/rst_include>`_, flake8 style checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://travis-ci.org/bitranox/rst_include>`_, automatic daily builds and monitoring

----

Expand Down Expand Up @@ -375,32 +375,20 @@ Installation and Upgrade
python -m pip --upgrade pip
python -m pip --upgrade setuptools
python -m pip --upgrade wheel
- to install the latest release from PyPi via pip (recommended):

.. code-block:: bash
# install latest release from PyPi
python -m pip install --upgrade rst_include
# test latest release from PyPi without installing (can be skipped)
python -m pip install rst_include --install-option test
- to install the latest development version from github via pip:
- to install the latest version from github via pip:


.. code-block:: bash
# normal install
python -m pip install --upgrade git+https://github.com/bitranox/rst_include.git
# to test without installing (can be skipped)
python -m pip install git+https://github.com/bitranox/rst_include.git --install-option test
# to install and upgrade all dependencies regardless of version number
python -m pip install --upgrade git+https://github.com/bitranox/rst_include.git --upgrade-strategy eager
- include it into Your requirements.txt:

Expand All @@ -417,19 +405,13 @@ Installation and Upgrade
python -m pip install --upgrade -r /<path>/requirements.txt
- to install the latest development version from source code:

.. code-block:: bash
# cd ~
$ git clone https://github.com/bitranox/rst_include.git
$ cd rst_include
# to test without installing (can be skipped)
python setup.py test
# normal install
python setup.py install
- via makefile:
Expand Down Expand Up @@ -492,6 +474,14 @@ Changelog
- new MINOR version for added functionality in a backwards compatible manner
- new PATCH version for backwards compatible bug fixes

v2.1.0
--------
2020-08-08: service release
- fix documentation
- fix travis
- deprecate pycodestyle
- implement flake8

v2.0.9
---------
2020-08-07: implement flake8 - transitional
Expand Down
15 changes: 3 additions & 12 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import platform
from typing import List

collect_ignore = ['setup.py']
collect_ignore: List[str] = []


def pytest_cmdline_preparse(args: List[str]) -> None:
Expand All @@ -16,13 +15,5 @@ def pytest_cmdline_preparse(args: List[str]) -> None:
args[:] = ["-n", str(num)] + args
"""

additional_mypy_args: List[str] = list()
additional_pycodestyle_args: List[str] = list()

# add mypy option if not pypy
# if platform.python_implementation() != "PyPy" and sys.version_info >= (3, 5) and sys.version_info != (3, 6): # type: ignore
if platform.python_implementation() != "PyPy":
additional_mypy_args = ['--mypy']

additional_pycodestyle_args = ['--pycodestyle']
args[:] = list(set(args + additional_mypy_args + additional_pycodestyle_args))
additional_pytest_args: List[str] = []
args[:] = list(set(args + additional_pytest_args))
7 changes: 0 additions & 7 deletions mypy.ini

This file was deleted.

18 changes: 0 additions & 18 deletions pytest.ini

This file was deleted.

9 changes: 4 additions & 5 deletions requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
## "setup.py install test" or "pip install <package> --install-option test"
black ; platform_python_implementation != "PyPy"
black==19.3b0 ; platform_python_implementation == "PyPy"
codecov
coloredlogs
coverage
flake8
mypy ; platform_python_implementation != "PyPy"
pycodestyle
pytest-mypy ; platform_python_implementation != "PyPy" and python_version >= "3.5"
pytest-pycodestyle ; python_version >= "3.5"
pytest-runner
pytest==5.4
pytest
pytest-cov
Loading

0 comments on commit a458717

Please sign in to comment.