Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1f32a7c
Check passing pyarrow.array with string type to pygmt.text
weiji14 Dec 30, 2023
4c4e064
Check passing pyarrow.array with string type to virtualfile_from_vectors
weiji14 Dec 30, 2023
07fbca6
Merge branch 'main' into pyarrow/string
weiji14 Oct 11, 2024
d379e46
Enable passing pyarrow.StringArray to clib.Session.put_strings
weiji14 Oct 11, 2024
cfda386
Use "string" instead of pyarrow.string() in case pyarrow not installed
weiji14 Oct 11, 2024
0a6cda5
Try to fix type hints
weiji14 Oct 11, 2024
f59f93c
Add np.ndarray to StringArrayTypes and fix/ignore remaining type errors
weiji14 Oct 11, 2024
757da24
Merge branch 'main' into pyarrow/string
weiji14 Oct 11, 2024
17c1e9c
Move StringArrayTypes to pygmt/_typing.py
weiji14 Oct 11, 2024
0105d64
Add pyarrow to docs CI
weiji14 Oct 11, 2024
3ad0c86
Use np.asarray to convert pa.StringArray instead of .to_pylist()
weiji14 Oct 11, 2024
4bea288
Update note to say that PyArrow string types are now supported
weiji14 Oct 11, 2024
371174a
Add back pytest.mark.benchmark marker
weiji14 Oct 11, 2024
b588730
Add intersphinx link for pyarrow
weiji14 Oct 11, 2024
faf2065
Apply suggestions from code review
weiji14 Nov 6, 2024
b2efbb4
Merge branch 'main' into pyarrow/string
weiji14 Nov 6, 2024
9fd77dc
format
weiji14 Nov 6, 2024
ccf4eff
Merge branch 'main' into pyarrow/string
weiji14 Nov 7, 2024
44d01ed
Merge branch 'main' into pyarrow/string
weiji14 Nov 15, 2024
a927202
Revert "Enable passing pyarrow.StringArray to clib.Session.put_strings"
weiji14 Nov 15, 2024
7b00248
Reduce diff from messy revert handling
weiji14 Nov 15, 2024
7dc353b
Revert support of pyarrow.array inputs to put_strings
weiji14 Nov 15, 2024
ce76152
Remove StringArrayTypes type hint
weiji14 Nov 15, 2024
ef431af
Revert "Remove StringArrayTypes type hint"
weiji14 Nov 15, 2024
acaf350
Improve type-hint of text parameter in pygmt.Figure.text
weiji14 Nov 15, 2024
6ad6eb9
Move pa.array parametrizations to another file
weiji14 Nov 15, 2024
d88accd
Pass a tuple of vectors to virtualfile_from_vectors
weiji14 Nov 15, 2024
265132e
Move skip_if_no and pyarrow import to test_clib_virtualfile_from_vectors
weiji14 Nov 15, 2024
edb3438
The text argument can be None
weiji14 Nov 15, 2024
8172102
Simplify to remove getattr(pa, "array", None) call
weiji14 Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove StringArrayTypes type hint
Reverts 0a6cda5, f59f93c, and 17c1e9c
  • Loading branch information
weiji14 committed Nov 15, 2024
commit ce761520995677a5193007a4502fdb438ed2680a
10 changes: 0 additions & 10 deletions pygmt/_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
Type aliases for type hints.
"""

import contextlib
import importlib
from collections.abc import Sequence
from typing import Literal

import numpy as np

# Anchor codes
AnchorCode = Literal["TL", "TC", "TR", "ML", "MC", "MR", "BL", "BC", "BR"]

# String array types
StringArrayTypes = Sequence[str] | np.ndarray
with contextlib.suppress(ImportError):
StringArrayTypes |= importlib.import_module(name="pyarrow").StringArray