-
Notifications
You must be signed in to change notification settings - Fork 75
Implement soft delay extension #264
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
Conversation
0abc0cf to
240e9a7
Compare
|
Regarding the failing sequence tests, you can set the environment variable SAVE_EXPECTED=1 and run pytest to locally rewrite the .seq files. This will automatically pass the write tests, but then allows you to do a diff with the previous .seq files (e.g. git diff, or make a copy of the .seq files first). Then if you manually verify that the change of IDs is expected, commit the new .seq files. I know manually checking this is a bit of a pain, but I think aiming for a exact match of the .seq files is a good standard, better safe than sorry. |
|
I think this is ready for testing, but there are several things that may require polishing.
|
|
@fzimmermann89 @FrankZijlstra I had a crack at making Another way to approach this is to make use of the Also, I did not remove |
|
@fzimmermann89 @FrankZijlstra I think this is the only thing left before the v1.5.0 release. Let me know if you have any further comments. I know it is not perfect, but one option to be just merge this and see if folks use it and have any bug reports on it. Since this is pretty much decoupled from the rest of the code, it should be okay. |
|
I think it would be okay to merge it with a few minor changes:
|
…or report from get_default_soft_delay_values
|
…re_label_softdelay sequence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I refactored the code quite a lot trying to take all previous comments into account. You can see a summary of all my changes using the GitHub comparison functionality:
The most important changes are:
- Simplified API: Made numID optional with automatic assignment based on hint order
- Complete documentation: Added comprehensive docstrings with examples and mathematical explanations
- Robust validation: Improved error messages and parameter validation (including all whitespace types)
- Comprehensive testing: Added 14 test functions covering edge cases and boundary conditions
- Better examples: Created simple beginner example + improved complex example documentation
- Code cleanup: Removed broken functions, improved duration handling, cleaner float API separation
Would be great if @btasdelen @FrankZijlstra @mcencini and maybe @fzimmermann89 could have a look at it again.
I am not sure about the soft_delay_simple_example, because it doesn't really fit into the available examples, but still thought it might be helpful. The documentation would probably be a good place for this, but IMO the docu is not the best atm and thus not really used by anyone...
|
@schuenke I reviewed the changes. I think this PR looks pretty good at the moment. I agree I am fine with this being merged if there are no objections. |
|
I added the soft delays to sequence.plot() now. I decided to add it to the RF phase subplot (this is usually pretty empty), but we could also add it to all subplots because soft delay blocks have to be empty anyway. For the duration I use the default duration. This is how it looks for realistic cases with a long and a very short default duration:
What's your opinion on this @btasdelen Edit: here is the code to generate the plot |
|
@schuenke How about this: Shade is on all axes, but annotation is on Phase only. Is just using the delay hint to annotate too ambiguous? Alternative annotation: SD: "TE" |



Work in progress. Effort to implement soft delay extension for file format 1.5.0 compatibility.
TODO:
soft_delayhandling toaddBlock().apply_soft_delay().soft_delayhandling towrite().soft_delayhandling toread().get_default_soft_delay_values()check_timing().soft_delayhandling inseq.plot().register_soft_delay_event()Challenges/Concerns:
.seqfiles do not match. Invesigate/fix.checkTiming()andseq.plot(). What should we do?