-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FlatTrace: possible points of confusion when editing existing object #126
Comments
@kecnry I'm taking up this issue and was wondering if you had further opinions since your original summary. I'm not familiar with how most people use specreduce, but I think it makes sense to rely on methods on |
I think that's probably fine myself. |
@kecnry Is there any reason to stick with using |
For broader discussion of this problem, see this blog post and its never-ending discussion in the comments. |
After some discussion in #147, it has become clear that this is a more general "problem" than just In general, do we want to support the user setting any attributes across any of the classes (background and extraction included) and have the internal information in those objects update accordingly? Currently in most or maybe all cases, the user technically can change those attributes after initializing the object, but that does not update the internal arrays or results, which causes confusion. We can either make all of those attributes read-only properties that can only be set when initializing or we need to explicitly define the behavior for setting (or disable setting) for each of the attributes (in which case we might want to consider migrating away from dataclass in favor of just defining properties and setters). |
I agree that this should be addressed package-wide and not just in the tracing operations. At first glance, I don't see a problem with our operations' current attributes being read-only after initialization. It might be good to leave space for exceptions in case development takes us in another direction. Is the discussion about the necessity of |
For example, shifting edits the internal trace, but not
trace_pos
, but changes totrace_pos
andtrace
do not affect each other:Updating the trace_pos during a shift (or addition) can be done easily by overloading
Trace.shift
. Do we also want to implement a setter on thetrace_pos
attribute to updatetrace.trace
? What about vice-versa? Or do we maketrace.trace
read-only and require any edits to be by settingtrace_pos
or shifting?The text was updated successfully, but these errors were encountered: