-
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
Cache test data on Azure Pipelines #438
Merged
Merged
Conversation
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
Includes @earth_relief_10m, @earth_relief_60m, @ridge.txt, @Table_5_11.txt , @tut_quakes.ngdc, and @tut_ship.xyz.
So that `gmt` command can be found.
seisman
reviewed
May 20, 2020
seisman
approved these changes
May 20, 2020
Thanks for spotting the $HOMEPATH fix! We're now down to the 3 errors below. Will resolve them in separate Pull Requests to make things easier to review. Merging this in now. ================================== FAILURES ===================================
__________________ [doctest] pygmt.clib.conversion._as_array __________________
221
222 Examples
223 --------
224
225 >>> import pandas as pd
226 >>> x_series = pd.Series(data=[1, 2, 3, 4])
227 >>> x_array = _as_array(x_series)
228 >>> type(x_array)
229 <class 'numpy.ndarray'>
230 >>> x_array
Expected:
array([1, 2, 3, 4])
Got:
array([1, 2, 3, 4], dtype=int64)
C:\Miniconda\envs\testing\Lib\site-packages\pygmt\clib\conversion.py:230: DocTestFailure
___________ [doctest] pygmt.clib.conversion.kwargs_to_ctypes_array ____________
263 Returns
264 -------
265 ctypes_value : ctypes array or None
266
267 Examples
268 --------
269
270 >>> import ctypes as ct
271 >>> value = kwargs_to_ctypes_array('bla', {'bla': [10, 10]}, ct.c_int*2)
272 >>> type(value)
Expected:
<class 'pygmt.clib.conversion.c_int_Array_2'>
Got:
<class 'pygmt.clib.conversion.c_long_Array_2'>
C:\Miniconda\envs\testing\Lib\site-packages\pygmt\clib\conversion.py:272: DocTestFailure
______________________________ test_pygmtscraper ______________________________
@pytest.mark.skipif(sphinx_gallery is None, reason="requires sphinx-gallery")
def test_pygmtscraper():
"Make sure the scraper finds the figures and removes them from the pool."
showed = [fig for fig in SHOWED_FIGURES]
for _ in range(len(SHOWED_FIGURES)):
SHOWED_FIGURES.pop()
try:
fig = Figure()
fig.coast(region="BR", projection="M6i", land="gray", frame=True)
fig.show()
assert len(SHOWED_FIGURES) == 1
assert SHOWED_FIGURES[0] is fig
scraper = PyGMTScraper()
with TemporaryDirectory() as tmpdir:
conf = {"src_dir": "meh"}
fname = os.path.join(tmpdir, "meh.png")
block_vars = {"image_path_iterator": (i for i in [fname])}
assert not os.path.exists(fname)
> scraper(None, block_vars, conf)
C:\Miniconda\envs\testing\Lib\site-packages\pygmt\tests\test_sphinx_gallery.py:36:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\Miniconda\envs\testing\Lib\site-packages\pygmt\sphinx_gallery.py:35: in __call__
return figure_rst(image_names, gallery_conf["src_dir"])
C:\Miniconda\envs\testing\Lib\site-packages\sphinx_gallery\scrapers.py:264: in figure_rst
figure_paths = [os.path.relpath(figure_path, sources_dir)
C:\Miniconda\envs\testing\Lib\site-packages\sphinx_gallery\scrapers.py:264: in <listcomp>
figure_paths = [os.path.relpath(figure_path, sources_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = 'C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\tmpl_p8uqy7\\meh.png'
start = 'meh'
def relpath(path, start=None):
"""Return a relative version of a path"""
path = os.fspath(path)
if isinstance(path, bytes):
sep = b'\\'
curdir = b'.'
pardir = b'..'
else:
sep = '\\'
curdir = '.'
pardir = '..'
if start is None:
start = curdir
if not path:
raise ValueError("no path specified")
start = os.fspath(start)
try:
start_abs = abspath(normpath(start))
path_abs = abspath(normpath(path))
start_drive, start_rest = splitdrive(start_abs)
path_drive, path_rest = splitdrive(path_abs)
if normcase(start_drive) != normcase(path_drive):
> raise ValueError("path is on mount %r, start on mount %r" % (
path_drive, start_drive))
E ValueError: path is on mount 'C:', start on mount 'D:'
C:\Miniconda\envs\testing\lib\ntpath.py:703: ValueError
---------------------------- Captured stderr call -----------------------------
psconvert [ERROR]: Error opening HKLM key
psconvert [ERROR]: Error opening HKLM key
============================== warnings summary ===============================
C:\Miniconda\envs\testing\lib\site-packages\win32\lib\pywintypes.py:2
C:\Miniconda\envs\testing\lib\site-packages\win32\lib\pywintypes.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp, sys, os
-- Docs: https://docs.pytest.org/en/latest/warnings.html
----------- coverage: platform win32, python 3.8.2-final-0 ----------- |
13 tasks
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of proposed changes
Windows builds on Azure Pipelines can't seem to fetch GMT data from http://oceania.generic-mapping-tools.org/, as mentioned in #434 (comment). This Pull Request mimics the upstream GMT one at GenericMappingTools/gmt#3056.
Files we are caching includes:
Fixes #
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.