Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hitranonline/hapiest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.1-alpha
Choose a base ref
...
head repository: hitranonline/hapiest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 8 commits
  • 12 files changed
  • 1 contributor

Commits on Jun 29, 2020

  1. Copy the full SHA
    036bdda View commit details

Commits on Feb 27, 2021

  1. Added a temporary fix to display all parameters and groups since

    paramter availability is unavailable.
    jkarns275 committed Feb 27, 2021
    Copy the full SHA
    8cb0e8e View commit details

Commits on Mar 1, 2021

  1. Update README.md

    jkarns275 authored Mar 1, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    93d307c View commit details
  2. Update README.md

    jkarns275 authored Mar 1, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    16108b5 View commit details

Commits on Mar 2, 2021

  1. Copy the full SHA
    0fbbbdc View commit details
  2. More mac binary stuff

    jkarns275 committed Mar 2, 2021
    Copy the full SHA
    df3a0fa View commit details
  3. Copy the full SHA
    6acc345 View commit details
  4. Copy the full SHA
    740fdf9 View commit details
Showing with 1,994 additions and 683 deletions.
  1. +19 −16 README.md
  2. +6 −1 hapiest.spec
  3. +11 −1 layouts/fetch_widget.ui
  4. +11 −3 src/__main__.py
  5. +6 −1 src/app.py
  6. +1,922 −653 src/hapi.py
  7. +1 −1 src/metadata/parameter_availability.py
  8. +9 −0 src/startup.py
  9. +1 −1 src/utils/hapi_api.py
  10. +7 −4 src/widgets/fetch_widget.py
  11. +1 −1 src/widgets/graphing/graphing_widget.py
  12. +0 −1 src/worker/work_request.py
35 changes: 19 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,25 +2,22 @@
*hapiest* is a GUI that works with the HITRAN API, enabling access
to all sorts of spectrographic data without knowledge of python.

*hapiest* is still in it's alpha stage of development.
## Manual
The most up to date version of the manual can be downloaded [here](https://github.com/hitranonline/hapiest/raw/master/docs/manual.pdf).
*hapiest* is still in it's alpha stage of development.

## License
*hapiest* is licensed under the LGPL license.
## Usage + Manual
A manual that documents what hapiest can do can be found
[here](https://github.com/hitranonline/hapiest/raw/master/doc/HAPIESTmanual.pdf).
The manual is a work in progress but is mostly complete.

## Download
You can download an executable for your system [here.](https://github.com/hitranonline/hapiest/releases/tag/v0.2-alpha)
You can download an executable for your system [here.](https://github.com/hitranonline/hapiest/releases)

Currently 32 bit (x86) Windows and Linux machines are not supported but they will be eventually.

## Usage
A manual that documents what hapiest can do can be found
[here](https://github.com/hitranonline/hapiest/raw/master/doc/HAPIESTmanual.pdf) (this link will download the PDF file).
Currently 32 bit (x86) Windows and Linux machines are not supported, but you can run the program from source
on these platforms.

## How to Manually Install
Hapiest has a limited number of binary packages, but the program itself can be
downloaded
downloaded and ran from its source code quite easily.

*You must have python 3.6 or later to install and use hapiest*.

@@ -33,25 +30,28 @@ git clone https://github.com/hitranonline/hapiest
This will download the latest version of hapiest and put it in a folder named hapiest. In order to run *hapiest*,
you must have all of the packages listen in requirements.txt installed.

It is recommended you install these packages using a [virtual environment](https://docs.python.org/3/tutorial/venv.html).

To install these packages automatically, you can run the following command:
```bash
pip install -r requirements.txt
```
Note that your pip program may be called pip3.


Then, to run the program execute the following:
```bash
cd hapiest
python3.6 src
```

You may have to replace `python` in the above commands with `python3` or `python3.6` depending on your specific
You may have to replace `python` in the above commands with `python3`, `python3.6`, `python3.x`, etc., depending on your specific
configuration.

After you install hapiest, you can start it by calling `run` in a command prompt or terminal. If you are on mac you may
have to edit the `run` file and replace `python` with `python3` or `python3.6`.
If you encounter issues with these instructions please feel free to open an issue or email josh@mail.rit.edu.

## Troubleshooting
*hapiest* is still a very immature piece of software. If you encounter any bugs, you're encouraged to open an issue with
*hapiest* is still an immature piece of software. If you encounter any bugs, you're encouraged to open an issue with
your bug report.

# References
@@ -63,3 +63,6 @@ R.V. Kochanov, I.E. Gordon, L.S. Rothman, P. Wcislo, C. Hill, J.S. Wilzewski, HI
(HAPI): A comprehensive approach to working with spectroscopic data, J. Quant. Spectrosc. Radiat. Transfer 177, 15-30
(2016) [http://www.sciencedirect.com/science/article/pii/S0022407315302466?via%3Dihub].
```

## License
*hapiest* is licensed under the LGPL license.
7 changes: 6 additions & 1 deletion hapiest.spec
Original file line number Diff line number Diff line change
@@ -23,11 +23,16 @@ exe = EXE(pyz,
debug=False,
strip=False,
upx=True,
console=True )
console=False )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='hapiest')
app = BUNDLE(exe,
name='hapiest.app',
icon='res/img/icons/icon.png',
bundle_identifier=None)

12 changes: 11 additions & 1 deletion layouts/fetch_widget.ui
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>933</width>
<width>819</width>
<height>321</height>
</rect>
</property>
@@ -275,6 +275,16 @@
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#ff2600;&quot;&gt;NOTE: listed parameters and groups are not necessarily all available this molecule - filtering of unavailable parameters will be added ASAP.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<property name="spacing">
14 changes: 11 additions & 3 deletions src/__main__.py
Original file line number Diff line number Diff line change
@@ -2,8 +2,15 @@
This is the main module. It basically checks that there is a hapi api key, asks for one if there
is not one, and launches the main GUI. That's about it.
"""
from multiprocessing import freeze_support
import sys
import sys, os

if getattr(sys, 'frozen', False):
os.environ['JOBLIB_MULTIPROCESSING'] = '0'

import multiprocessing
from multiprocessing import freeze_support, set_start_method
multiprocessing.set_start_method('forkserver', force=True)
freeze_support()

from startup import fix_cwd, check_version

@@ -13,8 +20,9 @@
from app import run

if __name__ == '__main__':
print(sys.argv)
import traceback
freeze_support()

try:
sys.exit(run())
except TypeError as err:
7 changes: 6 additions & 1 deletion src/app.py
Original file line number Diff line number Diff line change
@@ -44,6 +44,8 @@ def check_internet_connection_and_obtain_api_key():
"""
import urllib.request
from utils.hapi_api import CrossSectionApi
print(f"{CrossSectionApi.BASE_URL}/{CrossSectionApi.API_ROUTE}/{Config.hapi_api_key}/" \
f"{CrossSectionApi.XSC_META_ROUTE}")

print(f"API Key: {Config.hapi_api_key}")
try:
@@ -52,7 +54,8 @@ def check_internet_connection_and_obtain_api_key():
f"{CrossSectionApi.XSC_META_ROUTE}"):
pass
return True
except HTTPError as _:
except HTTPError as x:
print(x)
# An HTTP error code was given the response. This means the APIKEY was invalid
err_msg = """
Your HAPI API key will be used on the next launch. Please restart HAPIEST.
@@ -104,7 +107,9 @@ def run():
elif sys.argv[1] in ("-gba", "--generate-broadener-availability"):
import res_gen.generate_broadener_availability as gba
gba.generate_availability()
print("ok")
return 0

if Config.high_dpi:
# Enable High DPI display with PyQt5
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
Loading