Skip to content
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

Fixes for using GMT 6.0.0rc1 #311

Merged
merged 3 commits into from
Jun 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
48 changes: 3 additions & 45 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ language: generic
# Use the container builds so we don't need sudo privileges
sudo: false

cache:
directories:
- gmt-master/build

# Only build pushes to the master branch and tags. This avoids the double
# builds than happen when working on a branch instead of a fork.
branches:
Expand All @@ -18,35 +14,6 @@ branches:
# Regex to build tagged commits with version numbers
- /\d+\.\d+(\.\d+)?(\S*)?$/

# Set the Ubuntu version for the Linux builds
dist: xenial

# GMT dependencies for the Linux and OSX builds
addons:
apt:
packages:
- cmake
- build-essential
- ninja-build
- libcurl4-gnutls-dev
- libnetcdf-dev
- libgdal-dev
- libfftw3-dev
- libpcre3-dev
- liblapack-dev
- ghostscript
- curl
homebrew:
packages:
- cmake
- ninja
- netcdf
- gdal
- fftw
- pcre2
- ghostscript
- curl

# Define environment variables common to all builds
env:
global:
Expand All @@ -56,15 +23,11 @@ env:
# TWINE_PASSWORD to deploy to PyPI
- secure: "md4fgPt9RC/sCoN5//5PcNHLUd9gWQGewV5hFpWW88MRTjxTng1Zfs8r7SqlF2AkEEepFfyzq0BEe9c3FMAnFbec3KmqdlQen4V8xDbLrcTlvkPlTrYGbAScUvdhhqojB//hMHoTD4KvxAv9CiUwFBO4hCMmj2buWHUbV9Ksu5WCW9mF/gkt/hIuYAU6Mbwt8PiYyMgUpzMHO1vruofcWRaVnvKwmBqHB0ae86D4/drpwn4CWjlM12WUnphT2bssiyPkw24FZtCN6kPVta6bLZKBxu0bZpw2vbXuUG+Yh19Q4mp8wNYT3XSHJf8Hl5LfujF48+cLWu+6rlCkdcelyVylhWLFc3rGOONAv4G8jWW2yNSz/bLQfJnMpd81fQEu5eySmFxB7mdB0uyKpvIG1jMJQ73LlYKakKLAPdYhMFyQAHoX9gvCE3S4QR95DBMi5gM/pZubOCcMLdjPHB5JKpJHSjxbOzyVwgmsUIEgd5Bi2vZvvYQXn1plk4xpQ3PhXc+/gi33bzY89mKcfOn0HJ2pD1vLqDXRCBsMCakoLZ0JB/6bacaz4FngbsGWuQ+I1cz20lJGL/MSi9bW1G7Uoidt3GXXWDmXrWt70vIXlLIxr8XV0Mu/rPbauGgWE+ZSYEfvdM5sP+FNF7vQ5de+Fkvzg5Z3tTfR+O1W+d7+vM4="
- TWINE_USERNAME=Leonardo.Uieda
# Paths for GMT installation
- INSTALLDIR="$HOME/gmt-install-dir"
- COASTLINEDIR="$INSTALLDIR/coast"
- PATH="$INSTALLDIR/bin:$PATH"
- LD_LIBRARY_PATH="$INSTALLDIR/lib:$LD_LIBRARY_PATH"
- GMT_LIBRARY_PATH="$INSTALLDIR/lib"
# The file with the listed requirements to be installed by conda
- CONDA_REQUIREMENTS=requirements.txt
- CONDA_REQUIREMENTS_DEV=requirements-dev.txt
# Enable the development channel so we can get GMT 6.0.0 before it's released
- CONDA_EXTRA_CHANNEL=conda-forge/label/dev
# These variables control which actions are performed in a build
- TEST=false
- CHECK=false
Expand All @@ -78,7 +41,7 @@ matrix:
- name: "Style checks"
os: linux
env:
- PYTHON=3.6
- PYTHON=3.7
- CHECK=true
- CONDA_INSTALL_EXTRA="black flake8 pylint=2.2.2"
- CONDA_REQUIREMENTS=""
Expand Down Expand Up @@ -112,11 +75,6 @@ matrix:
- BUILD_DOCS=true

before_install:
# Build and install GMT from the master branch
- if [ "$TEST" == "true" ]; then
bash helpers/build-gmt-master.sh;
fi
- cd "$TRAVIS_BUILD_DIR"
# Get the Fatiando CI scripts
- git clone --branch=1.1.1 --depth=1 https://github.com/fatiando/continuous-integration.git
# Download and install miniconda and setup dependencies
Expand Down
4 changes: 3 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: pygmt
channels:
- conda-forge
- defaults
- conda-forge/label/dev
dependencies:
- python=3.6
- python=3.7
- pip
- numpy
- pandas
Expand Down
16 changes: 0 additions & 16 deletions helpers/build-gmt-master.sh

This file was deleted.

6 changes: 3 additions & 3 deletions pygmt/clib/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Session:
library in the directory specified by it.

A ``GMTVersionError`` exception will be raised if the GMT shared library reports a
version < 6.0.0.
version < 6.0.0rc1.

The ``session_pointer`` attribute holds a ctypes pointer to the currently open
session.
Expand Down Expand Up @@ -112,7 +112,7 @@ class Session:
"""

# The minimum version of GMT required
required_version = "6.0.0"
required_version = "6.0.0rc1"

@property
def session_pointer(self):
Expand Down Expand Up @@ -177,7 +177,7 @@ def __enter__(self):
if Version(version) < Version(self.required_version):
self.destroy()
raise GMTVersionError(
"Using an incompatible GMT version {}. Must be newer than {}.".format(
"Using an incompatible GMT version {}. Must be equal or newer than {}.".format(
version, self.required_version
)
)
Expand Down
2 changes: 1 addition & 1 deletion pygmt/tests/test_clib.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ def test_get_default():
with clib.Session() as lib:
assert lib.get_default("API_GRID_LAYOUT") in ["rows", "columns"]
assert int(lib.get_default("API_CORES")) >= 1
assert Version(lib.get_default("API_VERSION")) >= Version("6.0.0")
assert Version(lib.get_default("API_VERSION")) >= Version("6.0.0rc1")


def test_get_default_fails():
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The following are required for development purposes
# Requirements for development using conda
ipython
matplotlib
jupyter
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Requirements for installing with conda
gmt=6.0.0rc1
numpy
pandas
xarray
Expand Down