Skip to content

Commit 625808f

Browse files
Merge pull request #48 from pygridtools/master
Release 0.7.7
2 parents c65eca5 + 6f03237 commit 625808f

File tree

7 files changed

+82
-73
lines changed

7 files changed

+82
-73
lines changed

.travis.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,36 @@ python:
33
- 2.6
44
- 2.7
55
- 3.3
6+
- 3.4
7+
- 3.5
8+
- 3.6
9+
- 3.6-dev
10+
11+
sudo: required
12+
13+
addons:
14+
hostname: drmaa.travis-ci.org
15+
hosts:
16+
- localhost
17+
- localhost.localdomain
18+
- drmaa.travis-ci.org
19+
620

721
notifications:
822
email: false
923

24+
cache: pip
25+
1026
# Install stuff
11-
virtualenv:
12-
system_site_packages: true
1327
before_install:
1428
- travis/install_sge.sh
15-
- export GRID_MAP_REDIS_PORT=12345
1629
- export SGE_ROOT=/var/lib/gridengine
1730
- export SGE_CELL=default
1831
- export DRMAA_LIBRARY_PATH=/usr/lib/libdrmaa.so.1.0
32+
- pip install --upgrade pip
1933
install:
20-
- pip install python-coveralls --use-mirrors
21-
- pip install nose-cov --use-mirrors
34+
- pip install python-coveralls
35+
- pip install nose-cov
2236
- python setup.py install
2337

2438
# Run test

README.rst

Lines changed: 51 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,80 @@
11
DRMAA Python
22
------------
33

4-
.. image:: https://travis-ci.org/drmaa-python/drmaa-python.png
5-
:target: https://travis-ci.org/drmaa-python/drmaa-python
6-
:alt: Travis build status
4+
.. image:: https://img.shields.io/travis/pygridtools/drmaa-python/stable.svg
5+
:alt: Build status
6+
:target: https://travis-ci.org/pygridtools/drmaa-python
77

8-
.. image:: https://coveralls.io/repos/drmaa-python/drmaa-python/badge.png
9-
:target: https://coveralls.io/r/drmaa-python/drmaa-python
10-
:alt: Test coverage
8+
.. image:: https://img.shields.io/coveralls/pygridtools/drmaa-python/stable.svg
9+
:target: https://coveralls.io/r/pygridtools/drmaa-python
1110

12-
.. image:: https://pypip.in/d/drmaa/badge.png
13-
:target: https://crate.io/packages/drmaa
11+
.. image:: https://img.shields.io/pypi/dm/drmaa.svg
12+
:target: https://warehouse.python.org/project/drmaa/
1413
:alt: PyPI downloads
1514

16-
.. image:: https://pypip.in/v/drmaa/badge.png
17-
:target: https://crate.io/packages/drmaa
15+
.. image:: https://img.shields.io/pypi/v/drmaa.svg
16+
:target: https://warehouse.python.org/project/drmaa/
1817
:alt: Latest version on PyPI
1918

20-
.. image:: https://d2weczhvl823v0.cloudfront.net/drmaa-python/drmaa-python/trend.png
21-
:alt: Bitdeli badge
22-
:target: https://bitdeli.com/free
19+
.. image:: https://img.shields.io/pypi/l/drmaa.svg
20+
:alt: License
2321

2422
`Distributed Resource Management Application API <http://en.wikipedia.org/wiki/DRMAA>`__
2523
(DRMAA) bindings for Python. For more information
26-
`read the docs <http://drmaa-python.readthedocs.org>`__.
24+
`read the docs <http://drmaa-python.readthedocs.org>`__.
25+
26+
If you simply want to run Python functions on a DRMAA-compatible grid, use
27+
`GridMap <https://github.com/pygridtools/gridmap>`__.
2728

2829
Requirements
2930
~~~~~~~~~~~~
3031

3132
- Python 2.6+
3233
- A DRMAA-compatible cluster (e.g., Grid Engine)
3334

34-
License
35-
~~~~~~~
35+
Installation
36+
~~~~~~~~~~~~
3637

37-
- BSD (3 Clause)
38+
To use the DRMAA Python library, you need to install it via ``pip``:
3839

39-
Changelog
40-
~~~~~~~~~
4140

42-
- v0.7.6
41+
.. code-block:: bash
4342
44-
- Fix a typo in ``DictAttribute`` that was causing a crash.
43+
pip install drmaa
4544
46-
- v0.7.5
4745
48-
- Fix an issue where dictionary attributes (like ``jtEnvironment``) could
49-
encounter ``UnicodeDecodeError``s upon assignment.
46+
and then setup any environment variables that are necessary for your particular DRM system.
47+
For SGE, this means ``SGE_ROOT`` and ``SGE_CELL``, which should be set as follows:
5048

51-
- v0.7.4
52-
53-
- Switch to using preferred encoding from ``locale`` module for converting
54-
strings to binary. This should prevent some lingering ``UnicodeEncodeError``
55-
crashes on Python 2.7.
5649

57-
- v0.7.3
50+
.. code-block:: bash
5851
59-
- Fix a couple crashes when certain functions that expect ``str`` were passed
60-
integers.
52+
export SGE_ROOT=/path/to/gridengine
53+
export SGE_CELL=default
6154
62-
- v0.7.2
63-
64-
- Fix a couple inconsistencies with ``str`` vs ``bytes`` in Python 3 in
65-
``drmaa.session``.
66-
67-
- v0.7.1
68-
69-
- Add `Read The Docs documentation <http://drmaa-python.readthedocs.org>`__
70-
- Add ``const`` module identifiers back into package namespace
71-
- Remove ``b`` prefixes from strings inserted into error messages.
72-
73-
- v0.7.0
74-
75-
- String attribute issues with Python 3 have all been resolved, and now each
76-
function that takes a string can handle unicode strings, and returns
77-
unicode strings.
78-
- All code has been updated to use future imports for ``unicode_literals``
79-
and ``print_function``, so we're effectively writing Python 3 code now.
80-
- PEP8 compliance changes all over the place, except those that would break
81-
names required by underlying C DRMAA library.
82-
- Now automatically run unit tests of Travis-CI with SGE, and all tests pass
83-
for Python 2.6, 2.7, and 3.3. SGE is installed using scripts I describe
84-
in `this gist <https://gist.github.com/dan-blanchard/6586533>`__.
85-
- Unit tests are now in a top-level directory instead of a sub-directory
86-
under the drmaa package.
87-
- There is now a `session.py` module that contains most of the code that was
88-
in ``__init__.py`` before, and ``__init__`` just imports things and sets
89-
``__all__`` and ``__version__``, as is typically recommended now.
90-
- Drops support for Python 2.5.
55+
56+
where ``/path/to/gridengine/`` is replaced with the actual path to your Grid Engine installation,
57+
and ``default`` is replaced with your installation's actual cell. The path is typically
58+
``/var/lib/gridengine``.
59+
60+
You will also need access to the ``libdrmaa.so.1.0`` C library, which can often be installed as
61+
part of the ``libdrmaa-dev`` package on most Unixes. Once you have installed that, you may need to
62+
tell DRMAA Python where it is installed by setting the ``DRMAA_LIBRARY_PATH`` environment variable,
63+
if it is not installed in a location that Python usually looks for libraries.
64+
65+
66+
.. code-block:: bash
67+
68+
export DRMAA_LIBRARY_PATH=/usr/lib/libdrmaa.so.1.0
69+
70+
Acknowledgments
71+
~~~~~~~~~~~~~~~
72+
73+
Thank you to `StatPro <http://www.statpro.com/>`__ and
74+
`Educational Testing Service <https://github.com/EducationalTestingService>`__ for
75+
funding the development of DRMAA Python.
76+
77+
Changelog
78+
~~~~~~~~~
79+
80+
`See GitHub releases <https://github.com/drmaa-python/drmaa-python/releases>`__.

drmaa/helpers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,15 @@ def attributes_iterator(attributes):
231231

232232
def adapt_rusage(rusage):
233233
"""
234-
transform a rusage data structure into a dict
234+
Transform a rusage data structure into a dict.
235+
236+
Due to the value possibly containing a equal sign make sure we
237+
limit the splits to only the first occurrence.
235238
"""
236239
rv = dict()
237240
for attr in attributes_iterator(rusage.contents):
238-
k, v = attr.split('=')
241+
242+
k, v = attr.split('=',1)
239243
rv[k] = v
240244
return rv
241245

drmaa/session.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,11 +477,13 @@ def wait(jobId, timeout=-1):
477477
signaled = c_int()
478478
c(drmaa_wifsignaled, byref(signaled), stat)
479479
coredumped = c_int()
480-
c(drmaa_wcoredump, byref(coredumped), stat)
480+
if exited.value == 0:
481+
c(drmaa_wcoredump, byref(coredumped), stat)
481482
exit_status = c_int()
482483
c(drmaa_wexitstatus, byref(exit_status), stat)
483484
term_signal = create_string_buffer(SIGNAL_BUFFER)
484-
c(drmaa_wtermsig, term_signal, sizeof(term_signal), stat)
485+
if signaled.value == 1:
486+
c(drmaa_wtermsig, term_signal, sizeof(term_signal), stat)
485487
return JobInfo(jid_out.value.decode(), bool(exited), bool(signaled),
486488
term_signal.value.decode(), bool(coredumped),
487489
bool(aborted), int(exit_status.value), res_usage)

drmaa/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
:author: Dan Blanchard ([email protected])
2323
'''
2424

25-
__version__ = '0.7.6'
25+
__version__ = '0.7.7'
2626
VERSION = tuple(int(x) for x in __version__.split('.'))

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def readme():
4141
long_description=readme(),
4242
license="BSD",
4343
keywords="python grid hpc drmaa",
44-
url="https://github.com/drmaa-python/drmaa-python",
44+
url="https://github.com/pygridtools/drmaa-python",
4545
tests_require='nose',
4646
test_suite='nose.collector',
4747
classifiers=["Development Status :: 4 - Beta",

travis/install_sge.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# Written by Dan Blanchard ([email protected]), September 2013
66

77
cd travis
8-
sudo sed -i -r "s/^(127.0.0.1\s)(localhost\.localdomain\slocalhost)/\1localhost localhost.localdomain $(hostname) /" /etc/hosts
98
sudo apt-get update -qq
109
echo "gridengine-master shared/gridenginemaster string localhost" | sudo debconf-set-selections
1110
echo "gridengine-master shared/gridenginecell string default" | sudo debconf-set-selections

0 commit comments

Comments
 (0)