Skip to content

Refactor text to use virtualfile_from_data - #1121

Merged
seisman merged 14 commits into
mainfrom
refactor-text
May 22, 2022
Merged

Refactor text to use virtualfile_from_data#1121
seisman merged 14 commits into
mainfrom
refactor-text

Conversation

@seisman

@seismanseisman commented Mar 25, 2021

Copy link
Copy Markdown
Member

Description of proposed changes

  • Refactor text to use virtualfile_from_data
  • Raise exceptions for invalid inputs
  • Add more tests for invalid inputs

Related to #949.

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@seismanseisman changed the title WIP: Refactor text to use virtual_from_dataRefactor text to use virtual_from_dataMar 25, 2021
@seisman
seisman marked this pull request as ready for review March 25, 2021 06:39
@seismanseisman changed the title Refactor text to use virtual_from_dataRefactor text to use virtualfile_from_dataMar 25, 2021
@seismanseisman added the maintenance Boring but important stuff for the core devs label Mar 26, 2021
@seismanseisman added this to the 0.4.0 milestone Mar 26, 2021
@seismanseisman self-assigned this Mar 26, 2021

@maxrjonesmaxrjones left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me. I only had a couple small comments.

Comment threadpygmt/src/text.py Outdated
kwargs["t"] = ""

# Append text as the last column
# text must be in str type, see issue #706

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should be fixed now, correct?

Suggested change
# text must be in str type, see issue #706

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

text must be in str type

This statement is still True.

Comment threadpygmt/src/text.py
Comment threadpygmt/src/text.py Outdated
Comment threadpygmt/tests/test_text.py
@seisman

Copy link
Copy Markdown
MemberAuthor

Thanks for your suggestions. I'll mark this PR as draft, because I don't like the current implemention.

@seismanseisman added this to the 0.7.0 milestone Mar 18, 2022
Comment threadpygmt/src/text.py Outdated
seismanand others added 2 commits May 14, 2022 18:10
Co-authored-by: Max Jones <meghanj@alum.mit.edu>
@seisman
seisman marked this pull request as ready for review May 14, 2022 10:33

@weiji14weiji14 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Had a quick glance and can't see any major issues with this refactor. Is there anything else remaining you want to work on here @seisman?

Comment threadpygmt/src/text.py Outdated
Comment threadpygmt/src/text.py Outdated
@seisman

Copy link
Copy Markdown
MemberAuthor

Is there anything else remaining you want to work on here?

I plan to not make more reactors in this PR to make it easier to review.

@weiji14weiji14 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks ok to me. Sugest @meghanrjones (or someone else) to give this another review since it's been over a year since they approved this PR!

@weiji14weiji14 added the final review call This PR requires final review and approval from a second reviewer label May 16, 2022
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
@seisman

Copy link
Copy Markdown
MemberAuthor

Ping @meghanrjones to give this PR a final review.

@seismanseisman removed the final review call This PR requires final review and approval from a second reviewer label May 22, 2022
@seisman
seisman merged commit ed591a3 into mainMay 22, 2022
@seisman
seisman deleted the refactor-text branch May 22, 2022 06:25
@maxrjones

Copy link
Copy Markdown
Member

Sorry for not getting back to this in time to be helpful

@seisman

Copy link
Copy Markdown
MemberAuthor

No worries. You can still leave your comments if there are any 😄

sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
Co-authored-by: Max Jones <meghanj@alum.mit.edu>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
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 devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@seisman@maxrjones@weiji14@core-man