Skip to content

Commit

Permalink
Bump minimum required GMT from 6.0.0rc5 to 6.0.0 (#363)
Browse files Browse the repository at this point in the history
Set minimum required GMT in our continuous integration scripts and configuration files to use GMT 6.0.0 from the main conda-forge channel. Remove references to conda-forge/label/dev channel and replace gitter with Discourse forum link in some obvious places.
  • Loading branch information
weiji14 authored Nov 2, 2019
1 parent 55de8d5 commit 55af9b6
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 31 deletions.
4 changes: 1 addition & 3 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ jobs:
variables:
CONDA_REQUIREMENTS: requirements.txt
CONDA_REQUIREMENTS_DEV: requirements-dev.txt
CONDA_INSTALL_EXTRA: "codecov gmt=6.0.0rc5"
CONDA_EXTRA_CHANNEL: "conda-forge/label/dev"
CONDA_INSTALL_EXTRA: "codecov gmt=6.0.0"

strategy:
matrix:
Expand Down Expand Up @@ -162,7 +161,6 @@ jobs:
CONDA_REQUIREMENTS: requirements.txt
CONDA_REQUIREMENTS_DEV: requirements-dev.txt
CONDA_INSTALL_EXTRA: "codecov"
CONDA_EXTRA_CHANNEL: "conda-forge/label/dev"

strategy:
matrix:
Expand Down
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ env:
# The file with the listed requirements to be installed by conda
- CONDA_REQUIREMENTS=requirements.txt
- CONDA_REQUIREMENTS_DEV=requirements-dev.txt
- CONDA_INSTALL_EXTRA="codecov twine gmt=6.0.0rc5"
# Enable the development channel so we can get GMT 6.0.0 before it's released
- CONDA_EXTRA_CHANNEL=conda-forge/label/dev
- CONDA_INSTALL_EXTRA="codecov twine gmt=6.0.0"
# These variables control which actions are performed in a build
- DEPLOY=false

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ read it carefully.
## How Can I Talk to You?

Discussion often happens in the issues and pull requests.
In addition, there is a [Gitter chatroom](https://gitter.im/GenericMappingTools/pygmt)
In addition, there is a [Discourse forum](https://forum.generic-mapping-tools.org)
for the project where you can ask questions.


Expand Down
18 changes: 10 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ PyGMT
A Python interface for the Generic Mapping Tools

`Documentation (development version) <https://www.pygmt.org/dev>`__ |
`Contact <https://gitter.im/GenericMappingTools/pygmt>`__
`Contact <https://gitter.im/GenericMappingTools/pygmt>`__ |
`Forum <https://forum.generic-mapping-tools.org>`__ `

.. image:: http://img.shields.io/pypi/v/pygmt.svg?style=flat-square
:alt: Latest version on PyPI
Expand All @@ -27,6 +28,9 @@ PyGMT
.. image:: https://img.shields.io/gitter/room/GenericMappingTools/pygmt.svg?style=flat-square
:alt: Chat room on Gitter
:target: https://gitter.im/GenericMappingTools/pygmt
.. image:: https://img.shields.io/discourse/status?label=forum&server=https%3A%2F%2Fforum.generic-mapping-tools.org%2F&style=flat-square
:alt: Discourse forum
:target: https://forum.generic-mapping-tools.org


.. placeholder-for-doc-index
Expand All @@ -43,8 +47,7 @@ ideas and implement new features. **This is NOT a finished product.**
We welcome any feedback and ideas!
Let us know by submitting
`issues on Github <https://github.com/GenericMappingTools/pygmt/issues>`__
or send us a message on our
`Gitter chatroom <https://gitter.im/GenericMappingTools/pygmt>`__.
or by posting on our `Discourse forum <https://forum.generic-mapping-tools.org>`__.

About
-----
Expand All @@ -54,10 +57,9 @@ publication quality maps and figures. It provides a Pythonic interface for the
`Generic Mapping Tools (GMT) <https://github.com/GenericMappingTools/gmt>`__, a
command-line program widely used in the Earth Sciences.

We rely heavily on new features currently being implemented in GMT. In particular, a new
*modern execution mode* that greatly simplifies figure creation. **These features are
not available in the 5.4 version of GMT**. They will be part of the future 6.0 release
of GMT predicted for early 2019.
We rely heavily on new features that have been implemented in GMT 6.0. In particular,
a new *modern execution mode* that greatly simplifies figure creation. **These features
are not available in the 5.4 version of GMT**.


Project goals
Expand All @@ -78,7 +80,7 @@ Contacting Us
<https://github.com/GenericMappingTools/pygmt>`__. Feel free to `open an issue
<https://github.com/GenericMappingTools/pygmt/issues/new>`__ or comment on any
open issue or pull request.
* We have a `chat room on Gitter <https://gitter.im/GenericMappingTools/pygmt>`__
* We have a `Discourse forum <https://forum.generic-mapping-tools.org>`__
where you can ask questions and leave comments.
* This project is released with a `Contributor Code of Conduct
<https://github.com/GenericMappingTools/pygmt/blob/master/CODE_OF_CONDUCT.md>`__.
Expand Down
19 changes: 8 additions & 11 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Installing
We welcome any feedback and ideas!
Let us know by submitting
`issues on Github <https://github.com/GenericMappingTools/pygmt/issues>`__
or send us a message on our
`Gitter chatroom <https://gitter.im/GenericMappingTools/pygmt>`__.
or by posting on our `Discourse forum <https://forum.generic-mapping-tools.org>`__.


Which Python?
Expand All @@ -29,16 +28,15 @@ doesn't interfere with any other Python installations in your system.
Which GMT?
----------

PyGMT requires GMT 6 as a minimum, which you can find the latest development version
at `this GitHub repository <https://github.com/GenericMappingTools/gmt>`__.
PyGMT requires Generic Mapping Tools (GMT) version 6 as a minimum, which is the latest
released version that can be found at
`this website <https://www.generic-mapping-tools.org>`__.

We need the very latest GMT since there are many changes being made to GMT itself in
response to the development of PyGMT, mainly the new
`modern execution mode <https://gmt.soest.hawaii.edu/projects/gmt/wiki/Modernization>`__.

**GMT 6 has not been officially released yet**, but will be soon!
In the meantime, GMT does provide compiled conda packages of their development version
for Linux, Mac and Windows through
Compiled conda packages of GMT for Linux, Mac and Windows are provided through
`conda-forge <https://anaconda.org/conda-forge/gmt>`__.
Advanced users can also
`build GMT from source <https://github.com/GenericMappingTools/gmt/blob/master/BUILDING.md>`__
Expand Down Expand Up @@ -72,15 +70,14 @@ We recommend working in an isolated
to avoid issues with competing versions of its dependencies.

First, we must configure conda to get packages from the
`conda-forge channel <https://conda-forge.org/>`__ (the order is important)::
`conda-forge channel <https://conda-forge.org/>`__::

conda config --prepend channels conda-forge/label/dev
conda config --prepend channels conda-forge

Now we can create a new conda environment with Python and all our dependencies installed
(we'll call it ``pygmt`` but you can change it to whatever you want)::

conda create --name pygmt python=3.6 pip numpy pandas xarray packaging gmt=6.0.0rc*
conda create --name pygmt python=3.6 pip numpy pandas xarray packaging gmt=6.0.0

Activate the environment by running::

Expand Down Expand Up @@ -139,5 +136,5 @@ You can tell PyGMT exactly where to look for ``libgmt`` by setting the
This should be set to the directory where ``libgmt.so``, ``libgmt.dylib`` or ``gmt.dll``
can be found for Linux, MacOS and Windows respectively.
e.g. in a terminal run::

export GMT_LIBRARY_PATH=$HOME/anaconda3/envs/pygmt/lib
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: pygmt
channels:
- conda-forge
- defaults
- conda-forge/label/dev
dependencies:
- python=3.7
- pip
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"scripts": {
"build:miniconda": "curl -o ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash ~/miniconda.sh -b -p $HOME/miniconda",
"build:pygmt": "conda env create -f environment.yml && source activate pygmt && conda install -c conda-forge -c conda-forge/label/dev -y gmt==6.0.0rc5 && make install",
"build:pygmt": "conda env create -f environment.yml && source activate pygmt && conda install -c conda-forge -y gmt==6.0.0 && make install",
"build:docs": "source activate pygmt && cd doc && make all && mv _build/html ../public",
"build": "export PATH=$HOME/miniconda/bin:$PATH && npm run build:miniconda && npm run build:pygmt && npm run build:docs"
}
Expand Down
4 changes: 2 additions & 2 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.0rc5.
version < 6.0.0.
The ``session_pointer`` attribute holds a ctypes pointer to the currently open
session.
Expand Down Expand Up @@ -111,7 +111,7 @@ class Session:
"""

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

@property
def session_pointer(self):
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.0rc5")
assert Version(lib.get_default("API_VERSION")) >= Version("6.0.0")


def test_get_default_fails():
Expand Down

0 comments on commit 55af9b6

Please sign in to comment.