Skip to content

Commit

Permalink
Merge pull request #8 from bitranox/development
Browse files Browse the repository at this point in the history
v2.0.7
  • Loading branch information
bitranox authored Jul 31, 2020
2 parents 4bd9b42 + 3bc7793 commit aa86fa3
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .docs/README_template.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version 2.0.5 as of 2020-07-29, see changelog_
Version v2.0.7 as of 2020-07-31, see changelog_

=======================================================

Expand Down
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
# package name
- PACKAGE_NAME="rst_include"
# the registered CLI Command
- CLI_COMMAND=rst_include
- CLI_COMMAND="rst_include"
# the source file for rst_include (rebuild rst file includes)
- RST_INCLUDE_SOURCE="./.docs/README_template.rst"
# the target file for rst_include (rebuild rst file includes)
Expand Down Expand Up @@ -63,7 +63,7 @@ matrix:
before_install:
- export MYPY_STRICT="True"
- export BUILD_DOCS="False"
- export DEPLOY_CHECK="False"
- export DEPLOY_CHECK="True"
- export DEPLOY="False"


Expand All @@ -73,7 +73,7 @@ matrix:
before_install:
- export MYPY_STRICT="True"
- export BUILD_DOCS="False"
- export DEPLOY_CHECK="False"
- export DEPLOY_CHECK="True"
- export DEPLOY="False"


Expand All @@ -93,7 +93,7 @@ matrix:
before_install:
- export MYPY_STRICT="True"
- export BUILD_DOCS="False"
- export DEPLOY_CHECK="False"
- export DEPLOY_CHECK="True"
- export DEPLOY="False"


Expand All @@ -103,7 +103,7 @@ matrix:
before_install:
- export MYPY_STRICT="False"
- export BUILD_DOCS="False"
- export DEPLOY_CHECK="False"
- export DEPLOY_CHECK="True"
- export DEPLOY="False"


Expand Down
73 changes: 39 additions & 34 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,71 +5,76 @@ Changelog
- new MINOR version for added functionality in a backwards compatible manner
- new PATCH version for backwards compatible bug fixes

v2.0.7
---------
2020-07-31: fix travis build

2.0.5
-------
v2.0.6
---------
2020-07-31: fix environ.pop issue in doctest

v2.0.5
---------
2020-07-29: feature release
- use the new pizzacutter template
- use cli_exit_tools

2.0.4
-----
v2.0.4
---------
2020-07-23: patch release
- adopt lib_log_utils 0.3.0

2.0.3
-----
v2.0.3
---------
2020-07-16: feature release
- fix cli test
- enable traceback option on cli errors

2.0.2
-----
v2.0.2
---------
2020-07-16: patch release
- fix cli test
- enable traceback option on cli errors

2.0.1
-----
v2.0.1
---------
2020-07-05 : patch release
- fix typos
- manage project with PizzaCutter
- restructured cli entry points

2.0.0
-----
v2.0.0
---------
2020-06-19

- new CLI Interface
- avoid recursive imports
- manage the project with lib_travis_template


1.0.9
-----
- drop support for configfiles
- update documentation
- implement --version on commandline
- test commandline registration
- strict mypy typechecking
- new CLI Interface
- avoid recursive imports
- manage the project with lib_travis_template

v1.0.9
---------
- drop support for configfiles
- update documentation
- implement --version on commandline
- test commandline registration
- strict mypy typechecking

1.0.8
-----
- drop python 2.7 / 3.4 support
- implement --inplace option
- implement --quiet option
- implement multiline string replacement
- extend documentation
---------
- drop python 2.7 / 3.4 support
- implement --inplace option
- implement --quiet option
- implement multiline string replacement
- extend documentation


1.0.2
-----
---------
2019-04-28: fix import errors

1.0.1
-----
---------
2019-04-28: add empty line at the end of the assembled documentation, to be able to add CHANGES.rst with setup.py

1.0.0
-----
---------
2019-04-19: Initial public release, PyPi Release
75 changes: 40 additions & 35 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version 2.0.5 as of 2020-07-29, see changelog_
Version v2.0.7 as of 2020-07-31, see changelog_

=======================================================

Expand Down Expand Up @@ -493,72 +493,77 @@ Changelog
- new MINOR version for added functionality in a backwards compatible manner
- new PATCH version for backwards compatible bug fixes

v2.0.7
---------
2020-07-31: fix travis build

2.0.5
-------
v2.0.6
---------
2020-07-31: fix environ.pop issue in doctest

v2.0.5
---------
2020-07-29: feature release
- use the new pizzacutter template
- use cli_exit_tools

2.0.4
-----
v2.0.4
---------
2020-07-23: patch release
- adopt lib_log_utils 0.3.0

2.0.3
-----
v2.0.3
---------
2020-07-16: feature release
- fix cli test
- enable traceback option on cli errors

2.0.2
-----
v2.0.2
---------
2020-07-16: patch release
- fix cli test
- enable traceback option on cli errors

2.0.1
-----
v2.0.1
---------
2020-07-05 : patch release
- fix typos
- manage project with PizzaCutter
- restructured cli entry points

2.0.0
-----
v2.0.0
---------
2020-06-19

- new CLI Interface
- avoid recursive imports
- manage the project with lib_travis_template


1.0.9
-----
- drop support for configfiles
- update documentation
- implement --version on commandline
- test commandline registration
- strict mypy typechecking
- new CLI Interface
- avoid recursive imports
- manage the project with lib_travis_template

v1.0.9
---------
- drop support for configfiles
- update documentation
- implement --version on commandline
- test commandline registration
- strict mypy typechecking

1.0.8
-----
- drop python 2.7 / 3.4 support
- implement --inplace option
- implement --quiet option
- implement multiline string replacement
- extend documentation
---------
- drop python 2.7 / 3.4 support
- implement --inplace option
- implement --quiet option
- implement multiline string replacement
- extend documentation


1.0.2
-----
---------
2019-04-28: fix import errors

1.0.1
-----
---------
2019-04-28: add empty line at the end of the assembled documentation, to be able to add CHANGES.rst with setup.py

1.0.0
-----
---------
2019-04-19: Initial public release, PyPi Release

22 changes: 22 additions & 0 deletions rst_include/3rd_party_stubs/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
put 3rd party stubs in this directory needed to pass mypy on travis.

in the travis.yml the MYPYPATH is set to this directory.

for local testing, put the *.pyi Files into another central directory and set the mypy path accordingly.
the reason for that is, that a certain *.pyi have to be only found once by mypy, otherwise it will throw an error.

lets say, we have an external module "external_test" and we created an "external_test.pyi" stub file.

the module "external_test" is used in project_a, and project_b, and package_a imports package_b


-- projects -- stub_directory -- external_test.pyi
|
-- project_A ------- package_a_dir --- 3rd_party_stubs --- external_test.pyi
|
-- project_B ------- package_b_dir --- 3rd_party_stubs --- external_test.pyi


for travis test of project_A we need to set the MYPYPATH to .../projects/project_A/package_a_dir/3rd_party_stubs

for local tests, we need to set the MYPYPATH to .../projects/stub_directory , not to find external_test.pyi twice.
4 changes: 2 additions & 2 deletions rst_include/__init__conf__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = 'rst_include'
title = 'commandline tool to resolve RST File includes'
version = '2.0.5'
version = 'v2.0.7'
url = 'https://github.com/bitranox/rst_include'
author = 'Robert Nowotny'
author_email = '[email protected]'
Expand All @@ -14,7 +14,7 @@ def print_info() -> None:
commandline tool to resolve RST File includes
Version : 2.0.5
Version : v2.0.7
Url : https://github.com/bitranox/rst_include
Author : Robert Nowotny
Email : [email protected]""")
27 changes: 16 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@


def is_travis_deploy() -> bool:
if 'travis_deploy' in os.environ:
if os.environ['travis_deploy'] == 'True':
return True
return False
if 'DEPLOY' not in os.environ:
return False
if os.environ['DEPLOY'].lower() == 'true' and is_tagged_commit():
return True
else:
return False


def is_tagged_commit() -> bool:
if 'TRAVIS_TAG' in os.environ:
if os.environ['TRAVIS_TAG'] != '':
if os.environ['TRAVIS_TAG']:
return True
return False

Expand Down Expand Up @@ -56,11 +58,14 @@ def get_requirements_from_file(requirements_filename: str) -> List[str]:
>>> assert len(get_requirements_from_file('requirements.txt')) > 0
"""
l_requirements = list()
with open(str(pathlib.Path(__file__).parent / requirements_filename), mode='r') as requirements_file:
for line in requirements_file:
line_data = get_line_data(line)
if line_data:
l_requirements.append(line_data)
try:
with open(str(pathlib.Path(__file__).parent / requirements_filename), mode='r') as requirements_file:
for line in requirements_file:
line_data = get_line_data(line)
if line_data:
l_requirements.append(line_data)
except FileNotFoundError:
pass
return l_requirements


Expand All @@ -83,7 +88,7 @@ def get_line_data(line: str) -> str:

setup_kwargs: Dict[str, Any] = dict()
setup_kwargs['name'] = 'rst_include'
setup_kwargs['version'] = '2.0.5'
setup_kwargs['version'] = 'v2.0.7'
setup_kwargs['url'] = 'https://github.com/bitranox/rst_include'
setup_kwargs['packages'] = find_packages()
setup_kwargs['package_data'] = {'rst_include': ['py.typed', '*.pyi', '__init__.pyi']}
Expand Down

0 comments on commit aa86fa3

Please sign in to comment.