dstl / Stone-Soup

A software project to provide the target tracking community with a framework for the development and testing of tracking algorithms.
https://stonesoup.rtfd.io
MIT License
412 stars 139 forks source link

Undocumented backwards incompatibility in version 0.1b8 #631

Closed eXceediDeaL closed 2 years ago

eXceediDeaL commented 2 years ago

Hello, I found that the most recent version 0.1b8 of stonesoup probably introduces some breaking changes, which are not recorded in release notes.

  1. EuclideanWeighted is not accessible from module stonesoup.metricgenerator.tracktotruthmetrics.
  2. SingleProbabilityHypothesis is not accessible from module stonesoup.dataassociator.neighbour.
  3. StateMutableSequence is not accessible from module stonesoup.types.prediction and stonesoup.types.update.
  4. Function _from_state, which is used in many Prediction subclasses' from_state methods, has been removed from module stonesoup.types.prediction and stonesoup.types.update.

To make it easier to understand the impact of the breaking changes, I write a short code snippet that reproduces the breaking changes. The following code runs well in 0.1b7 but gets crashed in 0.1b8.

from stonesoup.metricgenerator.tracktotruthmetrics import EuclideanWeighted
from stonesoup.dataassociator.neighbour import SingleProbabilityHypothesis
from stonesoup.types.prediction import StateMutableSequence, _from_state
from stonesoup.types.update import StateMutableSequence, _from_state

Maybe recording these changes in release notes helps to avoid user confusion during updating this version?

Kind regrads,

@eXceediDeaL

sdhiscocks commented 2 years ago

Thanks @eXceediDeaL. The classes being import don't originate from those modules, so wouldn't recommend importing them from there. Not sure how to avoid that. Also _from_state is a private method (as indicated by leading _) so shouldn't really be used.