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

Overwrite beliefs #98

Merged
merged 8 commits into from Apr 13, 2021
Merged

Overwrite beliefs #98

merged 8 commits into from Apr 13, 2021

Conversation

Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Apr 11, 2021

Best reviewed in conjunction with SeitaBV/timely-beliefs#56.

@Flix6x Flix6x self-assigned this Apr 11, 2021
@Flix6x Flix6x requested a review from nhoening April 11, 2021 21:21
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, I mainly have one comment about how the user can decide if they want to overwrite. The missing clarity should be addressed in the timely-beliefs PR.

flexmeasures/data/scripts/cli_tasks/data_add.py Outdated Show resolved Hide resolved
flexmeasures/data/models/time_series.py Outdated Show resolved Hide resolved
Data model based on timely beliefs automation moved this from In progress to In review Apr 12, 2021
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more simplification.

@Flix6x Flix6x requested a review from nhoening April 13, 2021 17:31
@Flix6x Flix6x merged commit 1acb57e into cli-csv-upload Apr 13, 2021
Data model based on timely beliefs automation moved this from In review to Done Apr 13, 2021
@Flix6x Flix6x deleted the overwrite-beliefs branch April 13, 2021 20:22
@Flix6x Flix6x added this to the 0.4.0 milestone Apr 16, 2021
Flix6x added a commit that referenced this pull request Apr 16, 2021
Add CLI command to add beliefs from csv, optionally allowing to overwrite existing data.


* Add CLI command to add beliefs from csv

* Refactor if-else block

* Add docstring note about belief timing

* Overwrite beliefs (#98)

* Try tb upsert functionality

* Try to bulk insert without overwrite (faster) before attempting to merge with overwrite (slower)

* Make overwriting data a CLI option

* Copy docstring from tb

* Simplification

* UX improvement

* Add bulk saving as class method option, but not as CLI option; change class method default to not commit transaction

* Update dependency

Co-authored-by: F.N. Claessen <felix@seita.nl>

* Print useful error message if sensor is not found

* Changelog entry

* Move CLI commands to dev-add group

* Update changelog entry

Co-authored-by: F.N. Claessen <felix@seita.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants