From 30d876c7d8ac7867b8efae7f70f66a460c0a7d25 Mon Sep 17 00:00:00 2001 From: bitranox Date: Wed, 29 Jul 2020 23:30:07 +0200 Subject: [PATCH 1/2] refractor --- .docs/README_template.rst | 2 +- CHANGES.rst | 6 ++++++ README.rst | 8 +++++++- lib_platform/__init__conf__.py | 4 ++-- setup.py | 2 +- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.docs/README_template.rst b/.docs/README_template.rst index 3249c49..8908ceb 100644 --- a/.docs/README_template.rst +++ b/.docs/README_template.rst @@ -1,4 +1,4 @@ -Version 1.2.3 as of 2020-07-29, see changelog_ +Version 1.2.4a0 as of 2020-07-29, see changelog_ ======================================================= diff --git a/CHANGES.rst b/CHANGES.rst index cf3c68e..c9dd32c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,12 @@ Changelog - new MINOR version for added functionality in a backwards compatible manner - new PATCH version for backwards compatible bug fixes + +1.2.4a0 +------- +2020-07-29: development + + 1.2.3 ----- 2020-07-29: feature release diff --git a/README.rst b/README.rst index 5cc8903..7d416a9 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -Version 1.2.3 as of 2020-07-29, see changelog_ +Version 1.2.4a0 as of 2020-07-29, see changelog_ ======================================================= @@ -270,6 +270,12 @@ Changelog - new MINOR version for added functionality in a backwards compatible manner - new PATCH version for backwards compatible bug fixes + +1.2.4a0 +------- +2020-07-29: development + + 1.2.3 ----- 2020-07-29: feature release diff --git a/lib_platform/__init__conf__.py b/lib_platform/__init__conf__.py index df52c45..63b60be 100644 --- a/lib_platform/__init__conf__.py +++ b/lib_platform/__init__conf__.py @@ -1,6 +1,6 @@ name = 'lib_platform' title = 'some platform related functions, which also work correctly on wine' -version = '1.2.3' +version = '1.2.4a0' url = 'https://github.com/bitranox/lib_platform' author = 'Robert Nowotny' author_email = 'bitranox@gmail.com' @@ -14,7 +14,7 @@ def print_info() -> None: some platform related functions, which also work correctly on wine - Version : 1.2.3 + Version : 1.2.4a0 Url : https://github.com/bitranox/lib_platform Author : Robert Nowotny Email : bitranox@gmail.com""") diff --git a/setup.py b/setup.py index e330e47..b6900e7 100644 --- a/setup.py +++ b/setup.py @@ -83,7 +83,7 @@ def get_line_data(line: str) -> str: setup_kwargs: Dict[str, Any] = dict() setup_kwargs['name'] = 'lib_platform' -setup_kwargs['version'] = '1.2.3' +setup_kwargs['version'] = '1.2.4a0' setup_kwargs['url'] = 'https://github.com/bitranox/lib_platform' setup_kwargs['packages'] = find_packages() setup_kwargs['package_data'] = {'lib_platform': ['py.typed', '*.pyi', '__init__.pyi']} From 4334ad48670b991a2ca8118cadf25e3f4a631c29 Mon Sep 17 00:00:00 2001 From: bitranox Date: Fri, 31 Jul 2020 08:48:16 +0200 Subject: [PATCH 2/2] refractor --- .docs/README_template.rst | 2 +- .travis.yml | 10 ++++----- CHANGES.rst | 35 ++++++++++++++++---------------- README.rst | 37 +++++++++++++++++----------------- lib_platform/__init__conf__.py | 4 ++-- setup.py | 27 +++++++++++++++---------- 6 files changed, 59 insertions(+), 56 deletions(-) diff --git a/.docs/README_template.rst b/.docs/README_template.rst index 8908ceb..381f815 100644 --- a/.docs/README_template.rst +++ b/.docs/README_template.rst @@ -1,4 +1,4 @@ -Version 1.2.4a0 as of 2020-07-29, see changelog_ +Version v1.2.4 as of 2020-07-31, see changelog_ ======================================================= diff --git a/.travis.yml b/.travis.yml index 0600498..ebccdae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ env: # package name - PACKAGE_NAME="lib_platform" # the registered CLI Command - - CLI_COMMAND=lib_platform + - CLI_COMMAND="lib_platform" # 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) @@ -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" @@ -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" @@ -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" @@ -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" diff --git a/CHANGES.rst b/CHANGES.rst index c9dd32c..8c36b30 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,45 +6,44 @@ Changelog - new PATCH version for backwards compatible bug fixes -1.2.4a0 -------- -2020-07-29: development +v1.2.4 +-------- +2020-07-31: fix travis build - -1.2.3 ------ +v1.2.3 +-------- 2020-07-29: feature release - use the new pizzacutter template - use cli_exit_tools -1.2.2 ------ +v1.2.2 +-------- 2020-07-16: feature release - fix cli test - enable traceback option on cli errors -1.2.1 ------ +v1.2.1 +-------- 2020-07-14 : patch release - make it compatible with latest lib_registry -1.2.0 ------ +v1.2.0 +-------- 2020-07-07 : service release - new click cli - use PizzaCutter Template - added jupyter notebook - dropped python2.7 - python3.5 support -1.0.3 ------ +v1.0.3 +-------- 2019-06-14: add is_user_admin (check for administration rights) -1.0.2 ------ +v1.0.2 +-------- 2019-04-28: Documentation Update, minor Fixes in setup.py -1.0.0 ------ +v1.0.0 +-------- 2019-03-28: Initial public release, PyPi Release diff --git a/README.rst b/README.rst index 7d416a9..d51bf5b 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -Version 1.2.4a0 as of 2020-07-29, see changelog_ +Version v1.2.4 as of 2020-07-31, see changelog_ ======================================================= @@ -271,46 +271,45 @@ Changelog - new PATCH version for backwards compatible bug fixes -1.2.4a0 -------- -2020-07-29: development - +v1.2.4 +-------- +2020-07-31: fix travis build -1.2.3 ------ +v1.2.3 +-------- 2020-07-29: feature release - use the new pizzacutter template - use cli_exit_tools -1.2.2 ------ +v1.2.2 +-------- 2020-07-16: feature release - fix cli test - enable traceback option on cli errors -1.2.1 ------ +v1.2.1 +-------- 2020-07-14 : patch release - make it compatible with latest lib_registry -1.2.0 ------ +v1.2.0 +-------- 2020-07-07 : service release - new click cli - use PizzaCutter Template - added jupyter notebook - dropped python2.7 - python3.5 support -1.0.3 ------ +v1.0.3 +-------- 2019-06-14: add is_user_admin (check for administration rights) -1.0.2 ------ +v1.0.2 +-------- 2019-04-28: Documentation Update, minor Fixes in setup.py -1.0.0 ------ +v1.0.0 +-------- 2019-03-28: Initial public release, PyPi Release diff --git a/lib_platform/__init__conf__.py b/lib_platform/__init__conf__.py index 63b60be..8895a42 100644 --- a/lib_platform/__init__conf__.py +++ b/lib_platform/__init__conf__.py @@ -1,6 +1,6 @@ name = 'lib_platform' title = 'some platform related functions, which also work correctly on wine' -version = '1.2.4a0' +version = 'v1.2.4' url = 'https://github.com/bitranox/lib_platform' author = 'Robert Nowotny' author_email = 'bitranox@gmail.com' @@ -14,7 +14,7 @@ def print_info() -> None: some platform related functions, which also work correctly on wine - Version : 1.2.4a0 + Version : v1.2.4 Url : https://github.com/bitranox/lib_platform Author : Robert Nowotny Email : bitranox@gmail.com""") diff --git a/setup.py b/setup.py index b6900e7..ffff74c 100644 --- a/setup.py +++ b/setup.py @@ -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 @@ -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 @@ -83,7 +88,7 @@ def get_line_data(line: str) -> str: setup_kwargs: Dict[str, Any] = dict() setup_kwargs['name'] = 'lib_platform' -setup_kwargs['version'] = '1.2.4a0' +setup_kwargs['version'] = 'v1.2.4' setup_kwargs['url'] = 'https://github.com/bitranox/lib_platform' setup_kwargs['packages'] = find_packages() setup_kwargs['package_data'] = {'lib_platform': ['py.typed', '*.pyi', '__init__.pyi']}