-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fake data Issue #354 (#360) #369
Conversation
* Fake data Issue #354 * Fake data Issue #354 * Fake data Issue #354 * Changed relative imports and removed pre-commit from requirements.txt * Using more flexible python3 version to attempt to fix pre-commit.ci build issue * Written new Unit Test for fake forecast with specified GSP ID * Written unit tests for all endpoints/routes and modified gsp.py to support new tests * Removed duplicated Test Cases * 1st test case for fake environment * Fixed accidental activation of fake environment in gsp.py module * Written and tested remaining test cases for is_fake * Moved isintance check to prior to is_fake condition * Added 2 Tests to test_national.py and cleaned up some logic in test_gsp test cases * Modified gsp.py and national.py modules and accompanying test cases to address feedback * Fixed incorrect for loop iteration through list (should be singular ForecastSQL object) to forecasts object in the test_national.py test cases * Modified test cases to use NationalForecastValue, ForecastValue, and the ManyForecasts as the return objects * Modified test cases to uss pytest.fixture() to yield values from db_session * Possible fix for test_read_latest_all_gsp_normalized() and test_read_latest_all_gsp() * 1st experiment for test_read_truth_national_gsp() and test_read_forecast_values_gsp() * 1st experiment with make_fake_gsp_yields() * 2nd experiment with make_fake_gsp_yields() - modified test_gsp routes * 3rd experiment with make_fake_gsp_yields() - modified List Comprehension * 4th experiment with make_fake_gsp_yields() - hard coded _gsp_id_ * Removed yield and fixture * Experiment: Create a separate tests/fake/test_gsp_fake.py test case module
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: src/gsp.py
📄 File: src/national.py (Click to Expand)
Did you find this useful? React with a 👍 or 👎 |
for more information, see https://pre-commit.ci
# Conflicts: # src/tests/test_national.py
Here we go @VikramsDataScience , Would you like review this. You basically did it all, i just tidy up some off test behaviour |
Ah, right. That's wonderful. Thank you, Peter! I guess we're now finally ready to use these cool new features (and just in time for holidays, as well :))? |
@all-contributors please add @VikramsDataScience for code |
I've put up a pull request to add @VikramsDataScience! 🎉 |
Following on from #360 for issue #354
The trick was to change
is_fake
tois_fake()
in the routes. This sovles the tests problems in #360