Skip to content

refactor: remove deprecated interfaces [ready for review]#312

Merged
sebastianpfischer merged 3 commits into
eclipse-kiso-testing:masterfrom
flo117:remove_deprecated_interface
Nov 22, 2023
Merged

refactor: remove deprecated interfaces [ready for review]#312
sebastianpfischer merged 3 commits into
eclipse-kiso-testing:masterfrom
flo117:remove_deprecated_interface

Conversation

@flo117
Copy link
Copy Markdown
Contributor

@flo117 flo117 commented Jun 19, 2023

AuxiliaryCommon, MpAuxiliaryInterface, SimpleAuxiliaryInterface and AuxiliaryInterface have been removed. DTAuxiliaryInterface has been renamed to AuxiliaryInterface

@flo117
Copy link
Copy Markdown
Contributor Author

flo117 commented Jun 19, 2023

Removal of MpAuxiliaryInterface shall be discussed in next sync meeting.

@sebastianpfischer
Copy link
Copy Markdown
Contributor

The review may take ages.... 45 files to review ^^

@BKaDamien
Copy link
Copy Markdown
Contributor

AuxiliaryCommon, MpAuxiliaryInterface, SimpleAuxiliaryInterface and AuxiliaryInterface have been removed. DTAuxiliaryInterface has been renamed to AuxiliaryInterface

You maybe add some additionnal breaking changes by changing DTAuxiliaryInterface to AuxiliaryInterface. For any reason if a user want to use the interface for typehint, the merge of this branch will break the user's code.
I don't understand the renaming

Comment thread src/pykiso/interfaces/dt_auxiliary.py Outdated
Comment thread src/pykiso/test_setup/dynamic_loader.py Outdated
Comment thread docs/advanced_usage/how_to_auxiliary.rst Outdated
Comment thread src/pykiso/test_setup/dynamic_loader.py Outdated
@flo117 flo117 force-pushed the remove_deprecated_interface branch from 785f542 to 00323c1 Compare July 3, 2023 09:35
@flo117 flo117 requested review from BKaDamien and sebclrsn July 3, 2023 09:49
Comment thread docs/advanced_usage/how_to_auxiliary.rst
@flo117 flo117 requested a review from BKaDamien July 3, 2023 12:29
Comment thread src/pykiso/auxiliary.py
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would have expected the AuxiliaryInterface to be implemented here now, just like the Connector and CChannel interfaces

The dt_auxiliary module would then only contain the DTAuxiliaryInterface which will raise a warning

Comment thread src/pykiso/lib/auxiliaries/proxy_auxiliary.py Outdated
@flo117 flo117 requested a review from sebclrsn July 14, 2023 07:56
active polling.
Note1: the data will automatically be saved
Note2: if proxy usage, all connectors should be 'CCMpProxy'
Note2: if proxy usage, all connectors should be 'CCProxy'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Didn't see that one... We'll still need to enable multiprocessing for this auxiliary, maybe by giving the possibility to see the Queue class of the CCProxy (queue.Queue or multiprocessing.Queue)

log.internal_debug(f"called create_instance on {name}")
#################################################################################
elif not inst.is_instance and auto_start:
if not inst.is_instance and auto_start:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As all auxiliaries now inherit from the same interface, we could remove the method existence check above and below to just do:

if not inst.is_instance and auto_start:
    inst.start()

config["connectors"]["channel1"]["config"]["processing"] = True
cc_class = CCMpProxy
aux_class = MpProxyAuxiliary
cc_class = CCProxy
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should also be updated in config_registry.py

Copy link
Copy Markdown
Contributor

@sebclrsn sebclrsn left a comment

Choose a reason for hiding this comment

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

Still some open points to clarify, either we merge this and tackle the leftover issues afterwards or we include them in this PR

@flo117 flo117 requested review from BKaDamien and sebclrsn August 14, 2023 09:04
@sebclrsn sebclrsn requested review from Pog3k and sebclrsn and removed request for sebclrsn August 14, 2023 09:05
Comment thread src/pykiso/auxiliary.py Outdated
Comment on lines 11 to 19
Double Threaded based Auxiliary Interface
*****************************************

:module: auxiliary

:synopsis: base auxiliary interface
:synopsis: common double threaded based auxiliary interface

.. currentmodule:: pykiso

"""
Copy link
Copy Markdown
Contributor

@sebclrsn sebclrsn Aug 14, 2023

Choose a reason for hiding this comment

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

Auxiliary common Interface Definition
*****************************************

:module: auxiliary
:synopsis: base auxiliary interface

.. currentmodule:: pykiso
"""

I think we can keep the original docstring

@sebclrsn
Copy link
Copy Markdown
Contributor

Just be careful when dealing with the merge conflicts to include the latest changes in the DTAuxiliaryInterface :)

Comment thread docs/auxiliary_interfaces/index.rst
self.multiprocess = multiprocess
self.cursor = 0
self.log_folder_path = log_folder_path
self.multiprocess = multiprocess
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we keep it here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

in line 143 it is checked if the channel is a CCProxy and if multiprocess was set to true.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I still do not understand, we removed the multiprocessing, why not removing it from here too? What is the UC?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@flo117 , do you have an update for here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, sorry for late reply. It would lead to a breaking change in the cchannel, in which the user can select multiprocessing

Comment thread src/pykiso/lib/robot_framework/aux_interface.py Outdated
Comment thread src/pykiso/test_coordinator/test_case.py Outdated
Comment thread src/pykiso/test_coordinator/test_suite.py Outdated
self.multiprocess = multiprocess
self.cursor = 0
self.log_folder_path = log_folder_path
self.multiprocess = multiprocess
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@flo117 , do you have an update for here?

@sebastianpfischer
Copy link
Copy Markdown
Contributor

@flo117 , how are we doing here :)

@flo117 flo117 force-pushed the remove_deprecated_interface branch 2 times, most recently from e39f7e7 to c83f1bd Compare October 11, 2023 12:09
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0a2685e) 97.11% compared to head (00b1f48) 96.98%.
Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #312      +/-   ##
==========================================
- Coverage   97.11%   96.98%   -0.14%     
==========================================
  Files          85       81       -4     
  Lines        6866     6426     -440     
==========================================
- Hits         6668     6232     -436     
+ Misses        198      194       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@flo117
Copy link
Copy Markdown
Contributor Author

flo117 commented Oct 11, 2023

@flo117 , how are we doing here :)

i removed all multiprocessing and done a rebase

@flo117 flo117 force-pushed the remove_deprecated_interface branch from 542e2f0 to 00b1f48 Compare November 8, 2023 14:01
@sebastianpfischer sebastianpfischer merged commit 61e219e into eclipse-kiso-testing:master Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants