Skip to content

Commit

Permalink
A few changes before we go final
Browse files Browse the repository at this point in the history
  • Loading branch information
o355 committed Apr 18, 2017
1 parent 577bdcf commit baa059a
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 30 deletions.
29 changes: 16 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,36 @@ Quick note: I generally use the changelog (thanks Eclipse for supporting MD file

## version 0.5.2 beta - Should be released on 5/3/2017
* Adds the raw traceback output in keybackup.py - Should be finished by 4/18.
* Changes the error message when the config file fails to load (the potential for the file to not get loaded) - Should be finished by 4/18.
* Removes the error catching of a bad config file load, it's useless. - Should be finished by 4/18.
* Adds the library check script, which checks for libraries PyWeather needs. - Should be finished by 4/20.
* Adds a separate config.py script, to configure all available options. - Should be finished by 4/24.
* Adds the ability to fetch all JSON files using a backup key, if the primary one fails. This is accomplished by using the first JSON fetch as a test, and seeing if a KeyError occurs. If a KeyError occurs, the backup key will be substituted. - Should be finished by 4/26.
* Rewrites multiline prints in pyweather.py (thanks to @gsilvapt for the PR/notifing me of the issue, and @Rhomboid on /r/learnpython for a good solution) (some multiline prints with a lot of variables won't be condensed, for the sake of sanity.) - Should be finished by 5/2.

## version 0.5.1 beta - Should be released on 4/17/2017
## version 0.5.1 beta - Released on 4/17/2017
**NEW FEATURES/REMOVALS:**
* Removes if verbosity == True in the separate updater, and keybackup scripts. - Done, and tested!
* Adds the ability to load your backup key if PyWeather can't access your primary key. - Done, and tested!
* Adds the raw traceback output in updater.py/setup.py - Done, and tested!
* Adds the logger displaying configuration options at the start of every script - Done, and tested!
* The backup key will now stay static to backkey.txt, with a configurable directory (thanks to @ModoUnreal for the PR) - Done, and tested!
* Changes the non-critical traceback print function from an info level to a warn level in all scripts. - Done, and tested!
* Catches up the setup file with the new configuration options added in 0.5 beta. - Done, and tested!
* PyWeather Updater will now show the release tag, even when PyWeather is up-to-date. - Done, and tested!
* Removes if verbosity == True in the separate updater, and keybackup scripts.
* Adds the ability to load your backup key if PyWeather can't access your primary key.
* Adds the raw traceback output in updater.py/setup.py.
* Adds the logger displaying configuration options at the start of every script.
* The backup key will now stay static to backkey.txt, with a configurable directory (thanks to @ModoUnreal for the PR).
* Changes the non-critical traceback print function from an info level to a warn level in all scripts.
* Catches up the setup file with the new configuration options added in 0.5 beta.
* PyWeather Updater will now show the release tag, even when PyWeather is up-to-date.
* In setup, the key-reconfirmation is now a while true infinite loop. - Done, and tested!
* Adds a check for "None" in of rain in the 10-day forecast, and -999 mph winds in the 10-day on the current day - Done, and tested!
* Rewrites multiline prints in setup.py (thanks to @gsilvapt for the PR/notifing me of the issue, and @Rhomboid on /r/learnpython for a good solution) - Done, needs to be tested.
* Adds the configdefault.py script, to reset all configuration options to their default. - Should be finished by 4/17.
* Adds a check for "None" in of rain in the 10-day forecast, and -999 mph winds in the 10-day on the current day.
* Rewrites multiline prints in setup.py (thanks to @gsilvapt for the PR/notifing me of the issue, and @Rhomboid on /r/learnpython for a good solution).
* Adds the configdefault.py script, to reset all configuration options to their default.
* Minor UI changes across most of the scripts.

**BUG FIXES:**
* Fixes a bug in which if the config file wouldn't load in the updater, the variable showReleaseTag wouldn't get defined, and it would presumably crash.
* Fixes a bug in which in the keybackup script, the logger name was not `pyweather_keybackup_0.5beta` (it was instead `pyweather_keybackup_0.4.2beta`.
* Fixed a bug in which if Wunderground gave >60 minute intervals for historical hourly information, PyWeather would only display 24 iterations. With this, the iteration break detection is gone, so a user may see "enter to continue", with no data following that.
* Fixes multiple bugs with UI issues in historical hourly, and 10-day hourly information.
* Fixes a "bug" in which if the config file couldn't be loaded, the error wasn't properly caught.
* Fixes a "bug" in which if the config file couldn't be loaded, the error wasn't properly caught. This is actually useless in practice, so hurray for wasted time!
* Fixes a "bug" in which if the config file couldn't be properly written to in scripts, the error wasn't properly caught.

## version 0.5 beta (The Back to the Future Update) - Released on 3/31/2017
* The naming comes from a combination of adding history (back), and 10-day future (future). Sorry.
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Welcome to PyWeather (0.5 beta)!
## Welcome to PyWeather (0.5.1 beta)!
Viewing the weather in a terminal has never been so much fun.

## Why? Why should I check my weather in a terminal?
Expand All @@ -11,6 +11,8 @@ Download a release from the releases tab, unzip it, and run setup.py. The script

After that, double click pyweather.py, input a location, and that's it! No, really. That's actually it. No completed config files, none of that. setup.py, pyweather.py. Welcome to the world of simplicity! \ (•◡•) /

**Sometimes, the setup script will have a tendancy to fail in regards to installing geocoder. See the wiki page "Setup" for more information.**

If you have Git, and you'd prefer to clone over PyWeather from Git, please read the page on "Installing from Git" in the Wiki.

## What's PyWeather?
Expand All @@ -24,6 +26,7 @@ Alas, PyWeather was born. It's a Python script that let's you view weather data

## What kind of features are in PyWeather?
Want screenshots? https://imgur.com/a/n7L8B
*asciinema demo goes here*

(the almanac wasn't included, as I actually found a bug when taking the screenshots)

Expand Down Expand Up @@ -53,8 +56,10 @@ Oh, I should mention that PyWeather is faster than going to Wunderground, is ad-
Need mobile support? You could get Termux, but that doesn't work (tested it). The best option right now is to spin up a Linux box with SSH and PyWeather, and log into it using Termius (iPhone/Android).

## Contributing
I'm not a full time Python developer, and I'm not about to skip school because I want to work on Python projects. Between school, and the other projects I work on (and gaming, too!), I try my best to get in Python coding time, but it's not enough. Coding all of 0.5 beta's new features took 3 weeks, because of the limited time I had. So, I'm open to contributions.
I'm not a full time Python developer. I have school, I work on other projects, and have other hobbies, too.

While I try to get in around 60 minutes of coding time a day, 80% of the time, I can't. Thanks school. Thanks. And, sometimes, I just need a break from coding Python, to focus on doing other projects, or spending time with family.

Read over contributing.md in the .github folder to get a general rundown of how things work. After that, do your thing! Bug test, translate, submit some pull requests, you get the idea. Every contribution, bug report, etc, will get thanked in a release changelog!
Contributing is the best way to help me out with the limited time I have to code PyWeather. Be it bug hunting, submitting feature ideas, coding parts of PyWeather, or telling me about something I can do better, I'm all for it.

If you have something to give constructive criticism about, please tell me! I'm all for constructive criticism, and learning through criticism.
Read over CONTRIBUTING.md in the .github folder to get a general rundown of how things work.
2 changes: 1 addition & 1 deletion keybackup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
saveDirectory = 'backup//backkey.txt'
tracebacksEnabled = False

logger = logging.getLogger('pyweather_keybackup_0.5.1beta')
logger = logging.getLogger(name='pyweather_keybackup_0.5.1beta')
logformat = '%(asctime)s | %(levelname)s | %(message)s'
logging.basicConfig(format=logformat)

Expand Down
4 changes: 1 addition & 3 deletions pyweather.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
# storage/config.ini. Have a lovely day!

import logging
logger = logging.getLogger('pyweather_0.5.1beta')
logger = logging.getLogger(name='pyweather_0.5.1beta')
logformat = '%(asctime)s | %(levelname)s | %(message)s'
logging.basicConfig(format=logformat)

Expand Down Expand Up @@ -1682,7 +1682,6 @@ def printException_loggerwarn():
+ " inHg (" + historicals_maxPressureMB + " mb)")
print(Fore.YELLOW + "Total Precipitation: " + Fore.CYAN + historicals_precipIN
+ " in (" + historicals_precipMM + "mb)")
print("")
try:
print(Fore.RED + "To view hourly historical data, please press enter.")
print(Fore.RED + "If you want to return to the main menu, press Control + C.")
Expand Down Expand Up @@ -1823,7 +1822,6 @@ def printException_loggerwarn():
if historical_loops == user_loopIterations:
logger.info("Asking user to continue.")
try:
print("")
print(Fore.RED + "Press enter to view the next", user_loopIterations
, "iterations of historical weather information.")
print("Otherwise, press Control + C to get back to the main menu.")
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def printException_loggerwarn():


import logging
logger = logging.getLogger('pyweather_setup_0.5.1beta')
logger = logging.getLogger(name='pyweather_setup_0.5.1beta')
logger.setLevel(logging.DEBUG)
logformat = '%(asctime)s | %(levelname)s | %(message)s'
logging.basicConfig(format=logformat)
Expand Down Expand Up @@ -524,13 +524,15 @@ def printException_loggerwarn():
config['TRACEBACK']['setup_tracebacks'] = 'True'
config['TRACEBACK']['updater_tracebacks'] = 'True'
config['TRACEBACK']['keybackup_tracebacks'] = 'True'
config['TRACEBACK']['configdefault_tracebacks'] = 'True'
print("Changes saved.")
logger.debug("Printing tracebacks is ENABLED.")
elif displayTracebacks == "no":
config['TRACEBACK']['tracebacks'] = 'False'
config['TRACEBACK']['setup_tracebacks'] = 'False'
config['TRACEBACK']['updater_tracebacks'] = 'False'
config['TRACEBACK']['keybackup_tracebacks'] = 'False'
config['TRACEBACK']['configdefault_tracebacks'] = 'False'
print("Changes saved.")
logger.debug("Printing tracebacks is DISABLED.")
else:
Expand Down
2 changes: 1 addition & 1 deletion storage/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ keybackup_tracebacks = False
configdefault_tracebacks = False

[UI]
show_entertocontinue = False
show_entertocontinue = True
detailedinfoloops = 6
forecast_detailedinfoloops = 5
show_completediterations = False
Expand Down
26 changes: 23 additions & 3 deletions storage/config_README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
## PyWeather Configuration Readme
## PyWeather Configuration Readme - For PyWeather 0.5.1 beta
Since configparser hates comments, this will do for now.

## CHANGELOG
### forversion
This is just to show you what version the config file is meant to be used for.

Changing this does nothing.

**Default option: 0.5.1**

## SUMMARY section
### sundata_summary
This option will let you turn on/off PyWeather showing sunrise/sunset data on startup.
Expand Down Expand Up @@ -68,6 +76,13 @@ Useful for troubleshooting, and seeing if something is abnormal.

**Default option: False**

### configdefault_verbosity
This option will let you turn on/off PyWeather Configuration Reset showing logging information.

Useful for troubleshooting, and seeing if something is abnormal.

**Default option: False**

## TRACEBACK section
PyWeather can optionally show you a full traceback when an error occurs in a safety net. Turning this on is especially useful when you need to report an error.

Expand All @@ -79,7 +94,6 @@ Useful for reporting issues, and seeing what went wrong.
**Default option: False**

### setup_tracebacks
**This option is useless, but will be implemented in 0.5.1 beta.**

This option allows you to turn on printing full tracebacks in PyWeather Setup.

Expand All @@ -88,7 +102,6 @@ Useful for reporting issues, and seeing what went wrong.
**Default option: False**

### updater_tracebacks
**This option is useless, but will be implemented in 0.5.1 beta.**

This option allows you to turn on printing full tracebacks in PyWeather Updater.

Expand All @@ -105,6 +118,13 @@ Useful for reporting issues, and seeing what went wrong.

**Default option: False**

### configdefault_tracebacks
This option allows you to turn on printing full tracebacks in PyWeather Configuration Reset.

Useful for reporting issues, and seeing what went wrong.

**Default option: False**

## UI section
This section controls parts of the UI in PyWeather.

Expand Down
4 changes: 2 additions & 2 deletions storage/configdefault.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def printException():
logger.debug("TRACEBACK/updater_tracebacks is now 'False'.")
config['TRACEBACK']['configdefault_tracebacks'] = 'False'
logger.debug("TRACEBACK/configdefault_tracebacks is now 'False'.")
config['UI']['show_entertocontinue'] = 'False'
logger.debug("UI/show_entertocontinue is now 'False'")
config['UI']['show_entertocontinue'] = 'True'
logger.debug("UI/show_entertocontinue is now 'True'")
config['UI']['detailedinfoloops'] = '6'
logger.debug("UI/detailedinfoloops is now '6'.")
config['UI']['forecast_detailedinfoloops'] = '5'
Expand Down
4 changes: 2 additions & 2 deletions updater.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PyWeather Updater - version 0.5 beta
# PyWeather Updater - version 0.5.1 beta
# (c) 2017, o355, GNU GPL 3.0


Expand Down Expand Up @@ -38,7 +38,7 @@


import logging
logger = logging.getLogger('pyweather_updater_0.5.1beta')
logger = logging.getLogger(name='pyweather_updater_0.5.1beta')
logformat = '%(asctime)s | %(levelname)s | %(message)s'
logging.basicConfig(format=logformat)

Expand Down

0 comments on commit baa059a

Please sign in to comment.