Skip to content

Commit

Permalink
Make the source code PEP8 compliant.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdawson committed Feb 26, 2016
1 parent 634e1ba commit 3a88d0b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions lib/windspharm/standard.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Spherical harmonic vector wind computations."""
# Copyright (c) 2012-2014 Andrew Dawson
# Copyright (c) 2012-2016 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -56,7 +56,7 @@ def __init__(self, u, v, gridtype='regular'):
`~windspharm.tools.get_recovery`,
`~windspharm.tools.reverse_latdim`,
`~windspharm.tools.order_latdim`.
**Examples:**
Initialize a `VectorWind` instance with zonal and meridional
Expand Down
8 changes: 4 additions & 4 deletions lib/windspharm/tests/test_error_handling.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Tests for error handling in `windspharm`."""
# Copyright (c) 2012-2013 Andrew Dawson
# Copyright (c) 2012-2016 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -42,7 +42,7 @@ def setup_class(cls):
raise SkipTest(skip_message.format(cls.interface))


#-----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Tests for the standard interface


Expand Down Expand Up @@ -140,7 +140,7 @@ def test_gradient_invalid_shape(self):
uchi, vchi = vw.gradient(solution['chi'][:-1])


#-----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Tests for the cdms interface


Expand Down Expand Up @@ -206,7 +206,7 @@ def test_gradient_unknown_grid(self):
uchi, vchi = vw.gradient(solution['chi'])


#-----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Tests for the iris interface


Expand Down
13 changes: 7 additions & 6 deletions lib/windspharm/tests/test_solution.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Test windspharm computations against reference solutions."""
# Copyright (c) 2012-2014 Andrew Dawson
# Copyright (c) 2012-2016 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -147,7 +147,7 @@ def test_truncate(self):
0., places=5)


#-----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Tests for the standard interface


Expand Down Expand Up @@ -193,12 +193,12 @@ class TestStandardMultiTime(StandardSolutionTest):

@classmethod
def modify_solution(cls):
repeater = lambda a: a[..., np.newaxis].repeat(5, axis=-1)
for field_name in cls.solution:
cls.solution[field_name] = repeater(cls.solution[field_name])
cls.solution[field_name] = \
cls.solution[field_name][..., np.newaxis].repeat(5, axis=-1)


#-----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Tests for the CDMS interface


Expand All @@ -225,6 +225,7 @@ def modify_solution(cls):
for field_name in cls.solution:
cls.solution[field_name] = cls.solution[field_name].reorder('xy')


class TestCDMSInvertedLatitude(CDMSSolutionTest):
gridtype = 'regular'

Expand All @@ -241,7 +242,7 @@ def unmodify_solution(cls):
cls.solution[field_name](latitude=(90, -90))


#-----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Tests for the Iris interface


Expand Down
4 changes: 2 additions & 2 deletions lib/windspharm/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
(or indeed `spharm.Spharmt`).
"""
# Copyright (c) 2012-2013 Andrew Dawson
# Copyright (c) 2012-2016 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -275,7 +275,7 @@ def order_latdim(latdim, u, v, axis=0):
*axis*
Index of the latitude dimension in the zonal and meridional wind
components. Defaults to 0 (the first dimension).
**Returns:**
*latdimr*
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Build and install the windspharm package."""
# Copyright (c) 2012-2014 Andrew Dawson
# Copyright (c) 2012-2016 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -26,7 +26,7 @@

packages = ['windspharm',
'windspharm.examples',
'windspharm.tests' ]
'windspharm.tests']

package_data = {
'windspharm.examples': ['example_data/*'],
Expand All @@ -44,6 +44,6 @@
geometry using spherical harmonics
""",
packages=packages,
package_dir={'':'lib'},
package_dir={'': 'lib'},
package_data=package_data,
install_requires=['numpy', 'pyspharm >= 1.0.8'],)

0 comments on commit 3a88d0b

Please sign in to comment.