Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Udef checks dependencies #1615

Merged
merged 30 commits into from
Jul 22, 2021
Merged

Commits on Jun 1, 2021

  1. add method get_listeners

    catunlock committed Jun 1, 2021
    Configuration menu
    Copy the full SHA
    f2c6dd0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0848e13 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2021

  1. fix remove pydevd debugger

    catunlock committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    d498b1f View commit details
    Browse the repository at this point in the history
  2. improve dependent elements error message

    When delete a element that depens of a motor group a better message for the user is printed.
    catunlock committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    3e9fce8 View commit details
    Browse the repository at this point in the history
  3. improve get_dependent_elements

    now it takes into account if the listeners are from an object instance
    catunlock committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    510f4a3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b28a6fd View commit details
    Browse the repository at this point in the history
  5. remove pydevd

    catunlock committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    35cb86a View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2021

  1. Configuration menu
    Copy the full SHA
    bdf0b53 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2b9359d View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2021

  1. Configuration menu
    Copy the full SHA
    644f9e2 View commit details
    Browse the repository at this point in the history
  2. style: fix PEP8 errors

    reszelaz committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    9929c10 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    011e1a4 View commit details
    Browse the repository at this point in the history
  4. fix: pseudo elements weakref usage

    - Dereference weakrefs stored in PoolBaseChannel._pseudo_elements.
    - Fix PoolBaseChannel.remove_pseudo_element()
    - Fix docstring of PoolBaseChannel.get_pseudo_elements()
    reszelaz committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    4569517 View commit details
    Browse the repository at this point in the history
  5. refactor: do not delete references to element and ctrl in PseudoCounter

    Performing more tests revealed that these references are not problematic
    in order to remove the pseudocounter core object correctly.
    Finally do not delete them.
    reszelaz committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    f22a614 View commit details
    Browse the repository at this point in the history
  6. fix: delete reference to core object in MotorGroup

    Seems like PyTango/Tango keeps alive Device objects after deleting them
    (to be verified). These objects keep reference to the Sardana core objects,
    making it impossible to delete them and affecting the dependency relations.
    Delete reference to the motor_group in order to avoid this problem.
    reszelaz committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    7701e4c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0ba422c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    08cfe48 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    8efa6ac View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    45f38e3 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2021

  1. fix: do not pas meas grp as "head" kwarg to acquisition.prepare()

    "head" kwarg is not used by the acquisition actions and it ends up as strong reference in the
    acquisition sub-actions. This leads to a cycle reference of the measurement group
    and the acquisition actions causing problems when discovering dependent elements
    when deleting an element.
    reszelaz committed Jun 29, 2021
    Configuration menu
    Copy the full SHA
    c9599df View commit details
    Browse the repository at this point in the history
  2. fix: set PoolController.operator as weakref

    Measurement group becomes an operator of the controller during an acquisition and remains
    as operator after. This creates an additional strong reference to the measurement group
    making it impossible to really delete causing troubles when discovering dependent elements
    on an element deletion. Use weakref.ref instead.
    reszelaz committed Jun 29, 2021
    Configuration menu
    Copy the full SHA
    e9a8900 View commit details
    Browse the repository at this point in the history
  3. test: fix order of deleting elements in tearDown()

    When deleting element, no dependent element can exist.
    First delete pseudo element and pseudo controller, and then the physical ones.
    reszelaz committed Jun 29, 2021
    Configuration menu
    Copy the full SHA
    ff95a1e View commit details
    Browse the repository at this point in the history
  4. test: delete motor groups created in some tests

    When deleting an element no dependent elements can exist. Delete the motor groups
    before the physical motors are deleted.
    reszelaz committed Jun 29, 2021
    Configuration menu
    Copy the full SHA
    cf2851d View commit details
    Browse the repository at this point in the history
  5. fix: gc.collect() pseudo counters with cycle references

    Pseudo counters must have cycle references with physical elements.
    This causes problems when deleting elements after prior deletion of pseudo counters.
    This was discovered with the following tests:
    - sardana/macroserver/macros/test/test_scanct.py::AscanctTest::test_ascanct_macro_runs_4
    - sardana/macroserver/macros/test/test_scanct.py::AscanctTest::test_ascanct_macro_stops
    - sardana/macroserver/macros/test/test_scanct.py::A2scanctTest::test_a2scanct_macro_runs
    - sardana/macroserver/macros/test/test_scanct.py::MeshctTest::test_meshct_macro_runs
    - sardana/tango/pool/test/test_measurementgroup.py::TangoAcquisitionTestCase::test_meas_cont_acquisition_2
    - sardana/tango/pool/test/test_measurementgroup.py::TangoAcquisitionTestCase::test_stop_meas_cont_acquisition_3
    - sardana/taurus/core/tango/sardana/test/test_measgrpstress.py::TestStressMeasurementGroup::test_stress_count_2
    - sardana/taurus/core/tango/sardana/test/test_measgrpstress.py::TestStressMeasurementGroup::test_stress_count_3
    - sardana/taurus/core/tango/sardana/test/test_measgrpstress.py::TestStressMeasurementGroup::test_stress_count_4
    - sardana/taurus/core/tango/sardana/test/test_measgrpstress.py::TestStressMeasurementGroup::test_stress_count_6
    
    Force gc.collect() to avoid this problem.
    reszelaz committed Jun 29, 2021
    Configuration menu
    Copy the full SHA
    97a96ee View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2021

  1. refactor: change return type of get_dependent_elements()

    get_dependent_elements() returns only element name. Change the return
    value to return the dependent elements objects in order to extend
    use cases of this method e.g. allow to check the type of the returned
    dependent elements.
    reszelaz committed Jul 20, 2021
    Configuration menu
    Copy the full SHA
    146edfa View commit details
    Browse the repository at this point in the history
  2. call gc.collect() only in case of PseudoCounters

    gc.collect() workaround is tried if any kind of dependent element
    resides in the pool. Call it only in the case of pseudo counters.
    reszelaz committed Jul 20, 2021
    Configuration menu
    Copy the full SHA
    b055e77 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    04f0ecf View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2021

  1. fix: meas group with undefined disabled channel

    Disabled channels in the measurement group are
    considered as not members of the group. They neither appear
    in "element list" attribute nor the measurement group listens to their events.
    Hence it is possible to undefine an experimental channel which is disabled.
    This may lead to a situation when we try to enable again an undefined channel.
    Consider this case by not accepting a configuration which contains
    an undefined element. Also allow to acquire with a measurement group which
    contains and undefined and disabled channel.
    reszelaz committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    6ac7aa6 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2021

  1. add has_dependent_elements() to PoolBaseElement

    PoolElement implements get_dependent_elements() and
    has_dependent_elements() while PoolBaseElement only implements
    get_dependent_elements(). Implement has_dependent_elements() also
    for the PoolBaseElement to be able to use both methods on any type of
    Sardana element.
    reszelaz committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    7f84584 View commit details
    Browse the repository at this point in the history
  2. fix: gc.collect() of dependent elements

    cycle-reference may exist between an element and a traceback
    stored in SardanaValue or SardanaAttribute as a consequence of
    getting sys.exc_info(). Keeping a list of dependent elements in the
    scope of delete_element() makes it impossible to gc.collect() to
    collect the cycled objects. Use has_dependent_elements() in order
    to determine if there are dependent elements and then call the
    gc.collect(). Also, do not call it conditionally only for the pseudo counters
    but for any element type - the cycle may be created for between any
    alement and a traceback.
    reszelaz committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    563e299 View commit details
    Browse the repository at this point in the history