Skip to content

Commit d1785b7

Browse files
committed
Merge branch 'release/v0.3.3'
2 parents 5112b55 + 33ba26c commit d1785b7

18 files changed

+262
-97
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
# compiled code
1111
*.py[cod]
1212

13-
# C extensions
14-
*.so
15-
1613
# Packages
1714
*.egg
1815
*.egg-info

.travis.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
language: python
2+
3+
matrix:
4+
include:
5+
- os: linux
6+
env:
7+
- PYTHON_VERSION=2.7
8+
- MINICONDA=Miniconda2-latest-Linux-x86_64.sh
9+
10+
- os: linux
11+
env:
12+
- PYTHON_VERSION=3.6
13+
- MINICONDA=Miniconda3-latest-Linux-x86_64.sh
14+
15+
- os: osx
16+
language: generic
17+
env:
18+
- PYTHON_VERSION=2.7
19+
- MINICONDA=Miniconda2-latest-MacOSX-x86_64.sh
20+
21+
- os: osx
22+
language: generic
23+
env:
24+
- PYTHON_VERSION=3.6
25+
- MINICONDA=Miniconda3-latest-MacOSX-x86_64.sh
26+
27+
install:
28+
# download and install miniconda
29+
- wget https://repo.continuum.io/miniconda/$MINICONDA -O miniconda.sh
30+
- bash miniconda.sh -b -p $HOME/miniconda
31+
- export PATH="$HOME/miniconda/bin:$PATH"
32+
- hash -r
33+
- conda config --set always_yes yes --set changeps1 no
34+
- conda update -q conda
35+
36+
# useful for debugging any issues with conda
37+
- conda info -a
38+
39+
# create the conda environment
40+
- conda create -q -n test-env python=$PYTHON_VERSION
41+
- source activate test-env
42+
43+
# build the wheel
44+
- python setup.py bdist_wheel --universal
45+
46+
# install the wheel and its dependencies
47+
- |
48+
for f in dist/SDF-*.whl; do
49+
pip install $f
50+
done
51+
52+
script:
53+
- cd tests
54+
- python -m unittest discover
55+
- cd ..
56+
57+
deploy:
58+
provider: pypi
59+
user: t-sommer
60+
password:
61+
secure: H4EFw/NtTmmFLOB2yjP8d3uqsPDCzG4WV7RbeEu3rRwz39cZxKkBEvBokKYVPo7tLRwWTQjYGbrwOaLME3hBNo0Mjc9d99Ivcy6UTeE4T6AUln//STDOjy2geJnkBCStZ5I21N+bVom6lzT0Oe0EUnJNBQWnJza7EuMSoTdaH3us5Obtc3F1dqbUensdvaUUvZw9Px7lIQ2C1drwgZvh3yArXX8rVAtxq9wpa601G6tKtrwRcgS4v1jAK8p7MJdFVA/9i5ZAXB/L4waE3pv+k52bjFJ9lcaYOwYcxBedqriKYV78q0+VmBn1TfMK0oNEDgg7abVjZwnx17oGvm389BeEFzN7GXX3RsoNNUlcMFXEEaFVuCWwXNG3Sx6HHsz9zyOE6jbhMt1ag4VHZsCoWO/UoXL7jbd46kBIOuixVgkPZlQSP6FA0/jch85940tYtPQXBxldOiwjYyFFUxv/47iTaB0aAt6Elm+2c/dxgDd0jS/FwmGdChrYcjLU8qjy2/ApMps1C2u00nxN6P/OxqbY0fIqgBFHQOsEgEoSe6sGDzPTOtQrsp/3pP3At1KR8czBkTUxWb+5Xa+ObM/qc4Jcy3QAoLRlGIyId9frOpViI/VgM4RpT+i0chaOwY4yFAexkWwGtWST58VKgvnzYTtnTQ/g+fRgFal3NtkEWUo=
62+
distributions: bdist_wheel --universal
63+
skip_cleanup: true

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22

3+
## [0.3.3] (2017-12-13)
4+
5+
### Changed
6+
- Distribution package changed from .tar.gz to .whl (Python Wheel)
37

48
## [0.3.2] (2017-07-09)
9+
510
### Added
611
- Support for Linux and Mac

README.rst

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,80 @@
11
.. image:: https://ci.appveyor.com/api/projects/status/github/ScientificDataFormat/SDF-Python?branch=master
22

3+
34
Scientific Data Format for Python
45
=================================
56

67
SDF is a Python package to read, write and interpolate multi-dimensional data.
7-
The Scientific Data Format is an open file format based on HDF5 to store
8-
multi-dimensional data such as parameters, simulations results or measurements.
8+
The Scientific Data Format is an open file format based on HDF5_ to store
9+
multi-dimensional data such as parameters, simulation results or measurements.
910
It supports...
1011

1112
- very large files
1213
- up to 32 dimensions
1314
- hierarchical structure
1415
- units, comments and custom meta-information
1516

16-
For detailed information see the SDF specification.
17+
For detailed information see the `SDF specification`_.
1718

1819

1920
Installation
2021
------------
2122

22-
Install the latest release from PyPI
23+
To install the latest release from `PyPI <https://pypi.python.org/pypi/sdf/>`_ or update an existing installation::
24+
25+
python -m pip install --upgrade sdf
26+
27+
To install the latest development version::
28+
29+
python -m pip install --upgrade https://github.com/ScientificDataFormat/SDF-Python/archive/develop.zip
30+
31+
32+
Tutorial
33+
--------
34+
35+
Import the ``SDF`` and ``NumPy`` packages:
36+
37+
>>> import sdf
38+
>>> import numpy as np
39+
40+
Create the data arrays:
41+
42+
>>> t = np.linspace(0, 10, 51)
43+
>>> v = np.sin(t)
44+
45+
Create the datasets:
46+
47+
>>> ds_t = sdf.Dataset('t', data=t, unit='s', is_scale=True, display_name='Time')
48+
>>> ds_v = sdf.Dataset('v', data=v, unit='V', scales=[ds_t])
49+
50+
Create the root group and write the file:
51+
52+
>>> g = sdf.Group('/', comment='A sine voltage', datasets=[ds_t, ds_v])
53+
>>> sdf.save('sine.sdf', g)
54+
55+
Read the dataset from the SDF file asserting the correct unit of the dataset and scale:
2356

24-
::
57+
>>> ds_v2 = sdf.load('sine.sdf', '/v', unit='V', scale_units=['s'])
2558

26-
$ sudo pip install sdf
59+
Get the meta info and data array from the dataset:
2760

28-
or install the latest development version from source
61+
>>> ds_v2.unit
62+
'V'
63+
>>> ds_v2.data.shape
64+
(51,)
2965

30-
::
66+
Get the scale for the first dimension:
3167

32-
$ git clone --branch develop --recursive https://github.com/ScientificDataFormat/SDF-Python.git
33-
$ cd SDF-Python
34-
$ sudo pip install .
68+
>>> ds_t2 = ds_v2.scales[0]
69+
>>> ds_t2.unit
70+
's'
3571

3672

3773
-----------------------------
3874

39-
|copy| 2017 Dassault Systèmes
75+
|copyright| 2017 |Dassault Systemes|
4076

41-
.. |copy| unicode:: U+000A9
77+
.. _SDF specification: https://github.com/ScientificDataFormat/SDF
78+
.. _HDF5: https://www.hdfgroup.org/hdf5/
79+
.. |copyright| unicode:: U+000A9
80+
.. |Dassault Systemes| unicode:: Dassault U+0020 Syst U+00E8 mes

appveyor.yml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,42 @@
1-
image: Visual Studio 2015
2-
31
build: false
42

53
environment:
4+
65
matrix:
76
- PYTHON_VERSION: 2.7
87
MINICONDA: C:\Miniconda
9-
- PYTHON_VERSION: 3.4
10-
MINICONDA: C:\Miniconda3
8+
9+
- PYTHON_VERSION: 3.5
10+
MINICONDA: C:\Miniconda35
11+
12+
- PYTHON_VERSION: 2.7
13+
MINICONDA: C:\Miniconda-x64
14+
15+
- PYTHON_VERSION: 3.5
16+
MINICONDA: C:\Miniconda35-x64
1117

1218
init:
13-
- "echo %PYTHON_VERSION% %MINICONDA%"
19+
- echo %PYTHON_VERSION% %MINICONDA%
1420

1521
install:
16-
- cmd: git submodule update --init --recursive
17-
- "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
22+
- git submodule update --init --recursive
23+
- set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%
1824
- conda config --set always_yes yes --set changeps1 no
1925
- conda update -q conda
2026
- conda info -a
21-
- "conda create -q -n test-environment python=%PYTHON_VERSION% numpy h5py matplotlib scipy"
22-
- activate test-environment
23-
- pip install dymat
27+
- conda create -q -n test-env python=%PYTHON_VERSION%
28+
- activate test-env
29+
30+
# build the wheel
31+
- python setup.py bdist_wheel --universal
32+
33+
# install the wheel and its dependencies
34+
- for %%f in (dist\SDF-*.whl) do pip install %%f
2435

2536
test_script:
26-
- build_windows
27-
- pip install .
2837
- cd tests
29-
- python test_sdf.py
38+
- python -m unittest discover
39+
40+
artifacts:
41+
# archive the generated wheel in the build report
42+
- path: dist\*

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ h5py
22
matplotlib
33
numpy
44
xlrd
5-
DyMat
5+
scipy

sdf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from . import hdf5
99

10-
__version__ = '0.3.2'
10+
__version__ = '0.3.3'
1111

1212
_object_name_pattern = re.compile('[a-zA-Z][a-zA-Z0-9_]*')
1313

sdf/darwin64/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

sdf/darwin64/libNDTable.dylib

30 KB
Binary file not shown.

0 commit comments

Comments
 (0)