Skip to content

Commit 2884fd0

Browse files
seismanleouieda
authored andcommitted
Fix more instances of gmt-python to pygmt (#277)
1 parent 63e8959 commit 2884fd0

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ doc/api/generated
1717
.env
1818
MANIFEST
1919
doc/tutorials/first-steps-*
20-
doc/tutorials/gmt-python-*
20+
doc/tutorials/pygmt-*

pygmt/clib/session.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def __enter__(self):
170170
Will destroy the session before raising the exception.
171171
172172
"""
173-
self.create("gmt-python-session")
173+
self.create("pygmt-session")
174174
# Need to store the version info because 'get_default' won't work after the
175175
# session is destroyed.
176176
version = self.info["version"]

pygmt/helpers/tempfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class GMTTempFile:
5757
[0. 0. 0.] [1. 1. 1.] [2. 2. 2.]
5858
"""
5959

60-
def __init__(self, prefix="gmt-python-", suffix=".txt"):
60+
def __init__(self, prefix="pygmt-", suffix=".txt"):
6161
args = dict(prefix=prefix, suffix=suffix, delete=False)
6262
with NamedTemporaryFile(**args) as tmpfile:
6363
self.name = tmpfile.name

pygmt/session_management.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def begin():
1313
Only meant to be used once for creating the global session.
1414
1515
"""
16-
prefix = "gmt-python-session"
16+
prefix = "pygmt-session"
1717
with Session() as lib:
1818
lib.call_module("begin", prefix)
1919

pygmt/tests/test_helpers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ def test_gmttempfile_unique():
5353
def test_gmttempfile_prefix_suffix():
5454
"Make sure the prefix and suffix of temporary files are user specifiable"
5555
with GMTTempFile() as tmpfile:
56-
assert os.path.basename(tmpfile.name).startswith("gmt-python-")
56+
assert os.path.basename(tmpfile.name).startswith("pygmt-")
5757
assert os.path.basename(tmpfile.name).endswith(".txt")
5858
with GMTTempFile(prefix="user-prefix-") as tmpfile:
5959
assert os.path.basename(tmpfile.name).startswith("user-prefix-")
6060
assert os.path.basename(tmpfile.name).endswith(".txt")
6161
with GMTTempFile(suffix=".log") as tmpfile:
62-
assert os.path.basename(tmpfile.name).startswith("gmt-python-")
62+
assert os.path.basename(tmpfile.name).startswith("pygmt-")
6363
assert os.path.basename(tmpfile.name).endswith(".log")
6464
with GMTTempFile(prefix="user-prefix-", suffix=".log") as tmpfile:
6565
assert os.path.basename(tmpfile.name).startswith("user-prefix-")

pygmt/tests/test_session_management.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ def test_begin_end():
1818
lib.call_module("psbasemap", "-R10/70/-3/8 -JX4i/3i -Ba")
1919
end()
2020
begin() # Restart the global session
21-
assert os.path.exists("gmt-python-session.pdf")
22-
os.remove("gmt-python-session.pdf")
21+
assert os.path.exists("pygmt-session.pdf")
22+
os.remove("pygmt-session.pdf")

0 commit comments

Comments
 (0)