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: Fix water_level_measurements file management and plotting #108

Merged
merged 15 commits into from
Dec 2, 2017

Conversation

jnsebgosselin
Copy link
Owner

@jnsebgosselin jnsebgosselin commented Dec 2, 2017

Fixes #10

The objective of this PR is to make the initialization, editing, and saving of water_level_measurements files more robust.

First of all, the default location for the water_level_measurements file has been changed from the project folder to the Water Levels sub-folder. Moreover, a water_level_measurements.csv file is now initialize every time a project is started if it does not exist. Before initializing, it also check that no file with the same name already exist in the xls or xlsx format.

When loading data from the water_level_measurements, it will do so either from the csv, xls, or xlsx file. The csv format will be preferred if there is more than one file with this name, but with different extension.

Finally, a basic test was added to test the initialization of the HydroPrintGUI class and to check that the water_level_measurements.csv was initialized correctly

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.
Added support for csv and xls file for reading the
water_level_measurement file.
When loading a project, the water_level_measurement is initialize
automatically by default.
@pep8speaks
Copy link

pep8speaks commented Dec 2, 2017

Hello @jnsebgosselin! Thanks for updating the PR.

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

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

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

Comment last updated on December 02, 2017 at 15:43 Hours UTC

@jnsebgosselin jnsebgosselin merged commit 0be84fe into master Dec 2, 2017
@jnsebgosselin jnsebgosselin changed the title PR: Fix water_level_measurements file management PR: Fix water_level_measurements file management and plotting Dec 2, 2017
@jnsebgosselin jnsebgosselin deleted the fix_water_level_meas_format branch December 2, 2017 22:41
jnsebgosselin added a commit that referenced this pull request Dec 4, 2017
* 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
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