From bcc3d9621870af75dd050d1572b72b9fab86ed30 Mon Sep 17 00:00:00 2001 From: wblumberg Date: Fri, 13 Sep 2019 15:17:54 -0400 Subject: [PATCH 01/15] Fix in interp.py using ma.log10 for Issue #168 --- sharppy/sharptab/interp.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sharppy/sharptab/interp.py b/sharppy/sharptab/interp.py index f8acb324..4c96dcf3 100644 --- a/sharppy/sharptab/interp.py +++ b/sharppy/sharptab/interp.py @@ -51,7 +51,7 @@ def hght(prof, p): # routine to be in ascending order. Because pressure decreases in the # vertical, we must reverse the order of the two arrays to satisfy # this requirement. - return generic_interp_pres(np.log10(p), prof.logp[::-1], prof.hght[::-1]) + return generic_interp_pres(ma.log10(p), prof.logp[::-1], prof.hght[::-1]) def omeg(prof, p): ''' @@ -73,7 +73,7 @@ def omeg(prof, p): # routine to be in ascending order. Because pressure decreases in the # vertical, we must reverse the order of the two arrays to satisfy # this requirement. - return generic_interp_pres(np.log10(p), prof.logp[::-1], prof.omeg[::-1]) + return generic_interp_pres(ma.log10(p), prof.logp[::-1], prof.omeg[::-1]) def temp(prof, p): ''' @@ -95,7 +95,7 @@ def temp(prof, p): # routine to be in ascending order. Because pressure decreases in the # vertical, we must reverse the order of the two arrays to satisfy # this requirement. - return generic_interp_pres(np.log10(p), prof.logp[::-1], prof.tmpc[::-1]) + return generic_interp_pres(ma.log10(p), prof.logp[::-1], prof.tmpc[::-1]) def thetae(prof, p): ''' @@ -117,7 +117,7 @@ def thetae(prof, p): # routine to be in ascending order. Because pressure decreases in the # vertical, we must reverse the order of the two arrays to satisfy # this requirement. - return generic_interp_pres(np.log10(p), prof.logp[::-1], prof.thetae[::-1]) + return generic_interp_pres(ma.log10(p), prof.logp[::-1], prof.thetae[::-1]) def mixratio(prof, p): ''' @@ -139,7 +139,7 @@ def mixratio(prof, p): # routine to be in ascending order. Because pressure decreases in the # vertical, we must reverse the order of the two arrays to satisfy # this requirement. - return generic_interp_pres(np.log10(p), prof.logp[::-1], prof.wvmr[::-1]) + return generic_interp_pres(ma.log10(p), prof.logp[::-1], prof.wvmr[::-1]) def theta(prof, p): @@ -162,7 +162,7 @@ def theta(prof, p): # routine to be in ascending order. Because pressure decreases in the # vertical, we must reverse the order of the two arrays to satisfy # this requirement. - return generic_interp_pres(np.log10(p), prof.logp[::-1], prof.theta[::-1]) + return generic_interp_pres(ma.log10(p), prof.logp[::-1], prof.theta[::-1]) def wetbulb(prof, p): ''' @@ -184,7 +184,7 @@ def wetbulb(prof, p): # routine to be in ascending order. Because pressure decreases in the # vertical, we must reverse the order of the two arrays to satisfy # this requirement. - return generic_interp_pres(np.log10(p), prof.logp[::-1], prof.wetbulb[::-1]) + return generic_interp_pres(ma.log10(p), prof.logp[::-1], prof.wetbulb[::-1]) def dwpt(prof, p): ''' @@ -207,7 +207,7 @@ def dwpt(prof, p): # routine to be in ascending order. Because pressure decreases in the # vertical, we must reverse the order of the two arrays to satisfy # this requirement. - return generic_interp_pres(np.log10(p), prof.logp[::-1], prof.dwpc[::-1]) + return generic_interp_pres(ma.log10(p), prof.logp[::-1], prof.dwpc[::-1]) def vtmp(prof, p): @@ -227,7 +227,7 @@ def vtmp(prof, p): Virtual tmperature (C) at the given pressure : number, numpy array ''' - return generic_interp_pres(np.log10(p), prof.logp[::-1], prof.vtmp[::-1]) + return generic_interp_pres(ma.log10(p), prof.logp[::-1], prof.vtmp[::-1]) def components(prof, p): @@ -252,8 +252,8 @@ def components(prof, p): # this requirement. if prof.wdir.count() == 0: return ma.masked, ma.masked - U = generic_interp_pres(np.log10(p), prof.logp[::-1], prof.u[::-1]) - V = generic_interp_pres(np.log10(p), prof.logp[::-1], prof.v[::-1]) + U = generic_interp_pres(ma.log10(p), prof.logp[::-1], prof.u[::-1]) + V = generic_interp_pres(ma.log10(p), prof.logp[::-1], prof.v[::-1]) return U, V From ca070123820a13b7d6cb59436f4329c75e01dd5f Mon Sep 17 00:00:00 2001 From: wblumberg Date: Fri, 13 Sep 2019 18:23:26 -0400 Subject: [PATCH 02/15] Updated README to remove extra Numpy --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index a4b70028..41156922 100644 --- a/README.md +++ b/README.md @@ -66,10 +66,9 @@ __Required Python Packages/Libraries:__ Since SHARPpy requires the qtpy and Numpy packages, you will need to install them. If you choose to use the Anaconda distribution, Numpy comes installed by default. qtpy can be installed through the Anaconda package manager that comes with the Anaconda distribution by opening up your command line program (Terminal in Mac OS X/Linux and Command Prompt in Windows) and typing: -* NumPy * qtpy * NumPy v1.15 -* PySide2 +* PySide2 v5.13 * requests * python-dateutil From c6ac43adeb6864ddfa65e3689b9b0c48f83a5d43 Mon Sep 17 00:00:00 2001 From: wblumberg Date: Fri, 13 Sep 2019 18:23:40 -0400 Subject: [PATCH 03/15] Fixed coastlines issue in map --- sharppy/viz/map.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharppy/viz/map.py b/sharppy/viz/map.py index df2c76f9..054b7c8b 100644 --- a/sharppy/viz/map.py +++ b/sharppy/viz/map.py @@ -521,7 +521,7 @@ def drawPolitical(self, qp): if self.transform.mapRect(sp.boundingRect()).intersects(window_rect): qp.drawPath(sp) - qp.setPen(QtGui.QPen(QtCore.Qt.white)) + qp.setPen(QtGui.QPen(QtCore.Qt.white, self.scale)) for cp in self._coast_path: if self.transform.mapRect(cp.boundingRect()).intersects(window_rect): qp.drawPath(cp) From e382bacc2166a34d8dec4cc7f82aad93da9db94d Mon Sep 17 00:00:00 2001 From: wblumberg Date: Fri, 13 Sep 2019 18:23:58 -0400 Subject: [PATCH 04/15] Added extra dummy checks to Profile object --- sharppy/sharptab/profile.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sharppy/sharptab/profile.py b/sharppy/sharptab/profile.py index 7c6c1548..d6ae14f5 100644 --- a/sharppy/sharptab/profile.py +++ b/sharppy/sharptab/profile.py @@ -108,8 +108,11 @@ def __init__(self, **kwargs): self.tmpc = ma.asanyarray(kwargs.get('tmpc'), dtype=float) self.dwpc = ma.asanyarray(kwargs.get('dwpc'), dtype=float) + assert self.pres.ndim == 1 and self.hght.ndim == 1 and self.tmpc.ndim == 1 and self.dwpc.ndim == 1,\ + "The dimensions of the pres, hght, tmpc, and dwpc arrays passed to the Profile object constructor are not all one dimensional." + assert len(self.pres) > 1 and len(self.hght) > 1 and len(self.tmpc) > 1 and len(self.dwpc) > 1,\ - "The length of the data arrays passed to Profile object constructor must all have a length greater than 1." + "The length of the pres, hght, tmpc, and dwpc arrays passed to Profile object constructor must all have a length greater than 1." assert len(self.pres) == len(self.hght) == len(self.tmpc) == len(self.dwpc),\ "The pres, hght, tmpc, or dwpc arrays passed to the Profile object constructor must all have the same length." @@ -121,6 +124,7 @@ def __init__(self, **kwargs): self.wdir = ma.asanyarray(kwargs.get('wdir'), dtype=float) self.wspd = ma.asanyarray(kwargs.get('wspd'), dtype=float) assert len(self.wdir) == len(self.wspd) == len(self.pres), "The wdir and wspd arrays passed to the Profile constructor must have the same length as the pres array." + assert self.wdir.ndim == 1 and self.wspd.ndim == 1, "The wdir and wspd arrays passed to the Profile constructor are not one dimensional." #self.u, self.v = utils.vec2comp(self.wdir, self.wspd) self.u = None self.v = None @@ -130,7 +134,7 @@ def __init__(self, **kwargs): self.u = ma.asanyarray(kwargs.get('u'), dtype=float) self.v = ma.asanyarray(kwargs.get('v'), dtype=float) assert len(self.u) == len(self.v) == len(self.pres), "The u and v arrays passed to the Profile constructor must have the same length as the pres array." - + assert self.u.ndim == 1 and self.v.ndim == 1, "The wdir and wspd arrays passed to the Profile constructor are not one dimensional." #self.wdir, self.wspd = utils.comp2vec(self.u, self.v) self.wdir = None self.wspd = None @@ -149,6 +153,8 @@ def __init__(self, **kwargs): ## get the omega data and turn into arrays self.omeg = ma.asanyarray(kwargs.get('omeg')) assert len(self.omeg) == len(self.pres), "Length of omeg array passed to constructor is not the same length as the pres array." + assert self.omeg.ndim == 1, "omeg array is not one dimensional." + assert len(self.omeg) > 1, "omeg array length must have a length greater than 1." else: self.omeg = None From 27101226cdd67ed5fa851b1212385b8386db62bc Mon Sep 17 00:00:00 2001 From: wblumberg Date: Fri, 13 Sep 2019 18:46:49 -0400 Subject: [PATCH 05/15] Updated docs --- docs/source/index.rst | 2 ++ docs/source/install.rst | 29 +++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index b37c2f76..017f6ce5 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -15,6 +15,8 @@ Welcome to SHARPpy's documentation! :Release: |version| :Date: |today| +FYI: This documentation describes the soon to be released Andover branch of SHARPpy, which are accessible only through cloning the Github repository. + SHARPpy is a collection of open source sounding and hodograph analysis routines, a sounding plotting package, and an interactive, *cross-platform* application for analyzing real-time soundings all written in Python. It was developed to provide the atmospheric science community a free and consistent source of sounding analysis routines. SHARPpy is constantly updated and vetted by professional meteorologists and climatologists within the scientific community to help maintain a standard source of sounding routines. We currently support Python >= 3.6 and will be dropping support for Python 2.7 in summer 2019. diff --git a/docs/source/install.rst b/docs/source/install.rst index 9535888a..9e9f50db 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -65,20 +65,15 @@ install the required packages manually. These instructions assume that you have Since SHARPpy requires the qtpy and Numpy packages, you will need to install them. If you choose to use the Anaconda distribution, Numpy comes installed by default. qtpy can be installed through the Anaconda package manager that comes with the Anaconda distribution by opening up your command line program (Terminal in macOS/Linux and Command Prompt in Windows) and typing: -.. prompt:: bash - - conda install -c conda-forge pyside2 - -* PySide2 +* PySide 2 * requests * python-dateutil -Since SHARPpy requires these packages, you will need to install them. If you choose to use the Anaconda distribution, Numpy comes installed by default. PySide, requests, and python-dateutil can be installed through the Anaconda package manager that comes with the Anaconda distribution by opening up your command line program (Terminal in macOS/Linux and Command Prompt in Windows) and typing: +Since SHARPpy requires these packages, you will need to install them. If you choose to use the Anaconda distribution, Numpy comes installed by default. PySide 2, requests, and python-dateutil can be installed through the Anaconda package manager that comes with the Anaconda distribution by opening up your command line program (Terminal in macOS/Linux and Command Prompt in Windows) and typing: .. prompt:: bash - conda install -c conda-forge requests python-dateutil ->>>>>>> andover + conda install -c conda-forge pyside2=5.12.* requests python-dateutil After installing all the required Python packages for SHARPpy, you now can install the SHARPpy package to your computer. You'll need to download it to your computer first and open up a command line prompt. You can download it as a ZIP file (link on the right) or clone the Git respository (you will need the git program) into a directory on your computer by typing this into your command line: @@ -96,11 +91,29 @@ If you follow the route of cloning SHARPpy, you can update to the most recent SH git pull origin master +Other branches (including development ones not called master) can be listed using the `git branch` command: + +.. prompt:: bash + + git branch + +We tend to name each version of SHARPpy after a famous tornado (e.g., Xenia). Releases will be under the "master" branch, while development versions will +tend to have another name (such as andover). You can download those using the `checkout` command. For example: + +.. prompt:: bash + git checkout andover + Once the package has been downloaded to your computer, use your command line to navigate into the SHARPpy directory and type this command in to install SHARPpy: .. prompt:: bash python setup.py install +If you have pip, it may be installed via this command: + +.. prompt:: bash + + pip install -e . + After installing the package, you can run the SHARPpy GUI and interact with the SHARPpy libraries through Python scripts. The GUI can be launched similar to the method described above in the "Installing from conda or pip" section. From b812657d0ff4ecf9bb154e518375e7b0fc90e960 Mon Sep 17 00:00:00 2001 From: wblumberg Date: Fri, 13 Sep 2019 18:52:20 -0400 Subject: [PATCH 06/15] Took out bash init --- .travis.yml | 6 ++++++ ci/build_docs.sh | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ca617a57..bce256f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,12 @@ matrix: language: generic env: - PYTHON_VERSION="3.6" BUILD_DOCS="NO" NUMPY_VERSION=1.15 COVERALLS="YES" DISPLAY_AVAIL="YES" + +addons: + ssh_known_hosts: + - github.com + - 140.82.113.4 + before_install: - source ci/install.sh install: diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 85b3a0ea..d3e8f554 100644 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -2,8 +2,6 @@ # Adapted from the ci/build_docs.sh file from the pandas and pyart project # https://github.com/pydata/pandas set -e -conda init bash - echo "**************************************************************************************" echo "Step 0: Installing sphinx, etc. to build the documentation ..." From d3e40e075cccab5975021a68a06fa74ee4d6fbd6 Mon Sep 17 00:00:00 2001 From: wblumberg Date: Fri, 13 Sep 2019 19:10:19 -0400 Subject: [PATCH 07/15] Disabled appveyor --- .appveyor.yml | 96 +++++++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 0350441b..7b79f623 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,66 +1,66 @@ -environment: - matrix: - - PYTHON_VERSION: 3.6 - MINICONDA: C:\Miniconda3 - ARCH: "64" - NUMPY_VERSION: "1.15.*" -init: - - "ECHO %PYTHON_VERSION% %MINICONDA%" - -install: - - "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%" - - conda config --set always_yes yes --set changeps1 no - - conda update -q conda - - conda info -a - - conda env create -f environment.yml - - # Install dependencies - - activate devel - +#environment: +# matrix: +# - PYTHON_VERSION: 3.6 +# MINICONDA: C:\Miniconda3 +# ARCH: "64" +# NUMPY_VERSION: "1.15.*" +#init: +# - "ECHO %PYTHON_VERSION% %MINICONDA%" +# +#install: +# - "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%" +# - conda config --set always_yes yes --set changeps1 no +# - conda update -q conda +# - conda info -a +# - conda env create -f environment.yml +# +# # Install dependencies +# - activate devel +# # Add to path the current folder - - "SET PYTHONPATH=%PYTHONPATH%;%CD%" +# - "SET PYTHONPATH=%PYTHONPATH%;%CD%" # Install SHARPpy - - python setup.py -q install +# - python setup.py -q install # Resize the screen #- nuget restore - - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/set-screenresolution.ps1')) - - ps: Set-ScreenResolution 1366 768 +# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/set-screenresolution.ps1')) +# - ps: Set-ScreenResolution 1366 768 -build: off +#build: off # Turning off Test Script for now -test_script: +#test_script: # - sharppy examples/data/14061619.OAX - pytest -v -after_test: - - "conda list" - - "cd runsharp" - - "pyinstaller SHARPpy-win7-%ARCH%.spec" - - "cd .." +#after_test: +# - "conda list" +# - "cd runsharp" +# - "pyinstaller SHARPpy-win7-%ARCH%.spec" +# - "cd .." # - "move dist\\SHARPpy.exe dist\\SHARPpy%ARCH%.exe" -artifacts: - - path: "runsharp\\dist\\SHARPpy64.exe" - name: binary - - - path: "*.png" - name: test images +#artifacts: +# - path: "runsharp\\dist\\SHARPpy64.exe" +# name: binary +# +# - path: "*.png" +# name: test images - - path: "examples\\data\\14061619.png" - name: test gui +# - path: "examples\\data\\14061619.png" +# name: test gui -deploy: - provider: GitHub - release: $(appveyor_repo_tag_name) - auth_token: - secure: DB6sQwYCM7Dhhy+mjPkMd6kclvw0Sc2wglTJxcTBQue63dtIQRNa1dz/aqJG7Ygc - artifact: "runsharp\\dist\\SHARPpy64.exe" - draft: true - prerelease: true - on: - appveyor_repo_tag: true +#deploy: +# provider: GitHub +# release: $(appveyor_repo_tag_name) +# auth_token: +# secure: DB6sQwYCM7Dhhy+mjPkMd6kclvw0Sc2wglTJxcTBQue63dtIQRNa1dz/aqJG7Ygc +# artifact: "runsharp\\dist\\SHARPpy64.exe" +# draft: true +# prerelease: true +# on: +# appveyor_repo_tag: true # Don't deploy because andover-off From b333bf61b59d41f0c1c009f27e1fec0bd85faf6f Mon Sep 17 00:00:00 2001 From: wblumberg Date: Fri, 13 Sep 2019 19:11:08 -0400 Subject: [PATCH 08/15] Fixed formatting issue with docs --- docs/source/index.rst | 4 ++-- docs/source/install.rst | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 017f6ce5..c6876a52 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -15,11 +15,11 @@ Welcome to SHARPpy's documentation! :Release: |version| :Date: |today| -FYI: This documentation describes the soon to be released Andover branch of SHARPpy, which are accessible only through cloning the Github repository. +:command:*FYI:* This documentation describes the soon to be released Andover branch of SHARPpy, which is accessible only through cloning the Github repository. SHARPpy is a collection of open source sounding and hodograph analysis routines, a sounding plotting package, and an interactive, *cross-platform* application for analyzing real-time soundings all written in Python. It was developed to provide the atmospheric science community a free and consistent source of sounding analysis routines. SHARPpy is constantly updated and vetted by professional meteorologists and climatologists within the scientific community to help maintain a standard source of sounding routines. -We currently support Python >= 3.6 and will be dropping support for Python 2.7 in summer 2019. +We currently support Python >= 3.6. Noteable Links ============== diff --git a/docs/source/install.rst b/docs/source/install.rst index 9e9f50db..0272d14d 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -101,15 +101,17 @@ We tend to name each version of SHARPpy after a famous tornado (e.g., Xenia). R tend to have another name (such as andover). You can download those using the `checkout` command. For example: .. prompt:: bash + git checkout andover -Once the package has been downloaded to your computer, use your command line to navigate into the SHARPpy directory and type this command in to install SHARPpy: +Once the package has been downloaded to your computer, use your command line to navigate into the SHARPpy directory. +If you want to use setuptools, type this command in to install SHARPpy: .. prompt:: bash python setup.py install -If you have pip, it may be installed via this command: +If you have pip, it can also be installed via this command: .. prompt:: bash From a21583d41f71f9e2140de4c2c4face808a847bd3 Mon Sep 17 00:00:00 2001 From: Greg Blumberg Date: Fri, 13 Sep 2019 20:15:39 -0400 Subject: [PATCH 09/15] Fixed doc formatting issue --- docs/source/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index 0272d14d..f940e5af 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -97,7 +97,7 @@ Other branches (including development ones not called master) can be listed usin git branch -We tend to name each version of SHARPpy after a famous tornado (e.g., Xenia). Releases will be under the "master" branch, while development versions will +We tend to name each version of SHARPpy after the locations where significant tornados have struck (e.g., Xenia, El Reno). Releases will be under the "master" branch, while development versions will tend to have another name (such as andover). You can download those using the `checkout` command. For example: .. prompt:: bash From d1c03669df12644c00882e38ab3eba3d78894f2a Mon Sep 17 00:00:00 2001 From: Greg Blumberg Date: Fri, 13 Sep 2019 20:18:51 -0400 Subject: [PATCH 10/15] Updated docs --- docs/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index c6876a52..962015bd 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -15,7 +15,7 @@ Welcome to SHARPpy's documentation! :Release: |version| :Date: |today| -:command:*FYI:* This documentation describes the soon to be released Andover branch of SHARPpy, which is accessible only through cloning the Github repository. +:command:`FYI:` This documentation describes the soon to be released Andover branch of SHARPpy, which is accessible only through cloning the Github repository. SHARPpy is a collection of open source sounding and hodograph analysis routines, a sounding plotting package, and an interactive, *cross-platform* application for analyzing real-time soundings all written in Python. It was developed to provide the atmospheric science community a free and consistent source of sounding analysis routines. SHARPpy is constantly updated and vetted by professional meteorologists and climatologists within the scientific community to help maintain a standard source of sounding routines. From 0ab26b6c883fe65388bfe7977bfd55a9e26992c3 Mon Sep 17 00:00:00 2001 From: Greg Blumberg Date: Fri, 13 Sep 2019 20:19:27 -0400 Subject: [PATCH 11/15] Removed print statements from ver_updates --- utils/ver_updates.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/utils/ver_updates.py b/utils/ver_updates.py index 84a52f9c..ab917afa 100644 --- a/utils/ver_updates.py +++ b/utils/ver_updates.py @@ -32,11 +32,8 @@ def compare_versions(data): # Checks to see if the publication date of the most recent Github Release # is less than the current version's date. ver = get_sharppy_ver() - print(data, ver) - print(ver['date'], data['published_at']) ver_date = parser.parse(ver['date']) latest_date = parser.parse(data['published_at']) -# print(ver_date, latest_date) return isLatest(ver_date, latest_date) def isLatest(cur, github): From 7497cd96513b61688af36ece073c3ba5d8b8e259 Mon Sep 17 00:00:00 2001 From: Greg Blumberg Date: Fri, 13 Sep 2019 21:11:05 -0400 Subject: [PATCH 12/15] Removed extra lines from full_gui --- runsharp/full_gui.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/runsharp/full_gui.py b/runsharp/full_gui.py index c2156d6a..6e510c9d 100644 --- a/runsharp/full_gui.py +++ b/runsharp/full_gui.py @@ -1,11 +1,8 @@ from qtpy.QtGui import * from qtpy.QtCore import * from qtpy.QtWidgets import * -import qtpy QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps) -#QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps, True) -#QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True) from sharppy.viz.map import MapWidget import argparse import traceback From 5bc9f22450ae96272b0d23eeb046c5770e4d4638 Mon Sep 17 00:00:00 2001 From: Greg Blumberg Date: Fri, 13 Sep 2019 21:11:52 -0400 Subject: [PATCH 13/15] Trying new pyinstaller specs to debug binary build --- runsharp/SHARPpy-osx.spec | 4 ++-- runsharp/SHARPpy-win7-64.spec | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runsharp/SHARPpy-osx.spec b/runsharp/SHARPpy-osx.spec index a6838780..2a74ad25 100644 --- a/runsharp/SHARPpy-osx.spec +++ b/runsharp/SHARPpy-osx.spec @@ -57,10 +57,10 @@ exe = EXE(pyz, a.zipfiles, a.datas, name='SHARPpy', - debug=False, + debug=True, strip=None, upx=True, - console=False ) + console=True ) app = BUNDLE(exe, name='SHARPpy.app', diff --git a/runsharp/SHARPpy-win7-64.spec b/runsharp/SHARPpy-win7-64.spec index b78153a9..d75b9f08 100644 --- a/runsharp/SHARPpy-win7-64.spec +++ b/runsharp/SHARPpy-win7-64.spec @@ -62,10 +62,10 @@ exe = EXE(pyz, a.zipfiles, a.datas, name='SHARPpy.exe', - debug=False, + debug=True, strip=None, upx=True, - console=False, icon='icons\\SHARPpy.ico') + console=True, icon='icons\\SHARPpy.ico') # Revert the _version.py file to its original version using git import subprocess From a71dac73794f78226cea9237b881326f0cde1c43 Mon Sep 17 00:00:00 2001 From: wblumberg Date: Mon, 16 Sep 2019 14:15:44 -0400 Subject: [PATCH 14/15] Updated data sources to include HRRR IEM archive --- datasources/available.py | 12 +++++++++++- datasources/standard.xml | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/datasources/available.py b/datasources/available.py index 8952e951..1ebf5d46 100644 --- a/datasources/available.py +++ b/datasources/available.py @@ -366,6 +366,8 @@ def _available_iem(model, dt=None): return [] if model == 'rap' and dt < datetime(2012,5,1): # No RAP data prior to this date return [] + if model == 'hrrr' and dt < datetime(2019,8,24): + return [] if model == 'ruc' or model == 'rap': if dt.year == 2012 and dt.month == 5 and dt.day == 1: # Need to truncate the times since there was a switchover from RUC to RAP on this day. @@ -380,6 +382,14 @@ def _available_iem(model, dt=None): if model == 'gfs' or model == 'nam' or model == 'nam4km': start = 0; end = 24; inc = 6 + if model == 'hrrr': + if dt.year == 2019 and dt.month == 8 and dt.day == 24: + start = 1 + else: + start = 0 + end = 24 + inc = 1 + return [datetime(dt.year, dt.month, dt.day, h, 0, 0) for h in np.arange(start,end,inc)] @@ -451,7 +461,7 @@ def _available_nssl(ens=False): availableat['psu'][model] = (lambda m: lambda dt: _availableat_psu(m, dt))(model) # Set the available and available-at-time functions for the IEM data. -for model in [ 'gfs', 'nam', 'rap', 'ruc', 'nam nest' ]: +for model in [ 'gfs', 'nam', 'rap', 'ruc', 'nam nest','hrrr' ]: available['iem'][model] = (lambda m: lambda dt=None: _available_iem(m, dt=dt))(model) availableat['iem'][model] = (lambda m: lambda dt: _availableat_iem(m, dt))(model) diff --git a/datasources/standard.xml b/datasources/standard.xml index a20301a4..70c59725 100644 --- a/datasources/standard.xml +++ b/datasources/standard.xml @@ -35,6 +35,10 @@