Skip to content

Figure.timestamp: Refactor to use the new alias system - #4012

Merged
seisman merged 3 commits into
mainfrom
refactor/timestamp
Aug 2, 2025
Merged

Figure.timestamp: Refactor to use the new alias system#4012
seisman merged 3 commits into
mainfrom
refactor/timestamp

Conversation

@seisman

@seismanseisman commented Jul 24, 2025

Copy link
Copy Markdown
Member

With the new alias system, the Figure.timestamp method can be simplified.

@seismanseisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Jul 24, 2025
@seismanseisman added this to the 0.17.0 milestone Jul 24, 2025
@seismanseisman changed the title Figure.timestamp: Refactor using the new alias systemWIP: Figure.timestamp: Refactor using the new alias systemJul 26, 2025
Base automatically changed from AliasSystem/aliassystem to mainJuly 29, 2025 04:09
@seisman
seismanforce-pushed the refactor/timestamp branch from f31ab3c to a2989b9CompareJuly 29, 2025 04:28
@seismanseisman changed the title WIP: Figure.timestamp: Refactor using the new alias systemFigure.timestamp: Refactor using the new alias systemJul 29, 2025
@seismanseisman added the needs review This PR has higher priority and needs review. label Jul 29, 2025
@seisman
seisman marked this pull request as ready for review July 29, 2025 05:04
@seisman
seismanforce-pushed the refactor/timestamp branch 2 times, most recently from c305455 to 2f442feCompareJuly 29, 2025 05:30
@seisman
seisman requested a review from CopilotJuly 29, 2025 05:30

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the Figure.timestamp method to use PyGMT's new alias system instead of the previous manual argument building approach. The refactor simplifies the code by leveraging structured alias definitions for parameter handling.

  • Replaces manual dictionary building and string concatenation with the new AliasSystem and Alias classes
  • Improves error message clarity for the text parameter length validation
  • Consolidates GMT version compatibility workarounds with better documentation

Comment threadpygmt/src/timestamp.py
Comment threadpygmt/src/timestamp.py Outdated
@seisman
seismanforce-pushed the refactor/timestamp branch 3 times, most recently from e818b30 to d78c9ffCompareJuly 31, 2025 06:41
@seisman
seismanforce-pushed the refactor/timestamp branch from d78c9ff to a038b80CompareJuly 31, 2025 08:38
@seismanseisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Jul 31, 2025
@seismanseisman changed the title Figure.timestamp: Refactor using the new alias systemFigure.timestamp: Refactor to use the new alias systemAug 1, 2025
@seismanseisman removed the final review call This PR requires final review and approval from a second reviewer label Aug 2, 2025
@seisman
seisman merged commit e490616 into mainAug 2, 2025
21 of 24 checks passed
@seisman
seisman deleted the refactor/timestamp branch August 2, 2025 03:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenanceBoring but important stuff for the core devsskip-changelogSkip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@seisman