Skip to content

ENH: TraceFileConvert Can Export Relative Times#174

Merged
zdomke merged 4 commits into
ui_redesignfrom
zdomke/export-relative-times
Jul 18, 2025
Merged

ENH: TraceFileConvert Can Export Relative Times#174
zdomke merged 4 commits into
ui_redesignfrom
zdomke/export-relative-times

Conversation

@zdomke

@zdomke zdomke commented Jul 3, 2025

Copy link
Copy Markdown
Collaborator

Description

Before this PR, if a user enabled autoscrolling and then saved the file, the x-range timespan was only saved as absolute times. This is not what the user would expect and would be unhelpful when loading a file.

This PR will allow TraceFileConvert to export the timespan as a relative time. This relative time will be in the right format to enable autoscroll when a user imports the given file.

Motivation

Closes #122
Closes Jira ticket: SWAPPS-50

Example output:

"time_axis": {
"name": "Main Time Axis",
"start": "-1M -10H -5m",
"end": "now",
"location": "bottom"
}

@zdomke zdomke added this to the Trace 1.5 milestone Jul 3, 2025
@zdomke zdomke requested a review from a team July 3, 2025 18:27
@zdomke zdomke self-assigned this Jul 3, 2025
@zdomke zdomke added bug Something isn't working enhancement New feature or request labels Jul 3, 2025
@zdomke zdomke linked an issue Jul 3, 2025 that may be closed by this pull request
@zdomke

zdomke commented Jul 3, 2025

Copy link
Copy Markdown
Collaborator Author

Ran into a problem caused by having trace_file_convert.py import another Trace file. I removed this import and moved all functionality back into the TraceFileConverter class.

I'd prefer to to import IOTimeParser and make use of IOTimeParser.time_re. I'd also prefer that TraceConverterFile.delta_to_relative was actually a method in IOTimeParser. Maybe these changes can be implemented if Trace's imports get fixed.

@YektaY YektaY left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good to me

@zdomke zdomke merged commit cccc3db into ui_redesign Jul 18, 2025
1 check passed
@zdomke zdomke deleted the zdomke/export-relative-times branch July 18, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] - X-Axis range export for relative times

2 participants