[Pkg-octave-commit] [SCM] Debian packaging for octave-financial branch, master, updated. 10f9706ef0c719c95b647577b0f9ec3e1b93e6da
Sébastien Villemot
sebastien.villemot at ens.fr
Sun Apr 1 17:29:22 UTC 2012
The following commit has been merged in the master branch:
commit 89418357026dc0d3791d271f9af6a4529c881149
Author: Sébastien Villemot <sebastien.villemot at ens.fr>
Date: Sun Apr 1 19:26:17 2012 +0200
debian/patches/google-stock-fetch.patch: new patch
diff --git a/debian/patches/google-stock-fetch.patch b/debian/patches/google-stock-fetch.patch
new file mode 100644
index 0000000..5e6d43f
--- /dev/null
+++ b/debian/patches/google-stock-fetch.patch
@@ -0,0 +1,48 @@
+Description: Fix several issues in __fetch_google__.m
+ - Strip byte order mark (BOM) from downloaded CSV file
+ - Make sure Google does not return extra historical data in weekly mode
+ - Fix the expected volumes in test for weekly data
+Author: Sébastien Villemot <sebastien.villemot at ens.fr>
+Forwarded: no
+Last-Update: 2012-04-01
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/inst/__fetch_google__.m
++++ b/inst/__fetch_google__.m
+@@ -63,6 +63,7 @@
+ "\n%s\nURL was:\n%s"], msg, geturl)
+ endif
+ d = csv2cell (f);
++ d{1,1} = d{1,1}(4:end); # Remove byte order mark (BOM)
+ unlink(f);
+ ## Pull off the header
+ fields = d(1,:);
+@@ -70,13 +71,10 @@
+ ## Put the dates into datenum format
+ data = [datenum(datevec(d(:,1), "dd-mmm-yy")), \
+ cell2mat(d(:,2:end))];
+- if (period == "d")
+- ## Note that google appears to have an off-by-one error in
+- ## returning historical data, so make sure that we only return the
+- ## requested data and not what Google sent. This is only done if
+- ## the period is daily because
+- data((data(:,1) < fromdate) | (data(:,1) > todate), :) = [];
+- endif
++ ## Note that google appears to have an off-by-one error in
++ ## returning historical data, so make sure that we only return the
++ ## requested data and not what Google sent.
++ data((data(:,1) < fromdate) | (data(:,1) > todate), :) = [];
+ else
+ error ("Non-google connection passed to google fetch")
+ endif
+@@ -90,8 +88,8 @@
+ %! 732499,34.64,34.97,34.03,34.12,13451500;
+ %! 732498,34.25,35.08,34.20,34.60,15845100;
+ %! 732494,34.76,34.85,34.22,34.44,9740300];
+-%! wgood = [732501,34.25,35.08,33.72,34.62,61542100;
+-%! 732494,35.88,36.24,34.22,34.44,68433900];
++%! wgood = [732501,34.25,35.08,33.72,34.62,60859400;
++%! 732494,35.88,36.24,34.22,34.44,67132100];
+ %!test
+ %! [d f] = __fetch_google__ (google(), "yhoo", 732494, 732501, "d");
+ %! assert(d, dgood, eps);
diff --git a/debian/patches/series b/debian/patches/series
index 8d1c8b6..835b644 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+google-stock-fetch.patch
--
Debian packaging for octave-financial
More information about the Pkg-octave-commit
mailing list