Skip to content

Commit

Permalink
update release notes and whitespace for 1.6.0 tag
Browse files Browse the repository at this point in the history
  • Loading branch information
sbailey committed Jul 1, 2016
1 parent b076612 commit ccb7f1a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
Change Log
==========

1.5.1 (unreleased)
1.6.0 (2016-07-01)
------------------

* Fixed some import statements so documentation will build on readthedocs.
* depend.add_dependencies() to add DEPNAM/DEPVER for common DESI dependencies

1.5.0 (2016-06-09)
------------------
Expand Down
2 changes: 1 addition & 1 deletion py/desiutil/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.5.0.dev325'
__version__ = '1.6.0'
12 changes: 6 additions & 6 deletions py/desiutil/depend.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,23 +136,23 @@ def iterdep(header):

def add_dependencies(header, module_names=None):
'''Adds DEPNAMnn, DEPVERnn keywords to header for imported modules
Args:
header : dict-like object, e.g. astropy.io.fits.Header
Options:
module_names : list of module names to check
if None, checks desiutil.depend.possible_dependencies
Only adds the dependency keywords if the module has already been
previously loaded in this python session. Uses module.__version__
if available, otherwise "unknown (/path/to/module/)".
'''
import sys
import importlib

setdep(header, 'python', sys.version.replace('\n', ' '))

if module_names is None:
module_names = possible_dependencies

Expand All @@ -170,7 +170,7 @@ def add_dependencies(header, module_names=None):
version = 'unknown ({})'.format(x.__file__)
else:
version = 'unknown'

setdep(header, module, version)

class Dependencies(object):
Expand Down
3 changes: 1 addition & 2 deletions py/desiutil/test/test_depend.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,13 @@ def test_add_dependencies(self):
add_dependencies(hdr, ['blatbar', 'quatlarm'])
self.assertFalse(hasdep(hdr, 'blatbar'))
self.assertFalse(hasdep(hdr, 'quatlarm'))

#- no .__version__
add_dependencies(hdr, ['os.path', 'sys'])
self.assertTrue(hasdep(hdr, 'os.path'))
self.assertTrue(getdep(hdr, 'os.path').startswith('unknown'))
self.assertTrue(hasdep(hdr, 'sys'))
self.assertTrue(getdep(hdr, 'sys').startswith('unknown'))



if __name__ == '__main__':
Expand Down

0 comments on commit ccb7f1a

Please sign in to comment.