Giter Site home page Giter Site logo

hushpupy's Introduction

HuSHPUpy

Dean Meyer and Preston Pangle

The University of Alabama in Huntsville (UAH)

2020

example

What is it?

The Huntsville SHARPpy Plotting Utility (HuSHPUpy) converts raw radiosonde data into several formats and generates SHARPpy-based Skew-T Log-P plots. It leverages several Python libraries (NumPy, Pandas, Matplotlib, SHARPpy) to convert raw iMet or Windsond files into formats compatible with RAOB, SHARPpy, and a general research format. Windsond data is processed with Pandas for quality-control and ease of viewing. HuSHPUpy also outputs custom SHARPpy plots serving as quick-looks for your data.


Running the program

If you're only here to run HuSHPUpy, look no further. Follow these instructions to deploy HuSHPUpy to your system:

  1. Navigate to Releases on this GitHub repo.
  2. Download the latest .zip package.
  3. Unzip the downloaded package.
  4. Locate hushpupy.exe inside the package folder.
  5. This guide recommends creating a shortcut for the hushpupy.exe.
  6. Execute hushpupy.exe to run HuSHPUpy.

Note: HuSHPUpy will dump converted sounding files and images in C:/Converted_Soundings


Development

This section provides instructions to support future development of HuSHPUpy.

Package dependencies

HuSHPUpy requires these packages and their dependencies to run:

  • Matplotlib <= 3.1.3
  • SHARPpy == latest
  • Pandas == latest
  • Pyinstaller == latest

Building the Anaconda environment

Original development of HuSHPUpy lived on Anaconda. It's much easier to create the correct environment for HuSHPUpy on Anaconda with this command:

conda env create -f hushpupy-env.yml

This environment includes PyInstaller, allowing future developers to release .exe applications.

Building the app

HuSHPUpy may run from the command line, but it runs best as a .exe application. When future developers update the HuSHPUpy scripts, they will need to rebuild the .exe with PyInstaller. Follow these steps to rebuild HuSHPUpy:

  1. Through Anaconda prompt, navigate to the HuSHPUpy git repository on your system.
  2. Switch to the correct Anaconda environment by entering conda activate hushpupy-env
  3. Build HuSHPUpy with the command pyinstaller hushpupy-build.spec
  4. Note: As of August 2020, using PyInstaller's --onefile option makes HuSHPUpy unstable and is not recommended.
  5. Some new files appear, including a dist directory. dist contains the directory hushpupy which holds several files including the .exe we need.
  6. Ensure that logo.png and essc_logo.png are inside hushpupy. HuSHPUpy will not run without these.
  7. HuSHPUpy is now built.
  8. Zip up the hushpupy directory with your favorite tool. We prefer 7-Zip.
  9. Attach this zipped file to a new GitHub release.

hushpupy's People

Contributors

dm0096 avatar

Watchers

 avatar  avatar

Forkers

cam-gerlach

hushpupy's Issues

Error finding logo.png when hushpupy is not launched from its own working directory

Sorry, I thought I submitted this earlier, but we were up till 5 am at SWIRLL and I forgot I never had.

Hushpupy failed with an error when we attempted to run it from the command line when not cd ed into its working directory, as it attempts to open its assets (e.g. the logo images on line 500 and the one on line 510 of UAH_sounding_plotting.py with a relative path. For now, we implemented a simple workaround of just adding it to the Start menu, taskbar, quick access and desktop, any of which automatically launches it in its own working directory.

However, to ensure this doesn't happen in the future, and its usable from the command line (or any edge cases the above approach doesn't address), I suggest fixing this more properly. This might also fix --one-file mode, making it easier to distribute Hushpupy without having to zip and unzip it, as well as easier to run from source and Anaconda.

To fix this, based on the Pyinstaller docs, you can add following constant at the top of UAH_sounding_plotting.py:

from pathlib import Path
import sys

if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
    ASSET_DIR = Path(sys._MEIPASS)
else:
    ASSET_DIR = Path(__file__).parent

Then, on line 500, just do

 im = plt.imread(ASSET_DIR / 'logo.png')

I'm happy to submit a PR with this change, and see if I can't find --one-file mode too. BTW, a demo .TSPOINT file would be helpful for testing. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.