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

Fix: public sensors to show #830

Merged
merged 6 commits into from Aug 21, 2023
Merged

Fix: public sensors to show #830

merged 6 commits into from Aug 21, 2023

Conversation

Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Aug 21, 2023

Description

Public asset pages with sensors to show no longer loaded the chart. This PR fixes that. The bug had been introduced in #740.

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x added bug Something isn't working Still Needs Manual Backport labels Aug 21, 2023
@Flix6x Flix6x added this to the 0.15.1 milestone Aug 21, 2023
@Flix6x Flix6x self-assigned this Aug 21, 2023
Copy link
Contributor

@victorgarcia98 victorgarcia98 left a comment

Choose a reason for hiding this comment

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

Thanks!

By the way, skimming the code, I spotted a potential bug:

annotations += self.owner.search_annotations(

If owner can be None, this could fail.

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>
@Flix6x Flix6x merged commit 3c1ca31 into main Aug 21, 2023
5 checks passed
@Flix6x Flix6x deleted the fix/public-sensors-to-show branch August 21, 2023 21:01
victorgarcia98 pushed a commit that referenced this pull request Aug 22, 2023
Fix two bugs dealing with public assets.


* fix: public sensors have None owner

Signed-off-by: F.N. Claessen <felix@seita.nl>

* docs: changelog entry

Signed-off-by: F.N. Claessen <felix@seita.nl>

* fix: searching for annotations on public assets

Signed-off-by: F.N. Claessen <felix@seita.nl>

* refactor: more explicit if-statement

Signed-off-by: F.N. Claessen <felix@seita.nl>

* docs: add second fix to changelog

Signed-off-by: F.N. Claessen <felix@seita.nl>

---------

Signed-off-by: F.N. Claessen <felix@seita.nl>
victorgarcia98 added a commit that referenced this pull request Aug 22, 2023
…ws (#808)

* add CostReporter with tests

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* rename CostReporter to profit reporter

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* improve validation

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* fix comments

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* Add `is_profit` to `ProfitOrLossReporter`

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* Call a `Reporter` saved in the DB via CLI (#818)

* add DataSource field to flexmeasures add report

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add new command to create basic sources for the available reporters.

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* Switch off HiGHS logs for `LOGGING_LEVEL=INFO` (#824)

* add log toggling for HiGHS

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add changelog entry

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

---------

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* rename command + add changelog

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* use for loop in flexmeasures add sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* fix: typo

Signed-off-by: F.N. Claessen <felix@seita.nl>

* refactor: make 'kind' choice singular, so it matches the key in data_generators

Signed-off-by: F.N. Claessen <felix@seita.nl>

* docs: add inline todo

Signed-off-by: F.N. Claessen <felix@seita.nl>

* refactor: get db from where we normally get it

Signed-off-by: F.N. Claessen <felix@seita.nl>

* style: black

Signed-off-by: F.N. Claessen <felix@seita.nl>

---------

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Co-authored-by: F.N. Claessen <felix@seita.nl>

* Make source optional in the input field of the `AggregatorReporter` (#819)

* add DataSource field to flexmeasures add report

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* fix: use source and make it an optional field

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* fix tests

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add test + fix case of multiple sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add new command to create basic sources for the available reporters.

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* set sensor in ouput bdf

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* set resolution

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* update docstring

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add changelog entry

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* rename command + add changelog

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* allow passing multiple sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* extend changelog

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* clarify docstring

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* check sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* use for loop in flexmeasures add sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

---------

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor <victor@seita.nl>

* rename is_profit to profit_is_positive

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* fix: `highs` string is in `solver_name` (#826)

* fix:  `highs` string is in `solve_name` using `in`

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* chore: update changelog

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

---------

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* Fix: public sensors to show (#830)

Fix two bugs dealing with public assets.


* fix: public sensors have None owner

Signed-off-by: F.N. Claessen <felix@seita.nl>

* docs: changelog entry

Signed-off-by: F.N. Claessen <felix@seita.nl>

* fix: searching for annotations on public assets

Signed-off-by: F.N. Claessen <felix@seita.nl>

* refactor: more explicit if-statement

Signed-off-by: F.N. Claessen <felix@seita.nl>

* docs: add second fix to changelog

Signed-off-by: F.N. Claessen <felix@seita.nl>

---------

Signed-off-by: F.N. Claessen <felix@seita.nl>

* add changelog entry

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

---------

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: Victor <victor@seita.nl>
Co-authored-by: F.N. Claessen <felix@seita.nl>
Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Flix6x added a commit that referenced this pull request Aug 25, 2023
Fix two bugs dealing with public assets.

* fix: public sensors have None owner

Signed-off-by: F.N. Claessen <felix@seita.nl>

* docs: changelog entry

Signed-off-by: F.N. Claessen <felix@seita.nl>

* fix: searching for annotations on public assets

Signed-off-by: F.N. Claessen <felix@seita.nl>

* refactor: more explicit if-statement

Signed-off-by: F.N. Claessen <felix@seita.nl>

* docs: add second fix to changelog

Signed-off-by: F.N. Claessen <felix@seita.nl>

---------

Signed-off-by: F.N. Claessen <felix@seita.nl>
victorgarcia98 added a commit that referenced this pull request Aug 25, 2023
* add CostReporter with tests

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* rename CostReporter to profit reporter

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* improve validation

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add DataSource field to flexmeasures add report

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* fix: use source and make it an optional field

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* fix tests

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add test + fix case of multiple sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* Add --id and --show-attributed field to flexmeasures show data-sources.

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add sensors

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add new command to create basic sources for the available reporters.

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* set sensor in ouput bdf

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* set resolution

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add reporter tutorial

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* update docstring

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add changelog entry

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* rename command + add changelog

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* allow passing multiple sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* extend changelog

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* clarify docstring

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* fix comments

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* check sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* use for loop in flexmeasures add sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* Add `is_profit` to `ProfitOrLossReporter`

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* Call a `Reporter` saved in the DB via CLI (#818)

* add DataSource field to flexmeasures add report

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add new command to create basic sources for the available reporters.

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* Switch off HiGHS logs for `LOGGING_LEVEL=INFO` (#824)

* add log toggling for HiGHS

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add changelog entry

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

---------

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* rename command + add changelog

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* use for loop in flexmeasures add sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* fix: typo

Signed-off-by: F.N. Claessen <felix@seita.nl>

* refactor: make 'kind' choice singular, so it matches the key in data_generators

Signed-off-by: F.N. Claessen <felix@seita.nl>

* docs: add inline todo

Signed-off-by: F.N. Claessen <felix@seita.nl>

* refactor: get db from where we normally get it

Signed-off-by: F.N. Claessen <felix@seita.nl>

* style: black

Signed-off-by: F.N. Claessen <felix@seita.nl>

---------

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Co-authored-by: F.N. Claessen <felix@seita.nl>

* fix gramar and typos

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add CLI changelog entry

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* rename kind reporting to reporter

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* expand on the description of the fm add report command

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* rename function create_sensor_asset

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* untitlelize words

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* rename sensor names

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* group data sources by type

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* Make source optional in the input field of the `AggregatorReporter` (#819)

* add DataSource field to flexmeasures add report

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* fix: use source and make it an optional field

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* fix tests

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add test + fix case of multiple sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add new command to create basic sources for the available reporters.

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* set sensor in ouput bdf

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* set resolution

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* update docstring

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add changelog entry

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* rename command + add changelog

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* allow passing multiple sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* extend changelog

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* clarify docstring

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* check sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* use for loop in flexmeasures add sources

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

---------

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor <victor@seita.nl>

* untitlelize sensor names

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* rename is_profit to profit_is_positive

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* fix: `highs` string is in `solver_name` (#826)

* fix:  `highs` string is in `solve_name` using `in`

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* chore: update changelog

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

---------

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* Fix: public sensors to show (#830)

Fix two bugs dealing with public assets.


* fix: public sensors have None owner

Signed-off-by: F.N. Claessen <felix@seita.nl>

* docs: changelog entry

Signed-off-by: F.N. Claessen <felix@seita.nl>

* fix: searching for annotations on public assets

Signed-off-by: F.N. Claessen <felix@seita.nl>

* refactor: more explicit if-statement

Signed-off-by: F.N. Claessen <felix@seita.nl>

* docs: add second fix to changelog

Signed-off-by: F.N. Claessen <felix@seita.nl>

---------

Signed-off-by: F.N. Claessen <felix@seita.nl>

* sort data sources by type

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* move changelog entries to v.0.16.0

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* remove type column

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* use loss_is_positive instead of is_profit

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* grammar and typos

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add link to *Pandas*

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* styling: rephrasings and one more typo

Signed-off-by: F.N. Claessen <felix@seita.nl>

* add new dependency vl-convert-python

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* fix: equal_v out of bound

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* rename Losses to Costs

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* doc change

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* update CLI changelog entry

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add warning message in the tutorial

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add changelog entry

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* add `a to entry

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

* Update toy-example-reporter.rst

small typo

Signed-off-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>

* rename attributes to asset_attributes

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>

---------

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor <victor@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Co-authored-by: F.N. Claessen <felix@seita.nl>
Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants