-
Notifications
You must be signed in to change notification settings - Fork 38
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
Support pandas 1.4 #525
Merged
Merged
Support pandas 1.4 #525
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Pull Request Test Coverage Report for Build 3436325982
💛 - Coveralls |
nhoening
approved these changes
Nov 6, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Merging into 511 seems like a good idea.
…s' into support-pandas-1.4 # Conflicts: # flexmeasures/data/models/planning/utils.py # flexmeasures/data/services/scheduling.py
…sed keyword argument was used Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
nhoening
added a commit
that referenced
this pull request
Nov 18, 2022
) * Better documentation of flexibility model for storage in endpoint; refactor its parameters and handling within the code for readability Signed-off-by: Nicolas Höning <nicolas@seita.nl> * add changelog entry Signed-off-by: Nicolas Höning <nicolas@seita.nl> * make tests work, include updating older API versions, make prefer_charging_sooner part of storage specs & an optional parameter in API v3 Signed-off-by: Nicolas Höning <nicolas@seita.nl> * use storage_specs in CLI command, as well Signed-off-by: Nicolas Höning <nicolas@seita.nl> * remove default resolution of 15M, for now pass in what you want Signed-off-by: Nicolas Höning <nicolas@seita.nl> * various review comments Signed-off-by: Nicolas Höning <nicolas@seita.nl> * black Signed-off-by: Nicolas Höning <nicolas@seita.nl> * fix tests Signed-off-by: Nicolas Höning <nicolas@seita.nl> * always load sensor when checking storage specs Signed-off-by: Nicolas Höning <nicolas@seita.nl> * begin to handle source model and version during scheduling Signed-off-by: Nicolas Höning <nicolas@seita.nl> * we can get multiple sources from our query (in the old setting, when we use name, but also in the new setting, unless we always include the user_id) Signed-off-by: Nicolas Höning <nicolas@seita.nl> * give our two in-built schedulers an official __author__ and __version__ Signed-off-by: Nicolas Höning <nicolas@seita.nl> * review comments Signed-off-by: Nicolas Höning <nicolas@seita.nl> * refactor getting data source for a job to util function; use the actual data source ID for this lookup if possible Signed-off-by: Nicolas Höning <nicolas@seita.nl> * pass sensor to check_storage_specs, as we always have it already Signed-off-by: Nicolas Höning <nicolas@seita.nl> * wrap Scheduler in classes, unify data source handling a bit more Signed-off-by: Nicolas Höning <nicolas@seita.nl> * Support pandas 1.4 (#525) Add a pandas version check in initialize_index. * Use initialize_series util function Signed-off-by: F.N. Claessen <felix@seita.nl> * Update initialize_index for pandas>=1.4 Signed-off-by: F.N. Claessen <felix@seita.nl> * flake8 Signed-off-by: F.N. Claessen <felix@seita.nl> * Use initialize_index or initialize_series in all places where the closed keyword argument was used Signed-off-by: F.N. Claessen <felix@seita.nl> * flake8 Signed-off-by: F.N. Claessen <felix@seita.nl> * mypy: PEP 484 prohibits implicit Optional Signed-off-by: F.N. Claessen <felix@seita.nl> * black after mypy Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl> * Stop requiring min/max SoC attributes, which have defaults: - Default min = 0 - Default max = the highest target value, or np.nan if there are no targets, which subsequently maps to infinity in our solver Signed-off-by: F.N. Claessen <felix@seita.nl> * Set up device constraint columns for efficiencies in Charge Point scheduler, too Signed-off-by: F.N. Claessen <felix@seita.nl> * Derive flow constraints for battery scheduling, too (copied from Charge Point scheduler) Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor: rename BatteryScheduler to StorageScheduler Signed-off-by: F.N. Claessen <felix@seita.nl> * Warn for deprecation of schedule_battery and schedule_charging_station Signed-off-by: F.N. Claessen <felix@seita.nl> * Use StorageScheduler instead of ChargingStationScheduler Signed-off-by: F.N. Claessen <felix@seita.nl> * Deprecate ChargingStationScheduler Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor: move StorageScheduler to dedicated module Signed-off-by: F.N. Claessen <felix@seita.nl> * Update docstring Signed-off-by: F.N. Claessen <felix@seita.nl> * fix test Signed-off-by: F.N. Claessen <felix@seita.nl> * flake8 Signed-off-by: F.N. Claessen <felix@seita.nl> * Lose the v in version strings; prefer versions showing up as 'version: 3' over 'version: v3'. Even though Scheduler versioning does not necessarily need to follow semantic versioning (see discussion here: semver/semver#235), the v is still redundant. Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor: rename module Signed-off-by: F.N. Claessen <felix@seita.nl> * Deal with empty SoC targets Signed-off-by: F.N. Claessen <felix@seita.nl> * Stop wrapping DataFrame representations in logging Signed-off-by: F.N. Claessen <felix@seita.nl> * Log warning instead of raising UnknownForecastException, and assume zero power values for missing values Signed-off-by: F.N. Claessen <felix@seita.nl> * mention scheduler merging in changelog Signed-off-by: Nicolas Höning <nicolas@seita.nl> * amend existing data source information to reflect our StorageScheduler Signed-off-by: Nicolas Höning <nicolas@seita.nl> * add db upgrade notice to changelog Signed-off-by: Nicolas Höning <nicolas@seita.nl> * more specific downgrade command Signed-off-by: Nicolas Höning <nicolas@seita.nl> Signed-off-by: Nicolas Höning <nicolas@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl> Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com> Co-authored-by: F.N. Claessen <felix@seita.nl>
Flix6x
added a commit
that referenced
this pull request
Nov 21, 2022
Add scheduling test for maximizing self-consumption, and improve time series db queries for fixed tariffs (and other long-term constants). * Better documentation of flexibility model for storage in endpoint; refactor its parameters and handling within the code for readability Signed-off-by: Nicolas Höning <nicolas@seita.nl> * add changelog entry Signed-off-by: Nicolas Höning <nicolas@seita.nl> * make tests work, include updating older API versions, make prefer_charging_sooner part of storage specs & an optional parameter in API v3 Signed-off-by: Nicolas Höning <nicolas@seita.nl> * use storage_specs in CLI command, as well Signed-off-by: Nicolas Höning <nicolas@seita.nl> * remove default resolution of 15M, for now pass in what you want Signed-off-by: Nicolas Höning <nicolas@seita.nl> * various review comments Signed-off-by: Nicolas Höning <nicolas@seita.nl> * black Signed-off-by: Nicolas Höning <nicolas@seita.nl> * fix tests Signed-off-by: Nicolas Höning <nicolas@seita.nl> * always load sensor when checking storage specs Signed-off-by: Nicolas Höning <nicolas@seita.nl> * begin to handle source model and version during scheduling Signed-off-by: Nicolas Höning <nicolas@seita.nl> * we can get multiple sources from our query (in the old setting, when we use name, but also in the new setting, unless we always include the user_id) Signed-off-by: Nicolas Höning <nicolas@seita.nl> * give our two in-built schedulers an official __author__ and __version__ Signed-off-by: Nicolas Höning <nicolas@seita.nl> * review comments Signed-off-by: Nicolas Höning <nicolas@seita.nl> * refactor getting data source for a job to util function; use the actual data source ID for this lookup if possible Signed-off-by: Nicolas Höning <nicolas@seita.nl> * pass sensor to check_storage_specs, as we always have it already Signed-off-by: Nicolas Höning <nicolas@seita.nl> * wrap Scheduler in classes, unify data source handling a bit more Signed-off-by: Nicolas Höning <nicolas@seita.nl> * Support pandas 1.4 (#525) Add a pandas version check in initialize_index. * Use initialize_series util function Signed-off-by: F.N. Claessen <felix@seita.nl> * Update initialize_index for pandas>=1.4 Signed-off-by: F.N. Claessen <felix@seita.nl> * flake8 Signed-off-by: F.N. Claessen <felix@seita.nl> * Use initialize_index or initialize_series in all places where the closed keyword argument was used Signed-off-by: F.N. Claessen <felix@seita.nl> * flake8 Signed-off-by: F.N. Claessen <felix@seita.nl> * mypy: PEP 484 prohibits implicit Optional Signed-off-by: F.N. Claessen <felix@seita.nl> * black after mypy Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl> * Stop requiring min/max SoC attributes, which have defaults: - Default min = 0 - Default max = the highest target value, or np.nan if there are no targets, which subsequently maps to infinity in our solver Signed-off-by: F.N. Claessen <felix@seita.nl> * Set up device constraint columns for efficiencies in Charge Point scheduler, too Signed-off-by: F.N. Claessen <felix@seita.nl> * Derive flow constraints for battery scheduling, too (copied from Charge Point scheduler) Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor: rename BatteryScheduler to StorageScheduler Signed-off-by: F.N. Claessen <felix@seita.nl> * Warn for deprecation of schedule_battery and schedule_charging_station Signed-off-by: F.N. Claessen <felix@seita.nl> * Use StorageScheduler instead of ChargingStationScheduler Signed-off-by: F.N. Claessen <felix@seita.nl> * Deprecate ChargingStationScheduler Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor: move StorageScheduler to dedicated module Signed-off-by: F.N. Claessen <felix@seita.nl> * Update docstring Signed-off-by: F.N. Claessen <felix@seita.nl> * fix test Signed-off-by: F.N. Claessen <felix@seita.nl> * flake8 Signed-off-by: F.N. Claessen <felix@seita.nl> * Lose the v in version strings; prefer versions showing up as 'version: 3' over 'version: v3'. Even though Scheduler versioning does not necessarily need to follow semantic versioning (see discussion here: semver/semver#235), the v is still redundant. Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor: rename module Signed-off-by: F.N. Claessen <felix@seita.nl> * Deal with empty SoC targets Signed-off-by: F.N. Claessen <felix@seita.nl> * Stop wrapping DataFrame representations in logging Signed-off-by: F.N. Claessen <felix@seita.nl> * Log warning instead of raising UnknownForecastException, and assume zero power values for missing values Signed-off-by: F.N. Claessen <felix@seita.nl> * Workaround for GH #484 Signed-off-by: F.N. Claessen <felix@seita.nl> * Test maximizing self-consumption Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor: a single parameterized test instead of 2 tests with a lot of duplicate code Signed-off-by: F.N. Claessen <felix@seita.nl> * Remove debug statements Signed-off-by: F.N. Claessen <felix@seita.nl> * black Signed-off-by: F.N. Claessen <felix@seita.nl> * Correct mistake while refactoring Signed-off-by: F.N. Claessen <felix@seita.nl> * Check default price sensor in both scenarios Signed-off-by: F.N. Claessen <felix@seita.nl> * Expand explanation of optimization context Signed-off-by: F.N. Claessen <felix@seita.nl> * Reorder assertions and add more comments Signed-off-by: F.N. Claessen <felix@seita.nl> * Upgrade timely-beliefs to partly resolve workaround Signed-off-by: F.N. Claessen <felix@seita.nl> * changelog entry Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: Nicolas Höning <nicolas@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl> Co-authored-by: Nicolas Höning <nicolas@seita.nl>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
You've implemented some of this in #511, too. The new part is the pandas version check in
initialize_index
. We may consider merging this with #511 instead of main.