Skip to content

Commit d964d3d

Browse files
author
Bas Hoonhout
committed
Prepared for PyPI
1 parent fb7c6bb commit d964d3d

8 files changed

Lines changed: 140 additions & 9 deletions

File tree

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Bas Hoonhout, Deltares
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

MANIFEST.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Include the license file
2+
include LICENSE.txt
3+
4+
# Include the data files
5+
recursive-include data *
6+
7+
# Include the example files
8+
recursive-include notebooks *

README.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22

33
[![CircleCI](https://circleci.com/gh/openearth/oceanwaves-python.svg?style=svg)](https://circleci.com/gh/openearth/oceanwaves-python)
44

5-
This toolbox provides a generic data storage object for ocean waves data (OceanWaves). OceanWaves is built upon the [xarray.Dataset](http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html) data storage object, but defines special variables for time, location, frequency and direction. Many of its functionalities are obtained from the [pyswan](https://github.com/openearth/pyswan) toolbox, originally developed by Gerben de Boer, and the [swantools](https://pypi.python.org/pypi/swantools) toolbox, originally developed by Caio Eadi Stringari.
5+
This toolbox provides a generic data storage object for ocean waves
6+
data (OceanWaves). OceanWaves is built upon the
7+
[xarray.Dataset](http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html)
8+
data storage object, but defines special variables for time, location,
9+
frequency and direction. Many of its functionalities are obtained from
10+
the [pyswan](https://github.com/openearth/pyswan) toolbox, originally
11+
developed by Gerben de Boer, and the
12+
[swantools](https://pypi.python.org/pypi/swantools) toolbox,
13+
originally developed by Caio Eadi Stringari.
614

715
The OceanWaves object supports various standard conversions, like:
816
* From significant wave height to spectral
@@ -17,18 +25,26 @@ The OceanWaves object supports various standard conversions, like:
1725
The OceanWaves object supports various standard plotting methods, like:
1826
* Polar subplots for directional data on multiple locations/times
1927
* Polar subplots on a map
20-
* Plots supported by [xarray.Dataset](http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html) and [Seaborn](http://seaborn.pydata.org)
28+
* Plots supported by
29+
[xarray.Dataset](http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html)
30+
and [Seaborn](http://seaborn.pydata.org)
2131

2232
The OceanWaves object can be instantiated from:
2333
* Raw data
2434
* SWaN 1D/2D spectral or table files
25-
* An [xarray.Dataset](http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html) object
35+
* An
36+
[xarray.Dataset](http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html)
37+
object
2638
* Another OceanWaves object
2739

2840
The OceanWaves object can be written to:
2941
* SWaN 1D/2D spectral files
30-
* Output supported by [xarray.Dataset](http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html) (e.g. netcdf)
42+
* Output supported by
43+
[xarray.Dataset](http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html)
44+
(e.g. netcdf)
3145

32-
Usage examples can be found in the IPython notebook [notebooks/oceanwaves.ipynb](https://github.com/openearth/oceanwaves-python/blob/master/notebooks/oceanwaves.ipynb).
46+
Usage examples can be found in the IPython notebook
47+
[notebooks/oceanwaves.ipynb](https://github.com/openearth/oceanwaves-python/blob/master/notebooks/oceanwaves.ipynb).
3348

34-
Source code documentation is hosted at http://oceanwaves.readthedocs.io/
49+
Source code documentation is hosted at
50+
http://oceanwaves.readthedocs.io/

README.rst

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
oceanwaves
2+
==========
3+
4+
This toolbox provides a generic data storage object for ocean waves
5+
data (OceanWaves). OceanWaves is built upon the `xarray.Dataset
6+
<http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html>`_
7+
data storage object, but defines special variables for time, location,
8+
frequency and direction. Many of its functionalities are obtained from
9+
the `pyswan <https://github.com/openearth/pyswan>`_ toolbox,
10+
originally developed by Gerben de Boer, and the `swantools
11+
<https://pypi.python.org/pypi/swantools>`_ toolbox, originally
12+
developed by Caio Eadi Stringari.
13+
14+
The OceanWaves object supports various standard conversions, like:
15+
16+
* From significant wave height to spectral
17+
* From omnidirectional to directional
18+
* From directional to omnidirectional
19+
* From spectral to significant wave height
20+
* From spectral to spectral wave period
21+
* From spectral to peak wave period
22+
* From directional to peak wave direction
23+
* From degrees to radians
24+
25+
The OceanWaves object supports various standard plotting methods, like:
26+
27+
* Polar subplots for directional data on multiple locations/times
28+
* Polar subplots on a map
29+
* Plots supported by `xarray.Dataset
30+
<http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html>`_
31+
and `Seaborn <http://seaborn.pydata.org>`_
32+
33+
The OceanWaves object can be instantiated from:
34+
35+
* Raw data
36+
* SWaN 1D/2D spectral or table files
37+
* An `xarray.Dataset
38+
<http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html>`_
39+
object
40+
* Another OceanWaves object
41+
42+
The OceanWaves object can be written to:
43+
44+
* SWaN 1D/2D spectral files
45+
* Output supported by `xarray.Dataset
46+
<http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html>`_
47+
(e.g. netcdf)
48+
49+
Usage examples can be found in the IPython notebook
50+
`notebooks/oceanwaves.ipynb
51+
<https://github.com/openearth/oceanwaves-python/blob/master/notebooks/oceanwaves.ipynb>`_.
52+
53+
Source code documentation is hosted at
54+
`http://oceanwaves.readthedocs.io/
55+
<http://oceanwaves.readthedocs.io/>`_

README.txt

Whitespace-only changes.

oceanwaves/swan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,8 @@ def write_data(self):
524524

525525
if E.ndim == 1:
526526
E = E[np.newaxis,:]
527+
D = D[np.newaxis,:]
528+
S = S[np.newaxis,:]
527529

528530
n = E.shape[1]
529531
for i in range(E.shape[0]):

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[bdist_wheel]
2+
universal=1

setup.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,39 @@
22

33
setup(
44
name='oceanwaves',
5-
version='0.0',
5+
version='1.0.0rc1',
66
author='Bas Hoonhout',
77
author_email='bas.hoonhout@deltares.nl',
8-
packages=find_packages(),
8+
url='http://oceanwaves.readthedocs.io/',
9+
license='MIT',
910
description='A toolbox for ocean wave datasets',
10-
long_description=open('README.txt').read(),
11+
long_description=open('README.rst').read(),
12+
classifiers=[
13+
'Development Status :: 4 - Beta',
14+
'Environment :: Console',
15+
'Intended Audience :: Developers',
16+
'Intended Audience :: Science/Research',
17+
'License :: OSI Approved :: MIT License',
18+
'Natural Language :: English',
19+
'Operating System :: MacOS :: MacOS X',
20+
'Operating System :: Microsoft :: Windows',
21+
'Operating System :: POSIX',
22+
'Operating System :: Unix',
23+
'Programming Language :: Python :: 2.7',
24+
'Programming Language :: Python :: 3',
25+
'Programming Language :: Python :: 3.2',
26+
'Programming Language :: Python :: 3.3',
27+
'Programming Language :: Python :: 3.4',
28+
'Programming Language :: Python :: 3.5',
29+
'Programming Language :: Python :: 3.6',
30+
'Programming Language :: Python :: 3.7',
31+
'Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator',
32+
'Topic :: Scientific/Engineering :: Physics',
33+
'Topic :: Scientific/Engineering :: Visualization',
34+
],
35+
keywords=['ocean waves oceanwaves swan waverider wavedroid xarray'],
36+
packages=find_packages(exclude=['docs', 'data', 'notebooks', 'tests', 'cover']),
37+
python_requires='>=2.7, <4',
1138
install_requires=[
1239
'docopt',
1340
'pyproj',

0 commit comments

Comments
 (0)