Skip to content

Commit

Permalink
Merge pull request #98 from MDAnalysis/prep-rel-060
Browse files Browse the repository at this point in the history
finalize for 0.6.0
  • Loading branch information
orbeckst authored Oct 10, 2021
2 parents 3f7a17c + 2a4f667 commit 899bc74
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ jobs:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
include:
- os: windows-latest
python-version: 3.7
python-version: 2.7
- os: windows-latest
python-version: 3.9
- os: macos-latest
python-version: 2.7
- os: macos-latest
python-version: 3.9

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -58,7 +64,7 @@ jobs:
- name: run unit tests
run: |
pytest -v --cov=gridData --cov-report=xml ./gridData/tests
pytest -v --cov=gridData --cov-report=xml --color=yes ./gridData/tests
- name: codecov
uses: codecov/codecov-action@v2
Expand Down
11 changes: 8 additions & 3 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@ The rules for this file:
* accompany each entry with github issue/PR number (Issue #xyz)

------------------------------------------------------------------------------
??/??/2019 eloyfelix, renehamburger1993, lilyminium, jvermaas
10/10/2021 eloyfelix, renehamburger1993, lilyminium, jvermaas, xiki-tempula,
IAlibay, orbeckst

* 0.6.0

Changes
* macOS and Windows are also tested (min and max supported Python, #97)
* switched CI to using GitHub actions (#86)

Enhancements

* Allow parsing/writing gzipped DX files
* Allow parsing/writing gzipped DX files (PR #70, #99)
* Update doc theme to use sphinx-rtd-theme (#80)
* Delta of OpenDX writes 7 significant figures (#89)
* Delta of OpenDX writes 7 significant figures (#88)

Fixes

Expand Down
13 changes: 12 additions & 1 deletion gridData/OpenDX.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,17 @@

import warnings

# Python 2/3 compatibility (see issue #99)
# and https://bugs.python.org/issue30012
import sys
if sys.version_info >= (3, ):
def _gzip_open(filename, mode="rt"):
return gzip.open(filename, mode)
else:
def _gzip_open(filename, mode="rt"):
return gzip.open(filename)
del sys

class DXclass(object):
"""'class' object as defined by OpenDX"""
def __init__(self,classid):
Expand Down Expand Up @@ -707,7 +718,7 @@ def parse(self, DXfield):
self.tokens = [] # token buffer

if self.filename.endswith('.gz'):
with gzip.open(self.filename, 'rt') as self.dxfile:
with _gzip_open(self.filename, 'rt') as self.dxfile:
self.use_parser('general')
else:
with open(self.filename, 'r') as self.dxfile:
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
cmdclass=versioneer.get_cmdclass(),
description="Reading and writing of data on regular grids in Python",
long_description=long_description,
long_description_content_type="text/x-rst",
author="Oliver Beckstein",
author_email="[email protected]",
license="LGPLv3",
Expand Down

0 comments on commit 899bc74

Please sign in to comment.