Skip to content

Commit 7f2f533

Browse files
committed
Squashed commit of the following:
commit 2938538 Author: Christian Schwarz <[email protected]> Date: Thu Sep 12 16:38:05 2013 +0200 fixed test issues commit c73a326 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 22:13:29 2013 +0100 new version commit c79dec8 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 22:10:25 2013 +0100 beautification commit 6b85338 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 22:06:08 2013 +0100 increased test coverage commit 94edf74 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 21:56:47 2013 +0100 import cleanup commit 30de4bc Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 21:55:31 2013 +0100 copyright update commit c13ee4b Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 21:49:12 2013 +0100 working on integration: MeanSignedDifferenceError commit 564916a Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 21:31:23 2013 +0100 added simple version of a weighted MAPE commit 0a4211d Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 21:24:41 2013 +0100 cleaned up import commit 733ab75 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 21:24:21 2013 +0100 todo commit e26f812 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 21:22:39 2013 +0100 branch is running again… now the reintegration should start commit b72f9c1 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 21:09:27 2013 +0100 ... commit 62cf9e9 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 21:08:47 2013 +0100 ... commit 74b06f8 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 21:08:08 2013 +0100 ... commit 0f4506b Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 21:07:52 2013 +0100 ... commit 140c5bb Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 21:04:13 2013 +0100 comment commit d707075 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 20:53:52 2013 +0100 commented unintegrated stuff commit ea317d8 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 20:52:58 2013 +0100 ….. commit ae481f3 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 20:51:46 2013 +0100 … commit 00580e0 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 20:50:20 2013 +0100 fixing…. commit 9730f84 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 20:48:50 2013 +0100 applied stash commit f8b9149 Author: Christian Schwarz <[email protected]> Date: Fri Mar 15 20:45:23 2013 +0100 reintegrating external branch commit eb589f8 Author: Christian Schwarz <[email protected]> Date: Wed Jan 23 18:35:19 2013 +0100 commented test commit 018dc85 Author: Christian Schwarz <[email protected]> Date: Wed Jan 23 18:32:15 2013 +0100 - added missing tests commit d88dda8 Author: Christian Schwarz <[email protected]> Date: Wed Jan 23 18:31:48 2013 +0100 - added features from external branch commit dbf104c Author: Christian Schwarz <[email protected]> Date: Wed Jan 23 18:24:11 2013 +0100 cleanup commit a21691b Author: Christian Schwarz <[email protected]> Date: Fri Jan 11 14:10:16 2013 -0800 minor change commit 54b4148 Author: Christian Schwarz <[email protected]> Date: Fri Jan 11 14:10:00 2013 -0800 minor change
1 parent 367687b commit 7f2f533

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1282
-314
lines changed

CHANGES.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
v0.1.4-alpha, 2013-03-15 -- reintegration of external project branch started
12
v0.1.3-alpha, 2012-12-19 -- Implemented @optimized and created basic example for implementing and integrating C(++) based methods in pycast
23
v0.1.2-alpha, 2012-11-29 -- unifying information for package release
34
v0.1.1-alpha, 2012-11-29 -- setup script finalized

LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2012 Christian Schwarz
1+
Copyright (c) 2012-2013 Christian Schwarz
22

33
Permission is hereby granted, free of charge, to any person obtaining
44
a copy of this software and associated documentation files (the

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on time series data.
77

88
License
99
-------
10-
Copyright (c) 2012 Christian Schwarz
10+
Copyright (c) 2012-2013 Christian Schwarz
1111

1212
Permission is hereby granted, free of charge, to any person obtaining
1313
a copy of this software and associated documentation files (the

bin/helper/generate-bindings.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
pycastC_optimization = pycastC.add_cpp_namespace("optimization")
3434

3535
## pycast.errors
36-
pycastC_errors.add_include('"pycast/errors/baseerrormeasure.h"')
36+
pycastC_errors.add_include('"pycast/errors/opt/baseerrormeasure.h"')
3737
pycastC_errors_baseerrormeasure = pycastC_errors.add_cpp_namespace("baseerrormeasure")
3838
pycastC_errors_baseerrormeasure_BaseErrorMeasure = pycastC_errors_baseerrormeasure.add_cpp_namespace("BaseErrorMeasure")
3939

@@ -44,12 +44,6 @@
4444
pybindgen.param("PyObject*", "calculatedTimesSeries", transfer_ownership=False)
4545
])
4646

47-
#pycastC_errors_baseerrormeasure.add_method(
48-
# "local_error", pybindgen.retval("float"),
49-
# [
50-
# pybindgen.param("float", "originalValue"),
51-
# pybindgen.param("float", "calculatedValue")
52-
# ]
53-
#)
5447

48+
## generate :)
5549
pycastC.generate(sys.stdout)

docs/source/conf.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
# General information about the project.
4646
project = u'pycast'
47-
copyright = u'2012, Christian Schwarz'
47+
copyright = u'2012-2013, Christian Schwarz'
4848

4949
# The version info for the project you're documenting, acts as replacement for
5050
# |version| and |release|, also used in various other places throughout the
@@ -53,7 +53,7 @@
5353
# The short X.Y version.
5454
version = '0.1'
5555
# The full version, including alpha/beta/rc tags.
56-
release = 'v0.1.3-alpha'
56+
release = 'v0.1.4-alpha'
5757

5858
# The language for content autogenerated by Sphinx. Refer to documentation
5959
# for a list of supported languages.
@@ -260,7 +260,7 @@ def setup(app):
260260
epub_title = u'pycast'
261261
epub_author = u'Christian Schwarz'
262262
epub_publisher = u'Christian Schwarz'
263-
epub_copyright = u'2012, Christian Schwarz'
263+
epub_copyright = u'2012-2013, Christian Schwarz'
264264

265265
# The language of the text. It defaults to the language option
266266
# or en if the language is not set.

pycast/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: UTF-8 -*-
33

4-
#Copyright (c) 2012 Christian Schwarz
4+
#Copyright (c) 2012-2013 Christian Schwarz
55
#
66
#Permission is hereby granted, free of charge, to any person obtaining
77
#a copy of this software and associated documentation files (the

pycast/common/__init__.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: UTF-8 -*-
33

4-
#Copyright (c) 2012 Christian Schwarz
4+
#Copyright (c) 2012-2013 Christian Schwarz
55
#
66
#Permission is hereby granted, free of charge, to any person obtaining
77
#a copy of this software and associated documentation files (the
@@ -24,6 +24,7 @@
2424

2525
import timeseries
2626

27-
from timeseries import TimeSeries
27+
from timeseries import TimeSeries, MultiDimensionalTimeSeries
2828
from profileme import profileMe
29-
from pycastobject import PyCastObject
29+
from pycastobject import PyCastObject
30+
#from matrix import Matrix, Vector

pycast/common/decorators.py

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: UTF-8 -*-
33

4-
#Copyright (c) 2012 Christian Schwarz
4+
#Copyright (c) 2012-2013 Christian Schwarz
55
#
66
#Permission is hereby granted, free of charge, to any person obtaining
77
#a copy of this software and associated documentation files (the
@@ -21,9 +21,6 @@
2121
#LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2222
#OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
2323
#WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24-
25-
from pycastobject import PyCastObject
26-
2724
def optimized(fn):
2825
"""Decorater that will call the optimized c++ version
2926
of a pycast function if available rather than theo
@@ -46,15 +43,15 @@ def _optimized(self, *args, **kwargs):
4643
:return result of the function call either from pycast or pycastC module.
4744
:rtype: Function
4845
"""
49-
if self.optimization_enabled:
46+
if self.optimizationEnabled:
5047
class_name = self.__class__.__name__
51-
module = self.__module__.replace('pycast', 'pycastC')
48+
module = self.__module__.replace("pycast", "pycastC")
5249
try:
53-
imported = __import__(module+"."+class_name, globals(), locals(), [fn.__name__])
50+
imported = __import__("%s.%s" % (module, class_name), globals(), locals(), [fn.__name__])
5451
function = getattr(imported, fn.__name__)
5552
return function(self, *args, **kwargs)
5653
except ImportError:
57-
print "[WARNING] Could not enable optimization for %s, %s" % (fn.__name__, self)
54+
print "[WARNING] Could not enable optimization for %s, %s" % (fn.__name__, self)
5855
return fn(self, *args, **kwargs)
5956
else:
6057
return fn(self, *args, **kwargs)

pycast/common/helper.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: UTF-8 -*-
33

4-
#Copyright (c) 2012 Christian Schwarz
4+
#Copyright (c) 2012-2013 Christian Schwarz
55
#
66
#Permission is hereby granted, free of charge, to any person obtaining
77
#a copy of this software and associated documentation files (the
@@ -24,9 +24,6 @@
2424

2525
## This module contains helper functions that will be moved later
2626

27-
import time
28-
29-
## @todo define a more general interface!
3027
def linear_interpolation(first, last, steps):
3128
"""Interpolates all missing values using linear interpolation.
3229
@@ -36,6 +33,8 @@ def linear_interpolation(first, last, steps):
3633
3734
:return: Returns a list of floats containing only the missing values.
3835
:rtype: List
36+
37+
:todo: Define a more general interface!
3938
"""
4039
result = []
4140

pycast/common/json_encoder.py

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

426
from pycastobject import PyCastObject
527
class PycastEncoder(json.JSONEncoder, PyCastObject):

pycast/common/profileme.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: UTF-8 -*-
33

4-
#Copyright (c) 2012 Christian Schwarz
4+
#Copyright (c) 2012-2013 Christian Schwarz
55
#
66
#Permission is hereby granted, free of charge, to any person obtaining
77
#a copy of this software and associated documentation files (the
@@ -21,8 +21,6 @@
2121
#LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2222
#OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
2323
#WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24-
import os, sys, datetime
25-
2624
try:
2725
import cProfile as profile
2826
except ImportError: # pragma: no cover

pycast/common/pycastobject.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: UTF-8 -*-
33

4-
#Copyright (c) 2012 Christian Schwarz
4+
#Copyright (c) 2012-2013 Christian Schwarz
55
#
66
#Permission is hereby granted, free of charge, to any person obtaining
77
#a copy of this software and associated documentation files (the
@@ -37,7 +37,7 @@ class PyCastObject(object):
3737
def __init__(self):
3838
"""Initializes the PyCastObject."""
3939
super(PyCastObject, self).__init__()
40-
self.optimization_enabled = False
40+
self.optimizationEnabled = False
4141

4242
if PyCastObject._globalOptimize:
4343
self._enable_instance_optimization()
@@ -48,12 +48,12 @@ def _enable_instance_optimization(self):
4848
:warning: Do not forget to implement the disable_instance_optimization()
4949
as well.
5050
"""
51-
self.optimization_enabled = True
51+
self.optimizationEnabled = True
5252

5353
def _disable_instance_optimization(self):
5454
"""Disables the optimization for the PyCastObject instance.
5555
"""
56-
self.optimization_enabled = False
56+
self.optimizationEnabled = False
5757

5858
@classmethod
5959
def enable_global_optimization(cls):

0 commit comments

Comments
 (0)