From 518bd8448411ec2ca4617aca6c07d5af4691e644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?NaveenKumar=20Namachivayam=20=E2=9A=A1?= Date: Thu, 23 Nov 2023 10:49:44 -0500 Subject: [PATCH] Test: Setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: NaveenKumar Namachivayam ⚡ --- .github/workflows/release-workflow.yml | 18 ++++------ windows/config.py | 4 +-- windows/config.py~ | 50 ++++++++++++++++++++++++++ windows/setup.py | 4 +-- 4 files changed, 60 insertions(+), 16 deletions(-) create mode 100644 windows/config.py~ diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index ea9e44c..a5772ec 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -36,13 +36,6 @@ jobs: with: python-version: "3.10.11" - - name: Test Python version - run: | - python --version - python -m pip --version - dir .\windows\ - - # - uses: actions/checkout@v3 # - name: Set up Python 3.10.11 # uses: actions/setup-python@v3 @@ -54,11 +47,12 @@ jobs: python -m pip install --upgrade pip pip install -r .\windows\requirements.txt -# - name: Install dependencies -# run: | -# python -m pip install --upgrade pip -# pip install py2app -# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install py2app + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if: matrix.os == 'macos' || matrix.os == 'self-hosted' - name: Generate app for intel architecture run: | diff --git a/windows/config.py b/windows/config.py index c25bdab..cccd249 100644 --- a/windows/config.py +++ b/windows/config.py @@ -2,7 +2,7 @@ from collections import OrderedDict from pathlib import Path -from windows import __VERSION__ +# from windows import __VERSION__ class AppConfig: @@ -17,7 +17,7 @@ def __init__(self): self.menu_items_dict = OrderedDict() self.jmeter_recent_files_pattern = re.compile("recent_file_.*") - self.app_version = __VERSION__ + self.app_version = "0.0.1" self.buy_me_a_coffee_url = 'https://www.buymeacoffee.com/QAInsights' self.authors = ['NaveenKumar Namachivayam', 'Leela Prasad Vadla'] self.about_website = 'https://QAInsights.com' diff --git a/windows/config.py~ b/windows/config.py~ new file mode 100644 index 0000000..c25bdab --- /dev/null +++ b/windows/config.py~ @@ -0,0 +1,50 @@ +import re + +from collections import OrderedDict +from pathlib import Path +from windows import __VERSION__ + + +class AppConfig: + def __init__(self): + self.app_title = 'Hamster' + self.app_title_emoji = f'🐹 {self.app_title}' + self.app_caption = 'Instantly Launch JMeter Test Plans' + self.app_caption_emoji = f'{self.app_caption} 🚀' + self.app_properties_template = "hamster_app.properties" + self.win_app_properties = self.app_properties_template.replace(".properties", ".ini") + self.home_dir = Path.home() + self.menu_items_dict = OrderedDict() + + self.jmeter_recent_files_pattern = re.compile("recent_file_.*") + self.app_version = __VERSION__ + self.buy_me_a_coffee_url = 'https://www.buymeacoffee.com/QAInsights' + self.authors = ['NaveenKumar Namachivayam', 'Leela Prasad Vadla'] + self.about_website = 'https://QAInsights.com' + + @property + def authors_str(self): + return '\n'.join(self.authors) + + @property + def about_text(self): + return f'''{self.app_title_emoji} - {self.app_caption_emoji}\n\n +Authors:\n{self.authors_str}\n\n{self.about_website} + ''' + + @property + def help_text(self): + return ''' +Hamster is a menu bar app to instantly launch JMeter test plans.\n\n +1. Configure `JMETER_HOME` by launching `Hamster > Edit JMETER_HOME`\n +2. To launch JMeter, click on `Hamster > Launch JMeter`\n +3. To launch JMeter test plans, click on `Hamster > Recent Test Plans > select the test plan`.\n +4. To view the configuration, click on `Hamster > View Config`\n +5. To restart Hamster, click on `Hamster > Refresh`\n +6. To know more about Hamster, click on `Hamster > About`\n +7. To refresh the recent test plans, click on `Hamster > Restart`\n +8. To quit Hamster, click on `Hamster > Quit`\n + ''' + + +app_config = AppConfig() diff --git a/windows/setup.py b/windows/setup.py index 2204cfd..2ad2aff 100644 --- a/windows/setup.py +++ b/windows/setup.py @@ -1,6 +1,6 @@ import sys from cx_Freeze import setup, Executable -from ..windows import __VERSION__ +# from windows import __VERSION__ build_exe_options = { "include_files": [".\\img\\hamster.png", @@ -15,7 +15,7 @@ setup( name="Hamster", - version=__VERSION__, + version="0.0.1", description="Instantly Launch JMeter Test Plans 🚀", options={"build_exe": build_exe_options}, executables=[