Skip to content

Update click==8.2 #1485

Description

@Flix6x

Some CLI tests are still failing locally, which aren't covered in our pipeline:

pytest -k cli
Results (44.56s):
      28 passed
      21 failed
         - flexmeasures/cli/tests/test_data_add.py:27 test_add_annotation
         - flexmeasures/cli/tests/test_data_add.py:63 test_add_holidays
         - flexmeasures/cli/tests/test_data_add.py:344 test_add_process[INFLEXIBLE]
         - flexmeasures/cli/tests/test_data_add.py:344 test_add_process[SHIFTABLE]
         - flexmeasures/cli/tests/test_data_add.py:344 test_add_process[BREAKABLE]
         - flexmeasures/cli/tests/test_data_add.py:385 test_add_sensor[PT20M-ONE-True]
         - flexmeasures/cli/tests/test_data_add.py:385 test_add_sensor[15-TWO-True]
         - flexmeasures/cli/tests/test_data_add.py:452 test_add_storage_schedule[sensor-sensor]
         - flexmeasures/cli/tests/test_data_add.py:452 test_add_storage_schedule[sensor-quantity]
         - flexmeasures/cli/tests/test_data_add.py:452 test_add_storage_schedule[sensor-None]
         - flexmeasures/cli/tests/test_data_add.py:452 test_add_storage_schedule[quantity-sensor]
         - flexmeasures/cli/tests/test_data_add.py:452 test_add_storage_schedule[quantity-quantity]
         - flexmeasures/cli/tests/test_data_add.py:452 test_add_storage_schedule[quantity-None]
         - flexmeasures/cli/tests/test_data_add.py:452 test_add_storage_schedule[None-sensor]
         - flexmeasures/cli/tests/test_data_add.py:452 test_add_storage_schedule[None-quantity]
         - flexmeasures/cli/tests/test_data_add.py:452 test_add_storage_schedule[None-None]
         - flexmeasures/cli/tests/test_data_edit.py:14 test_add_one_sensor_attribute
         - flexmeasures/cli/tests/test_data_edit.py:49 test_update_one_asset_attribute
         - flexmeasures/cli/tests/test_data_edit.py:77 test_resample_sensor_data[-]
         - flexmeasures/cli/tests/test_data_edit.py:77 test_resample_sensor_data[2021-03-28 15:00:00+00:00-2021-03-28 16:00:00+00:00]
         - flexmeasures/cli/tests/test_data_show.py:95 test_plot_beliefs
     790 deselected

One of the errors

flexmeasures/flexmeasures/cli/utils.py", line 92, in process
    if opt in deprecated:
<Result TypeError("argument of type 'bool' is not iterable")>

Related

Click change notes, and this one in particular seems related to the above error:

  • deprecated: bool | str can now be used on options and arguments. This previously was only available for Command. The message can now also be customised by using a str instead of a bool. #2263 #2271

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions