Skip to content

Commit

Permalink
Merge pull request #141 from biggles-plot/bundle
Browse files Browse the repository at this point in the history
Bundle plotutils
  • Loading branch information
esheldon committed May 25, 2020
2 parents 38421c4 + defee13 commit b78afde
Show file tree
Hide file tree
Showing 571 changed files with 285,190 additions and 623 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: biggles-macos

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: macos-latest
strategy:
matrix:
python-version: [2.7, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system deps
run: |
wget https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg
sudo hdiutil attach XQuartz-2.7.11.dmg
sudo installer -package /Volumes/XQuartz-2.7.11/XQuartz.pkg -target /
brew install ghostscript
- name: pip install deps
run: |
python -m pip install --upgrade pip
pip install numpy
pip install pytest
- name: Install code
run: pip install --no-deps .

- name: Run tests
run: pytest -vv tests
40 changes: 40 additions & 0 deletions .github/workflows/miniconda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: biggles-conda

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: 'ubuntu-latest'

strategy:
matrix:
python-version: [2.7, 3.6, 3.7, 3.8]

steps:

- uses: actions/checkout@v2
- uses: goanpeca/setup-miniconda@v1
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}

- name: Install system deps
run: |
sudo apt update
sudo apt install build-essential libx11-dev libxft-dev libxt-dev libxaw7-dev libpng-dev ghostscript
- name: Conda install deps
shell: bash -l {0}
run: conda install -q -y numpy pytest

- name: Install code
shell: bash -l {0}
run: pip install --no-deps .

- name: Run pytest
shell: bash -l {0}
run: pytest -vv tests
37 changes: 37 additions & 0 deletions .github/workflows/system-python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: biggles-system-python

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system deps
run: |
sudo apt update
sudo apt install build-essential libx11-dev libxft-dev libxt-dev libxaw7-dev libpng-dev ghostscript
- name: pip install deps
python -m pip install --upgrade pip
pip install numpy
pip install pytest

- name: Install code
run: pip install --no-deps .

- name: Run tests
run: pytest -vv tests
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2.0.0
========================

* Bundle plotutils, including fixes for recent libpng
* Fix install instructions in readme (w/ help from MrAureliusR)
* Allow row and col fractions to be sent to Table
* Internal: pass on plot constructor keywords to the base class
* Moved to github actions for CI

1.7.3 (not yet released)
========================

Expand Down
19 changes: 7 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,18 @@ See the full `documentation <http://biggles.readthedocs.io/en/latest/>`_ for mor
Installation
------------

Biggles requires `numpy <http://www.numpy.org/>`_ and GNU `plotutils <http://www.gnu.org/software/plotutils/>`_.

**Macports**::

$ sudo port install plotutils +x11
$ pip install biggles
Biggles requires `numpy <http://www.numpy.org/>`_ libpng, X11 libraries and
ghostscript

**Homebrew**::

$ brew install plotutils --with-x11
$ wget https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg
$ sudo hdiutil attach XQuartz-2.7.11.dmg
$ sudo installer -package /Volumes/XQuartz-2.7.11/XQuartz.pkg -target /
$ brew install ghostscript
$ pip install biggles

**Debian/Ubuntu**::

$ sudo apt-get install libplot-dev plotutils
$ sudo apt install build-essential libx11-dev libxft-dev libxt-dev libxaw7-dev libpng-dev ghostscript
$ pip install biggles

**Windows**

This kind of install is not well tested at the moment. Please report bugs if you find them!
2 changes: 1 addition & 1 deletion biggles/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Boston, MA 02111-1307, USA.
#

__version__ = '1.7.2'
__version__ = '2.0.0'

from .biggles import (
Circle,
Expand Down
4 changes: 2 additions & 2 deletions biggles/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import os
import sys
import io
import confit
from config_base import CONFIG_BASE
from . import confit
from .config_base import CONFIG_BASE

_config = confit.Confit()

Expand Down
18 changes: 11 additions & 7 deletions biggles/confit.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
# Boston, MA 02111-1307, USA.
#

import ConfigParser
try:
from ConfigParser import ConfigParser
except ImportError:
from configparser import ConfigParser


def _atox(x):
Expand Down Expand Up @@ -64,7 +67,7 @@ def _get(self, section, option):
return self._sections[section][option]

def _set(self, section, option, value):
if not self._sections.has_key(section):
if section not in self._sections:
self._sections[section] = {}
self._sections[section][option] = value

Expand All @@ -82,19 +85,20 @@ def get(self, section, option, notfound=None):
return rval

def get_section(self, section):
if not self._sections.has_key(section):
if section not in self._sections:
return None
return self._sections[section]

def set(self, section, option, value):
if self._deprecated.has_key((section, option)):
sect, opt = self._deprecated[(section, option)]
key = (section, option)
if key in self._deprecated:
sect, opt = self._deprecated[key]
self._set(sect, opt, value)
else:
self._set(section, option, value)

def read(self, filename):
cp = ConfigParser.ConfigParser()
cp = ConfigParser()
cp.read(filename)

for section in cp.sections():
Expand All @@ -105,7 +109,7 @@ def read(self, filename):
self.set(section, option, _atox(a))

def readfp(self, fp):
cp = ConfigParser.ConfigParser()
cp = ConfigParser()
cp.readfp(fp)

for section in cp.sections():
Expand Down
1 change: 0 additions & 1 deletion biggles/tests/__init__.py

This file was deleted.

0 comments on commit b78afde

Please sign in to comment.