Skip to content

Commit

Permalink
Merge branch 'andover' of github.com:sharppy/SHARPpy into andover
Browse files Browse the repository at this point in the history
  • Loading branch information
keltonhalbert committed Sep 16, 2019
2 parents 7a56b46 + 29d2ae0 commit cb73446
Show file tree
Hide file tree
Showing 16 changed files with 122 additions and 88 deletions.
96 changes: 48 additions & 48 deletions .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
6 changes: 6 additions & 0 deletions .travis.yml
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions README.md
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions ci/build_docs.sh
Expand Up @@ -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 ..."
Expand Down
12 changes: 11 additions & 1 deletion datasources/available.py
Expand Up @@ -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.
Expand All @@ -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)]


Expand Down Expand Up @@ -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)

Expand Down
4 changes: 4 additions & 0 deletions datasources/standard.xml
Expand Up @@ -35,6 +35,10 @@
<time first="0" range="15" delta="1" offset="0" delay="2" cycle="1" archive="24" start="-" end="-"/>
<points csv="hrrr.csv" />
</outlet>
<outlet name="IEM" url="http://mtarchive.geol.iastate.edu/{year}/{month}/{day}/bufkit/{cycle}/hrrr/hrrr_{srcid}.buf" format="bufkit" >
<time first="0" range="15" delta="1" offset="0" delay="2" cycle="1" archive="24" start="2019/08/24" end="now"/>
<points csv="hrrr.csv" />
</outlet>
</datasource>
<datasource name="NAM NEST" ensemble="false" observed="false">
<outlet name="PSU" url="ftp://ftp.meteo.psu.edu/pub/bufkit/NAMNEST/{cycle}/namnest_{srcid}.buf" format="bufkit" >
Expand Down
4 changes: 3 additions & 1 deletion docs/source/index.rst
Expand Up @@ -15,9 +15,11 @@ 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.

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
==============
Expand Down
33 changes: 24 additions & 9 deletions docs/source/install.rst
Expand Up @@ -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:

Expand All @@ -96,11 +91,31 @@ If you follow the route of cloning SHARPpy, you can update to the most recent SH

git pull origin master

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:
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 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

git checkout andover

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 can also 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.
2 changes: 1 addition & 1 deletion docs/source/picker.rst
Expand Up @@ -46,7 +46,7 @@ SHARPpy links into various datasets around the web to allow the user to explore
"Penn State", "http://www.meteo.psu.edu/bufkit/", "HRRR, GFS, NAM, 3km NAM, SREF, RAP"
"NOAA SPC","https://www.spc.noaa.gov/exper/soundings/", "Observed U.S. Soundings"
"SHARP","http://sharp.weather.ou.edu/", "Observed & Archived Int. Soundings"
"IEM","http://mtarchive.geol.iastate.edu", "GFS, RUC, NAM, NAMNEST, RAP"
"IEM","http://mtarchive.geol.iastate.edu", "GFS, RUC, NAM, NAMNEST, RAP, HRRR"

Currently, both the NOAA SPC and SHARP server datasets are able to offer world-wide observed soundings. While the SPC server is handled by the meteorologists at the Storm Prediction Center, the SHARPpy development team has been granted server space at the `University of Oklahoma <http://meteorology.ou.edu>`_ to generate various datastreams (e.g. international soundings). Data from the SHARP server is generated by GEMPAK binaries that merge realtime standard and significant level data accessible `here <http://weather.rap.ucar.edu/upper/Current.rawins>`_. Archived soundings were downloaded from the publically available `GEMPAK data archive <http://mtarchive.geol.iastate.edu>`_ managed by the `Iowa Environmental Mesonet <https://mesonet.agron.iastate.edu>`_. Data from this archive starts on January 1st, 1946. Decoding of this dataset (and the real-time international data stream on SHARP) are performed by the GEMPAK ``snlist`` binary distributed in the `NWS SOO's BUFRgruven package <http://strc.comet.ucar.edu/software/bgruven/>`_.

Expand Down
4 changes: 2 additions & 2 deletions runsharp/SHARPpy-osx.spec
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions runsharp/SHARPpy-win7-64.spec
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions 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
Expand Down

0 comments on commit cb73446

Please sign in to comment.