Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Fixes crash when trying to add PET to an existing file and added some tests. #107

Merged
merged 9 commits into from
Nov 30, 2017

Conversation

jnsebgosselin
Copy link
Owner

@jnsebgosselin jnsebgosselin commented Nov 30, 2017

Fixes Issue #40


This bug was introduced when the function add_ETP_to_weather_data_file was moved to the module weather_reader.py, but the namespace was not updated accordingly in the module gapfill_weather_gui.py

While fixing this bug:

  • The related code was cleaned
  • The tooltips, GUI labels and docs were updated.
  • Tests were added to test the feature to add PET, either automatically to output weather datafiles, or a posteriori to an existing file.
  • Fixed a bug when clicking on Fill Station button when no station was selected.

@pep8speaks
Copy link

pep8speaks commented Nov 30, 2017

Hello @jnsebgosselin! Thanks for updating the PR.

Line 21:1: E402 module level import not at top of file
Line 24:1: E402 module level import not at top of file

Comment last updated on November 30, 2017 at 22:52 Hours UTC

@jnsebgosselin
Copy link
Owner Author

While running the tests, a new bug was found with the following traceback:

Traceback (most recent call last):
  File "C:\Users\jsgosselin\GWHAT\gwhat\meteo\gapfill_weather_gui.py", line 675,
 in gap_fill_btn_clicked
    self.msgBox.setText('No <b>weather station</b> is currently ' +
AttributeError: 'GapFillWeatherGUI' object has no attribute 'msgBox'

This bug occurs when clicking on the Fill Station button when no station was selected in the list.

@jnsebgosselin jnsebgosselin merged commit 8471315 into master Nov 30, 2017
@jnsebgosselin jnsebgosselin deleted the fix_add_etp branch December 1, 2017 03:13
jnsebgosselin added a commit that referenced this pull request Dec 4, 2017
…some tests. (#107)

* Support for importing .csv weather data input files

* Reworked and renamed the function

Cleaned the code and renamed the function to add PET to an existing
weather datafile.

* Fixe broken import in the code

* Improved label and tooltip of add PET option

* Reworked tooltip and variable names

Changed all ETP to PET as it should be in the English language.

* Updated the documentation

* Added tests to test Add PET feature.

* Fixed bug about QMessageBox

* fixed the tests
jnsebgosselin added a commit that referenced this pull request Jan 5, 2018
* Corrected a format typo

* Updating link to getting started docs

* PR: Fixes crash when trying to add PET to an existing file and added some tests. (#107)

* Support for importing .csv weather data input files

* Reworked and renamed the function

Cleaned the code and renamed the function to add PET to an existing
weather datafile.

* Fixe broken import in the code

* Improved label and tooltip of add PET option

* Reworked tooltip and variable names

Changed all ETP to PET as it should be in the English language.

* Updated the documentation

* Added tests to test Add PET feature.

* Fixed bug about QMessageBox

* fixed the tests

* Section Import data of plot hydrograph

* Working on section Input data files format

* PLotting the Hydrograph section

* PR: Fix water_level_measurements file management (#108)

* Removed dead imports

* Moved function to another module

Moved the function to create an empty water_levels_measures file to the
module read_waterlvl.

Also, removed the code to create an empty graph_layout.lst because it is
not used anymore.

* New water_level_measures and support for csv and xls

Added support for csv and xls file for reading the
water_level_measurement file.

* Added code to determine the ext of the file

* Added a property to return projet dirname

* Init the water_level_measurement on loading

When loading a project, the water_level_measurement is initialize
automatically by default.

* Make function xls/xlsx format aware

* cleaned not needed imports

* Added a basic test

* Fix a bug with extension search

* Fix when adding water lvl meas to project

The dataset size were not expanded to receive the data, so in the end,
no data was added to the dataset.

* init requirements file

* Added tests to test management of wl meas.

* Added a simple test for HydroCalc init

* Extended test coverture

* Updated coverall badge and link to roadmap

* Fixed and reworked filt_data code (#109)

* PR: Small GUI improvements of the Page and Figure Setup Dialog window. (#111)

* Improved layout and code style of PageSetupWin
* Make radiobuttons to align to the right

* Changed the version number for the release

* Work on the figures and document structure

* Completed the Color setup section

* Completed section Page and Figure Setup

* Completed the manual measurements section

* Moved import data in its own chapter

* Added text and reordered the authors

* Changed copyrights to GWHAT Documentation Contributors

* Writing Manage Data section

* Corrected a small format typo

* New image with annoted dataset manager panel

* updated the dialog scs to show actual data

* Working on the text

* Working on the text.

* First draft of section Importing Data

* Reworked section Managing Data

* Still working on the Plotting the Hydrograph section

* Fixed a wrong link

* Added instruction for zoom in and out of the fig canvas

* Moved the water lvl meas file

* Work on the docs

* Components water level and Missing Data

* Changed the color of the text

* Work-in-progress comp. air temp.

* Finished the first draft of Plotting the Hydrographs section

* Completed writing the Plotting the Hydrograph sec!

* Some corrections to section Manage Data

* Revision "Data Management in GWHAT"

* Revision "Plotting the Hydrographs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants