-
Notifications
You must be signed in to change notification settings - Fork 77
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
Dynamic paths with emhass config dict, some mlforcaster error suppression #247
Dynamic paths with emhass config dict, some mlforcaster error suppression #247
Conversation
The pytests are failing with (I believe) @davidusb-geek, If you could have a look over this at some point that would be amazing. (ex. Check I didn't place the wrong directory) |
Looks like there are a few more issues then I first realized. Unfortunately Its difficult to understand the current pytest errors.
Error, the randomly pops up
.+ the test_main_publish_data error. |
This may be related to the current errors of DST change |
I'm still trying to understand the changes proposed in this PR... |
@GeoDerp hopefully you can help with a current issue that I have relating to paths. |
Pretty much we want to make sure that our passed data_path and config_path parameters are used throughout EMHASS. Currently there are functions inside of EMHASS that have datapaths set to like: |
pytest wise, just got the
Issue now. Setting the test to:
Resolves that test. I'm just not sure why it was |
Ok yes. I get it. It is a good idea to have a proper path management. |
@GeoDerp Careful with those conflicts with forecast related files. I made some updates this week. You need to git rebase. |
hahah, I just merged them. May be good to look over, Just in case my tiredness didn't make a mistake. |
I just changed this so all tests passed. Feel free to revert. Will be away for a few days. Feel free to have a look/adjust/implement in the mean time. Will defiantly recommend some tests to confirm everything is functional. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #247 +/- ##
==========================================
- Coverage 73.21% 72.88% -0.34%
==========================================
Files 7 7
Lines 2035 2069 +34
==========================================
+ Hits 1490 1508 +18
- Misses 545 561 +16 ☔ View full report in Codecov by Sentry. |
But this is not ready to merge right? |
I wouldn't be confident until I ran some more tests. But I also trust that you can do the same if you like to merge it sooner. |
Having a look over the PR now, will likely be finished tomorrow night. Edit: Tomorrow I'll double check, but it could be good to go. |
Will check over the latest changes tomorrow to confirm everything should be good to go. |
@davidusb-geek , Alright I'm pretty happy with it, I may be missing some functions, the old path system is still used. But, from my testing, I believe everything is functional. Feel free to test yourself and see what you think. The two things I'm unsure about is how well Also have a look at the two places I have reviewed to see if you agree to the warnings/errors. |
Ok it will be merged and tested, probably over the week-end. For those 2 files I can check them, but those are just auxiliary scripts files. |
Will do more checking tomorrow. Here early for progress and help.
Added Dictionary var containing EMHASS paths
emhass_config
dictionary has been created (currently, containingdata
andconfig
paths) to try and add directory structure consistency though the program.Currently, if the
data
path is outside the root EMHASS directory, certain errors may occur from some hard coded paths.emhass_config tried to change this by passing in a dictionary to (I believe) all sub models.
MLForcaster error suppression
Added some more error suppression. (more testing should be done)
MLForcaster wise, I'm still not supper confident with how MLForcaster works. My assumption is, if there is missing data in the sensor, that days worth gets rejected, Causing the "ValueError: All arrays must be of the same length" error. (between
forecast_dates
andforecast_out.
).I have added an if statement to notify the user of the issue, replacing the ValueError. This however doesn't fix the issue.