From 5e59c9dfc35931c669bdd7ca5318f43e0aa66fa2 Mon Sep 17 00:00:00 2001 From: "Alan@int3ll3ct" Date: Wed, 19 Apr 2017 20:17:55 -0400 Subject: [PATCH 1/9] Added 'connecting' state to hardware connection logic. --- openroast/views/roasttab.py | 19 ++++++++++++++++++- setup.py | 4 ++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/openroast/views/roasttab.py b/openroast/views/roasttab.py index 4850b35..7683062 100644 --- a/openroast/views/roasttab.py +++ b/openroast/views/roasttab.py @@ -20,6 +20,11 @@ def __init__(self, roaster, recipes): self.sectTimeSliderPressed = False self.tempSliderPressed = False + # Use a blinker for connect_state == CS_CONNECTING... + self._connecting_blinker = True + self.CONNECT_TXT_PLEASE_CONNECT = "Please connect your roaster." + self.CONNECT_TXT_CONNECTING = "Found roaster, connecting. This could take >20 seconds " + # process-safe flag to schedule controller vars update from recipe obj self._flag_update_controllers = sharedctypes.Value('i', 0) @@ -65,7 +70,7 @@ def create_ui(self): self.layout.addLayout(self.progressBar, 1, 0, 1, 2, QtCore.Qt.AlignCenter) # Create not connected label. - self.connectionStatusLabel = QtWidgets.QLabel("Please connect your roaster.") + self.connectionStatusLabel = QtWidgets.QLabel(self.CONNECT_TXT_PLEASE_CONNECT) self.connectionStatusLabel.setObjectName("connectionStatus") self.connectionStatusLabel.setAlignment(QtCore.Qt.AlignCenter) self.layout.addWidget(self.connectionStatusLabel, 0, 0) @@ -110,6 +115,18 @@ def update_data(self): self.connectionStatusLabel.setHidden(True) self.setEnabled(True) else: + if self.roaster.connect_state == self.roaster.CS_CONNECTING: + # this means that the roaster has just been plugged in + # sometimes, it takes a while to complete the connection... + connecting_str = self.CONNECT_TXT_CONNECTING + if self._connecting_blinker: + connecting_str += " ... " + else: + connecting_str += " ..." + self._connecting_blinker = not self._connecting_blinker + self.connectionStatusLabel.setText(connecting_str) + else: + self.connectionStatusLabel.setText(self.CONNECT_TXT_PLEASE_CONNECT) self.connectionStatusLabel.setHidden(False) self.setEnabled(False) diff --git a/setup.py b/setup.py index f3c054f..9dd391c 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ def package_files(directory): long_description=long_description, # The project's main homepage. - url='https://github.com/Roastero/openroast', + url='https://github.com/Roastero/Openroast', # Author details author='Roastero', @@ -65,7 +65,7 @@ def package_files(directory): # 3 - Alpha # 4 - Beta # 5 - Production/Stable - 'Development Status :: 3 - Alpha', + 'Development Status :: 5 - Production/Stable', # Indicate who your project is intended for 'Intended Audience :: Developers', From 833e4f80cdd6e59430fcff9c4a261dbdc3116290 Mon Sep 17 00:00:00 2001 From: "Alan@int3ll3ct" Date: Wed, 19 Apr 2017 20:22:34 -0400 Subject: [PATCH 2/9] Updating app requirements to freshroastsr700 v0.2.2. --- PreparingADisti.txt | 120 ------------------------------------- build-app-requirements.txt | 2 +- 2 files changed, 1 insertion(+), 121 deletions(-) delete mode 100644 PreparingADisti.txt diff --git a/PreparingADisti.txt b/PreparingADisti.txt deleted file mode 100644 index eb150e2..0000000 --- a/PreparingADisti.txt +++ /dev/null @@ -1,120 +0,0 @@ -Preparing an Openroast distribution ------------------------------------ -If you are reading this, you have likely found the Openroast project at http://github.com/Roastero/Openroast. As such, it is likely that you have some developer knowledge. It is assumed that readers are familiar with python, git, PowerShell, and bash scripts. If not, this how-to document will be of limited usefulness to you. - -This document describes the steps that a developer must execute to successfully create a distributable Openroast application package for certain Windows and Mac OS operating systems. - -You will find Windows and Mac installer creation instructions in the sections below. - -General Good-to-knows ---------------------- -- As of Openroast 1.2, python 3.5 is the required version of python to build and run Openroast. This is because PyQt5, which is a python GUI application toolkit (specifically, a python wrapping over the Qt5 multi-platform GUI toolkit), is significantly easier to deal with in Python 3.5+. - -Building the Openroast app - Windows 10 - 64 bit -================================================ - -(The following instructions were developed for a fresh Windows 10 Pro install running in a Virtualbox VM with Ubuntu 14.04 as the host OS.) - -It is assumed that the operations herein are being performed on a fresh install of Windows 10. A fresh install will not have any of the dependencies required to build Openroast. These instructions, and the associated tools that are downloaded during the process, will guide the developer from a Win10 fresh install state, to a Win10 64-bit version of Openroast ready to distribute. - -Starting from nothing - Setting up the development environment --------------------------------------------------------------- -If you do not have git set up, you can get all necessary build tools set up by downloading a single file from the Openroast github project, namely, the build_win.ps1 file. - -Alternately, if you already have git installed, you should clone the Openroast project into the folder of your choice, and go directly to step 3 in the instructions below. - -1. Download build_win.ps1. -2. Place it in a folder in which you intend to create all the necessary project folders for this project. (In a later step, the script will eventually fetch the files and place them under the folder [YourCurrentPath]\Roastero\Openroast.) -3. Start a PowerShell command prompt. You need to launch PowerShell with the "Run as Administrator" option. One way to do this is to type PowerShell in the search bar, then right-click on the PowerShell app icon that appears, and select "Run as Administrator". -4. We must set up elevated privileges to run the scripts in this PowerShell window. The easiest way to achieve this is to enter the command `Set-ExecutionPolicy RemoteSigned`. This allows local scripts to run unsigned. -5. In the PowerShell window, cd to where you've placed the build_win.ps1 script. (If you've cloned the Openroast project already, the file is in the project root folder.) -6. Type `build_win.ps1 -tool_install -python_build_tool_install` and press Enter. The following things will happen: -a. Download python 3.5 for Windows, git, and NSIS. (Note that the git installer insists on re-installing git. If this is something you want to avoid, you should modify build_win.ps1 to not download nor install git.) -b. Install python 3.5 for Windows, git, and NSIS -c. Install a couple of python-based tools. Note that if this fails (probably because you've just installed python 3.5), you may need to close the PowerShell window and open a new one, and re-invoke the script with `build_win.ps1 -python_build_tool_install`. -7. You are now in a position to fetch the source code from github. - -Getting the source code ------------------------ -If you have already cloned the branch of interest (almost always master...) from http://github.com/Roastero/Openroast, you can skip this section. - -Assuming you have a PowerShell window opened to the directory of interest as directed in the previous steps, you're ready to fetch the code from github. - -1. At the Power Shell prompt, type `build_win.ps1 -git_fetch` and press Enter. You are now fetching the head of the master branch. (To fetch a different branch, type 'build_win.ps1 -branch_name -git_fetch` instead, where is te name of the branch you want to fetch.) -2. You now have the code locally. You'll want to cd into Roastero/Openroast and continue working from there. - -Incrementing the version number -------------------------------- -In some instances, you may want to increment some part of the version number. The bumpversion utility is used to perform version number incrementing. Since a release will typically involve multiple platforms (Windows, Mac OS, Linux source install...), it is recommended that the maintainer learn to use the bumpversion utility before starting to create installer builds, outside of the build script process. - -This part of the script does not currently work, as bumpversion does not execute properly from PowerShell in Windows. Tagging and versioning is operated from Linux at the moment, and the Windows build cannot successfully change the version string and tag the source. - -Creating a Windows Installer ----------------------------- -Assuming you're in PowerShell and currently in the `[YourWhateverFolderPath]\Roastero\Openroast` directory, you can create an installer build by typing `build_win.ps1 -make_installer` and pressing Enter. The EXE-based installer will be created in the folder [YourWhateverFolderPath]\Roastero\Openroast\build\nsis. You'll want to test this installer on a separate Windows machine to verify functionality. - -Posting the installer on Github -------------------------------- -At this point, you have an installer EXE that you believe is functional and ready for distribution. - -Github currently makes it easy to create a release and attach installer files to the release. With proper use of bumpversion, tags are created in the source repository and are visible in the releases tab on the Openroast github site. Release notes and files can be attached to a particular commit tag. See existing release notes and attachments for guidance on creating a new release. - -Typically, a ZIP of the EXE installer is attached to the release and users can download the installer from there. - -Building the Openroast app - Mac OS X 10.10.5 -============================================= - -(The build script and following instructions were developed on a Macbook Pro 2.4 GHz Intel Core 2 Duo (circa 2011) running OS X 10.10.5 Yosemite.) - -It is assumed that the operations herein are being performed on a Macbook that has no developer tools installed. These instructions, and the associated tools that are downloaded during the process, will guide the developer through the process of generating a distributable Mac app. - -Starting from nothing - Setting up the development environment --------------------------------------------------------------- -If you do not have homebrew or git set up, you can get all necessary build tools set up by downloading a single file from the Openroast github project, namely, the build_mac.sh file. - -Alternately, if you already have homebrew and git installed, you should clone the Openroast project into the folder of your choice, and go directly to step 3 in the instructions below. - -Note that you need to be an admin user on your Mac in order to successfully build Openroast. - -1. Download build_mac.sh. -2. Place it in a folder in which you intend to create all the necessary project folders for this project. (In a later step, the script will eventually fetch the files and place them in the folder `[YourCurrentPath]/Roastero/Openroast`.) -3. Start Terminal. (Don't know where that app is? You'll find it under Applications/Utilities.) -4. In the Terminal window, cd to where you've placed the build_mac.sh script. (If you've cloned the Openroast project already, the file is in the project root folder.) -6. Type `./build_mac.sh` and press Enter. The following things will happen: -a. Download & install/update homebrew, pyenv, and python 3.5.3. -b. A warning will appear with regards to pyenv. Please read the warning and follow the instructions provided by the warning. pyenv needs certain environment variables set up at Terminal launch time, and the warning tells you how to do this. -7. Enter `./build_mac.sh -n -p`. This will install Openroast app python package requirements and python build tools required to make the installer. -8. You are now in a position to fetch the source code from github (if you haven't done so already). - -Getting the source code ------------------------ -If you have already cloned the branch of interest (almost always master...) from http://github.com/Roastero/Openroast, you can skip this section. - -Assuming you have a Terminal window opened to the directory of interest as directed in the previous steps, you're ready to fetch the code from github. - -1. At the Terminal prompt, type `./build_mac.sh -n -f` and press Enter. You are now fetching the head of the master branch. (To fetch a different branch, type './build_mac.sh -n -b -f` instead, where is the name of the branch you want to fetch.) -2. You now have the code locally. You'll want to cd into Roastero/Openroast and continue working from there. - -Incrementing the version number -------------------------------- -This is not a mandatory step. - -In some instances, you may want to increment some part of the version number. The bumpversion utility is used to perform version number incrementing. Since a release will typically involve multiple platforms (Windows, Mac OS, Linux source install...), it is recommended that the maintainer learn to use the bumpversion utility before starting to create installer builds, outside of the build script process. - -If you want to increment any part of the version number, you can do so by -1. making sure you're in the Openroast root folder in Terminal; -2. typing `./build_mac.sh -n -i `, where is one of major, minor, patch, release, or iter. (Type `build_mac -h` to read the help text for this script to know more.) -3. This will only work if your repository is clean (meaning, all changes have been committed). If that isn't the case, bumpversion will refuse to increment the version number. -4. Once you have executed this successfully, you should `git push --tags origin ` to commit the version tag and associated file changes to the Openroast project master. (If this is unclear to you, you should contact a project maintainer for guidance...) - -Creating a Mac app contained in a DMG -------------------------------------- -Assuming you're in Terminal and currently in the `[YourWhateverFolderPath]\Roastero\Openroast` folder, you can create an app build by typing `./build_mac.sh -n -m` and pressing Enter. A disk image (DMG) containing the app will be created in the folder `[YourWhateverFolderPath]/Roastero/Openroast/dmg`. You'll want to test this app on a separate Mac machine to verify functionality. - -Posting the installer on Github -------------------------------- -At this point, you have an app packaged as a DMG that you believe is functional and ready for distribution. - -Github currently makes it easy to create a release and attach installer files to the release. With proper use of bumpversion, tags are created in the source repository and are visible in the releases tab on the Openroast github site. Release notes and files can be attached to a particular commit tag. See existing release notes and attachments for guidance on creating a new release. - -Typically, the DMG is attached to the release and users can download the DMG from there. diff --git a/build-app-requirements.txt b/build-app-requirements.txt index 41effe4..5769d38 100644 --- a/build-app-requirements.txt +++ b/build-app-requirements.txt @@ -1,3 +1,3 @@ PyQt5>=5.8,<5.9 matplotlib>=2.0,<2.1 -freshroastsr700>=0.2.1 \ No newline at end of file +freshroastsr700>=0.2.2 From 9535b6885e6da6252f533595d34eb7cde33ae6cb Mon Sep 17 00:00:00 2001 From: "Alan@int3ll3ct" Date: Wed, 19 Apr 2017 20:23:24 -0400 Subject: [PATCH 3/9] =?UTF-8?q?Bump=20version:=201.2.0rc3=20=E2=86=92=201.?= =?UTF-8?q?2.0rc4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- openroast/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a7a5bb2..9373023 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.2.0rc3 +current_version = 1.2.0rc4 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?P[a-z]+)(?P\d+))? diff --git a/openroast/version.py b/openroast/version.py index 16965e7..3a6f50f 100644 --- a/openroast/version.py +++ b/openroast/version.py @@ -1,2 +1,2 @@ -__version__ = "1.2.0rc3" +__version__ = "1.2.0rc4" From 19c65b15184ce468e2db44ad846c5b7fca1a0c1d Mon Sep 17 00:00:00 2001 From: int3ll3ct Date: Mon, 22 May 2017 08:52:12 -0700 Subject: [PATCH 4/9] updating to use freshrtoastsr700 v0.2.3. --- build-app-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-app-requirements.txt b/build-app-requirements.txt index 5769d38..77ea70d 100644 --- a/build-app-requirements.txt +++ b/build-app-requirements.txt @@ -1,3 +1,3 @@ PyQt5>=5.8,<5.9 matplotlib>=2.0,<2.1 -freshroastsr700>=0.2.2 +freshroastsr700>=0.2.3 From 2391ff154441f0a3eef67bc8f87101a7941adb1f Mon Sep 17 00:00:00 2001 From: int3ll3ct Date: Mon, 22 May 2017 09:18:04 -0700 Subject: [PATCH 5/9] Incrementing patch version. --- .bumpversion.cfg | 2 +- openroast/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 9373023..7a6c922 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.2.0rc4 +current_version = 1.2.1dev0 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?P[a-z]+)(?P\d+))? diff --git a/openroast/version.py b/openroast/version.py index 3a6f50f..db10aa1 100644 --- a/openroast/version.py +++ b/openroast/version.py @@ -1,2 +1,2 @@ -__version__ = "1.2.0rc4" +__version__ = "1.2.1dev0" From a44bef1899efebeb5286e8ceae8ebb0a557c5603 Mon Sep 17 00:00:00 2001 From: "Alan@int3ll3ct" Date: Mon, 22 May 2017 12:21:00 -0400 Subject: [PATCH 6/9] Modifying build doc, minor edits. --- docs/wiki/developers_building_a_distributable_pkg.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/wiki/developers_building_a_distributable_pkg.md b/docs/wiki/developers_building_a_distributable_pkg.md index 44cd332..a4ac4c1 100644 --- a/docs/wiki/developers_building_a_distributable_pkg.md +++ b/docs/wiki/developers_building_a_distributable_pkg.md @@ -29,7 +29,8 @@ Alternately, if you already have git installed, you should clone the Openroast p 6. Type `build_win.ps1 -tool_install` and press Enter. The following things will happen: 1. installer downloads for python 3.5 for Windows, git, and NSIS. (Note that the git installer insists on re-installing git every time. If this is something you want to avoid, you should modify build_win.ps1 to not download nor install git.) 2. Install python 3.5 for Windows, git, and NSIS -7. You are now in a position to fetch the source code from github, if you haven't done so already. +7. In order for the build script to invoke git, you will need to close the PowerShell prompt and re-start it. +8. You are now in a position to fetch the source code from github, if you haven't done so already. ## 2. Getting the source code From 28a57daa478b5b86ebd603af8296669d8f14c4c9 Mon Sep 17 00:00:00 2001 From: "Alan@int3ll3ct" Date: Mon, 22 May 2017 12:23:48 -0400 Subject: [PATCH 7/9] =?UTF-8?q?Bump=20version:=201.2.1dev0=20=E2=86=92=201?= =?UTF-8?q?.2.1rc0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- openroast/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 7a6c922..bbe6d9d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.2.1dev0 +current_version = 1.2.1rc0 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?P[a-z]+)(?P\d+))? diff --git a/openroast/version.py b/openroast/version.py index db10aa1..b882a12 100644 --- a/openroast/version.py +++ b/openroast/version.py @@ -1,2 +1,2 @@ -__version__ = "1.2.1dev0" +__version__ = "1.2.1rc0" From b4f4f4105dbf97aef4ca5b05f869ed05bf0d8bcc Mon Sep 17 00:00:00 2001 From: Alan Date: Mon, 22 May 2017 13:08:58 -0400 Subject: [PATCH 8/9] modifying Mac build doc to include python tools fetch step. --- docs/wiki/developers_building_a_distributable_pkg.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/wiki/developers_building_a_distributable_pkg.md b/docs/wiki/developers_building_a_distributable_pkg.md index a4ac4c1..4b2c968 100644 --- a/docs/wiki/developers_building_a_distributable_pkg.md +++ b/docs/wiki/developers_building_a_distributable_pkg.md @@ -98,7 +98,13 @@ Assuming you have a Terminal window opened to the directory of interest as direc 1. At the Terminal prompt, type `./build_mac.sh -n -f` and press Enter. You are now fetching the head of the master branch. (To fetch a different branch, type `./build_mac.sh -n -b -f` instead, where `` is the name of the branch you want to fetch.) 2. You now have the code locally. You'll want to `cd Roastero/Openroast` and continue working from there. -## 3. Incrementing the version number +## 3. Getting project dependencies + +1. Type `./build_mac.sh -n -p` and press Enter. The following things will happen: + 1. Install application dependencies. + 2. Install a couple of python-based tools. + +## 4. Incrementing the version number This is not a mandatory step. @@ -110,11 +116,11 @@ If you want to increment any part of the version number, you can do so by 3. This will only work if your repository is clean (meaning, all changes have been committed). If that isn't the case, bumpversion will refuse to increment the version number. 4. Once you have executed this successfully, you should `git push --tags origin ` to commit the version tag and associated file changes to the Openroast project origin. (If this is unclear to you, you should contact a project maintainer for guidance...) -## 4. Creating a Mac app contained in a DMG +## 5. Creating a Mac app contained in a DMG Assuming you're in Terminal and currently in the `[YourWhateverFolderPath]\Roastero\Openroast` folder, you can create an app build by typing `./build_mac.sh -n -m` and pressing Enter. A disk image (DMG) containing the app will be created in the folder `[YourWhateverFolderPath]/Roastero/Openroast/dmg`. You'll want to test this app on a separate Mac machine to verify functionality. -## 5. Posting the installer on Github +## 6. Posting the installer on Github At this point, you have an app packaged as a DMG that you believe is functional and ready for distribution. From b7627b492e7e1afa9136a9e65a311493be9807f7 Mon Sep 17 00:00:00 2001 From: Alan Date: Mon, 22 May 2017 13:10:06 -0400 Subject: [PATCH 9/9] =?UTF-8?q?Bump=20version:=201.2.1rc0=20=E2=86=92=201.?= =?UTF-8?q?2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- openroast/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index bbe6d9d..094cfda 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.2.1rc0 +current_version = 1.2.1 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?P[a-z]+)(?P\d+))? diff --git a/openroast/version.py b/openroast/version.py index b882a12..d8c9955 100644 --- a/openroast/version.py +++ b/openroast/version.py @@ -1,2 +1,2 @@ -__version__ = "1.2.1rc0" +__version__ = "1.2.1"