-
Notifications
You must be signed in to change notification settings - Fork 220
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
Refactor the virtualfile_in function to accept more 1-D arrays #2744
Closed
Closed
Changes from 2 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
66c4b97
Refactor the data_kind and the virtualfile_to_data functions
seisman 78c28cd
Update more functions
seisman f849e5a
Merge branch 'main' into refactor/virtualfile-to-data
seisman f37413b
Change ncols to names
seisman 3de7666
Fix more tests
seisman 93b91d0
Fix project
seisman 2eecf48
Merge branch 'main' into refactor/virtualfile-to-data
seisman 1d6e568
Fix more tests
seisman 6f9fc19
Fixes
seisman 68034ed
Merge branch 'main' into refactor/virtualfile-to-data
seisman 0db21bc
Fix triangulate
seisman 7cf5290
Fix text
seisman b0b6d2a
Fix more failing tests
seisman fa875ef
More fixes
seisman 2ee0df2
Fix linting issues
seisman d5c8340
Fix linting issues
seisman 30bacb1
Fix linting issues
seisman 4465f9b
Merge branch 'main' into refactor/virtualfile-to-data
seisman 593f252
Update pygmt/clib/session.py
seisman 409337f
Apply suggestions from code review
seisman 872fd59
Merge branch 'main' into refactor/virtualfile-to-data
seisman 3ed0eb2
Merge branch 'main' into refactor/virtualfile-to-data
seisman efa7a11
Merge branch 'main' into refactor/virtualfile-to-data
seisman 23fc3ea
Merge branch 'main' into refactor/virtualfile-to-data
seisman aa05333
Merge branch 'main' into refactor/virtualfile-to-data
seisman 5c10fc4
Fix plot and plot3d
seisman 525a353
Fix errors in merging the main branch
seisman 2f3fcc4
Merge branch 'main' into refactor/virtualfile-to-data
seisman b55a9ad
Fix merging issue
seisman 46be0fa
Merge branch 'main' into refactor/virtualfile-to-data
seisman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,5 @@ | |
is_nonstr_iter, | ||
launch_external_viewer, | ||
non_ascii_to_octal, | ||
validate_data_input, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think it's more useful to pass the list of column names instead, i.e., replacing
ncols=2
withnames=["x", "y"]
.So, for most modules,
vectors=["x", "y"]
andnames=["x", "y"]
orvectors=[x, y, z]
andnames=["x", "y", "z"]
.For more complicated modules like
plot
orplot3d
, the names can benames=["x", "y", "direction_arg1", "direction_arg2", "fill", "size", "symbol", "transparency"]
.The column names will be very useful when the GMTInvalidInput exception is raised.
For example, instead of
"Column 5 can't be None."
, we can say"Column 5 ('size') can't be None."
. Instead of"data must have at least 8 columns."
, we can sayThere 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.
Done in f37413b