Skip to content
Snippets Groups Projects

change nxcals query return type to series

Merged Simon Mazenoux requested to merge change_return_type_to_series into dev
3 unresolved threads

I tried to first migrate just pm queries to pd.Series, but it appeared to be more difficult to migrate partially than just migrate everything at once.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    • 531e97b9 - change nxcals query return type to series

    Compare with previous version

  • added 1 commit

    • c2420377 - change nxcals query return type to series

    Compare with previous version

  • 217 217 return unpack_single_element(results)
    218 218
    219 219
    220 def _query_nxcals_by_variables_with_series(
    221 spark: SparkSession,
    222 system: str,
    223 start_time: int | str | datetime,
    224 duration: int | tuple[int, str],
  • 217 217 return unpack_single_element(results)
    218 218
    219 219
    220 def _query_nxcals_by_variables_with_series(
    221 spark: SparkSession,
    222 system: str,
    223 start_time: int | str | datetime,
  • 367 387 max_latest_data_point_search_period,
    368 388 )
    369 if isinstance(variables, list):
    370 return res if isinstance(res, list) else [res]
    371
    372 if isinstance(res, list):
    373 if len(res) > 1:
    374 raise ValueError(
    375 f"Querying NXCALS returned more than one result for the following parameters: "
    376 f"system: CMW, start_time: {start_time}, duration: {duration}, variables: {variables}"
    377 )
    378 return res[0]
    379 return res
    380 389
    381 390
    382 391 @check_arguments_not_none()
  • Andreas Verdoner Barba approved this merge request

    approved this merge request

  • Simone Drysch approved this merge request

    approved this merge request

  • Simon Mazenoux mentioned in commit 010111ed

    mentioned in commit 010111ed

  • Please register or sign in to reply
    Loading