SourceForge logo
SourceForge logo
Menu

[matplotlib-devel] Sample data: a proposal

From: Jouni K. S. <jk...@ik...> - 2010年09月12日 14:10:56
A while ago there was a discussion [1] about how using the
get_sample_data function in building the documentation is a problem for
Debian packagers. Let me see if I understand the goals of
get_sample_data correctly:
* we want to enable users to run examples they find in the gallery
 without downloading extra files;
* we don't want to package all the sample data with matplotlib, either
 because it is too large, or because it changes more often than we
 release new versions.
The current sample data takes about 2.5 megabytes uncompressed, so the
size doesn't look like a real problem, but of course it is desirable
that new examples are usable with old versions unless they need new
features.
The problem that the Debian packagers have with the current system is 
(I suppose) that building the documentation requires network access and 
is not guaranteed to be repeatable.
Here's what I suggest:
1. Package the sample data in a separate zip file that users can
 download and expand in e.g. ~/.matplotlib/sample_data if they like.
 This file could be released more often than matplotlib, if needed.
 Debian can use this as one source file and package it as a separate
 deb file.
2. Make get_sample_data look first in the place where the zip file could
 have been expanded, and only if the required file is not found, try
 to obtain it from the web. Add an option to disable the network
 access. This is different from what we do now, because now
 get_sample_data always tries to check if there is a newer version
 available, which apparently doesn't work reliably on unconnected
 computers.
3. To make this work, agree that sample data files are immutable: if a
 new version is needed, it needs to have a new name (and thus the
 examples using it need to be updated). The files have not been
 changed a lot [2], so I don't think this is very much of a burden.
What do you think?
Jouni
[1] http://thread.gmane.org/gmane.comp.python.matplotlib.devel/8865
[2] Here is a summary of the changes to each file in sample_data:
=== ./aapl.csv ===
------------------------------------------------------------------------
r7379 | jdh2358 | 2009年08月05日 18:57:31 +0300 (2009年8月05日)
------------------------------------------------------------------------
r6202 | jdh2358 | 2008年10月15日 15:43:41 +0300 (2008年10月15日)
------------------------------------------------------------------------
r4975 | jdh2358 | 2008年02月16日 22:58:37 +0200 (2008年2月16日)
------------------------------------------------------------------------
=== ./AAPL.dat ===
------------------------------------------------------------------------
r7388 | jdh2358 | 2009年08月05日 20:16:50 +0300 (2009年8月05日)
------------------------------------------------------------------------
=== ./aapl.npy ===
------------------------------------------------------------------------
r7377 | jdh2358 | 2009年08月05日 18:52:29 +0300 (2009年8月05日)
------------------------------------------------------------------------
r6203 | jdh2358 | 2008年10月15日 18:39:44 +0300 (2008年10月15日)
------------------------------------------------------------------------
=== ./axes_grid/bivariate_normal.npy ===
------------------------------------------------------------------------
r7436 | leejjoon | 2009年08月09日 07:34:08 +0300 (2009年8月09日)
------------------------------------------------------------------------
=== ./ct.raw ===
------------------------------------------------------------------------
r7382 | jdh2358 | 2009年08月05日 19:21:23 +0300 (2009年8月05日)
------------------------------------------------------------------------
r177 | jdh2358 | 2004年03月13日 01:00:12 +0200 (2004年3月13日)
------------------------------------------------------------------------
=== ./data_x_x2_x3.csv ===
------------------------------------------------------------------------
r7382 | jdh2358 | 2009年08月05日 19:21:23 +0300 (2009年8月05日)
------------------------------------------------------------------------
r7078 | efiring | 2009年05月03日 03:09:06 +0300 (2009年5月03日)
------------------------------------------------------------------------
=== ./demodata.csv ===
------------------------------------------------------------------------
r7382 | jdh2358 | 2009年08月05日 19:21:23 +0300 (2009年8月05日)
------------------------------------------------------------------------
r5100 | jdh2358 | 2008年04月30日 22:53:10 +0300 (2008年4月30日)
------------------------------------------------------------------------
=== ./eeg.dat ===
------------------------------------------------------------------------
r7382 | jdh2358 | 2009年08月05日 19:21:23 +0300 (2009年8月05日)
------------------------------------------------------------------------
r52 | jdh2358 | 2003年11月02日 23:23:21 +0200 (2003年11月02日)
------------------------------------------------------------------------
=== ./embedding_in_wx3.xrc ===
------------------------------------------------------------------------
r7382 | jdh2358 | 2009年08月05日 19:21:23 +0300 (2009年8月05日)
------------------------------------------------------------------------
r397 | astraw | 2004年07月10日 21:39:48 +0300 (2004年7月10日)
------------------------------------------------------------------------
=== ./goog.npy ===
------------------------------------------------------------------------
r7377 | jdh2358 | 2009年08月05日 18:52:29 +0300 (2009年8月05日)
------------------------------------------------------------------------
r6203 | jdh2358 | 2008年10月15日 18:39:44 +0300 (2008年10月15日)
------------------------------------------------------------------------
=== ./INTC.dat ===
------------------------------------------------------------------------
r7387 | jdh2358 | 2009年08月05日 20:16:00 +0300 (2009年8月05日)
------------------------------------------------------------------------
=== ./lena.jpg ===
------------------------------------------------------------------------
r7382 | jdh2358 | 2009年08月05日 19:21:23 +0300 (2009年8月05日)
------------------------------------------------------------------------
r2557 | astraw | 2006年07月12日 02:32:31 +0300 (2006年7月12日)
------------------------------------------------------------------------
r2556 | astraw | 2006年07月12日 02:28:46 +0300 (2006年7月12日)
------------------------------------------------------------------------
r603 | astraw | 2004年10月19日 20:50:03 +0300 (2004年10月19日)
------------------------------------------------------------------------
=== ./lena.png ===
------------------------------------------------------------------------
r7364 | jdh2358 | 2009年08月05日 17:36:27 +0300 (2009年8月05日)
------------------------------------------------------------------------
r7327 | jdh2358 | 2009年07月31日 21:55:17 +0300 (2009年7月31日)
------------------------------------------------------------------------
=== ./logo2.png ===
------------------------------------------------------------------------
r7382 | jdh2358 | 2009年08月05日 19:21:23 +0300 (2009年8月05日)
------------------------------------------------------------------------
r5669 | jdh2358 | 2008年06月24日 21:58:41 +0300 (2008年6月24日)
------------------------------------------------------------------------
=== ./membrane.dat ===
------------------------------------------------------------------------
r7382 | jdh2358 | 2009年08月05日 19:21:23 +0300 (2009年8月05日)
------------------------------------------------------------------------
r64 | jdh2358 | 2003年11月15日 19:05:37 +0200 (2003年11月15日)
------------------------------------------------------------------------
=== ./Minduka_Present_Blue_Pack.png ===
------------------------------------------------------------------------
r7421 | leejjoon | 2009年08月08日 04:40:31 +0300 (2009年8月08日)
------------------------------------------------------------------------
=== ./msft.csv ===
------------------------------------------------------------------------
r7382 | jdh2358 | 2009年08月05日 19:21:23 +0300 (2009年8月05日)
------------------------------------------------------------------------
r2144 | jdh2358 | 2006年03月14日 03:28:43 +0200 (2006年3月14日)
------------------------------------------------------------------------
r86 | jdh2358 | 2003年11月21日 19:50:00 +0200 (2003年11月21日)
------------------------------------------------------------------------
=== ./msft_nasdaq.npy ===
------------------------------------------------------------------------
r7377 | jdh2358 | 2009年08月05日 18:52:29 +0300 (2009年8月05日)
------------------------------------------------------------------------
r6203 | jdh2358 | 2008年10月15日 18:39:44 +0300 (2008年10月15日)
------------------------------------------------------------------------
=== ./s1045.ima ===
------------------------------------------------------------------------
r7382 | jdh2358 | 2009年08月05日 19:21:23 +0300 (2009年8月05日)
------------------------------------------------------------------------
r48 | jdh2358 | 2003年11月02日 21:43:30 +0200 (2003年11月02日)
------------------------------------------------------------------------
=== ./testdata.csv ===
------------------------------------------------------------------------
r7364 | jdh2358 | 2009年08月05日 17:36:27 +0300 (2009年8月05日)
------------------------------------------------------------------------
r7361 | jdh2358 | 2009年08月05日 14:39:37 +0300 (2009年8月05日)
------------------------------------------------------------------------
r7360 | jdh2358 | 2009年08月05日 14:34:43 +0300 (2009年8月05日)
------------------------------------------------------------------------
=== ./testdir/subdir/testsub.csv ===
------------------------------------------------------------------------
r7368 | jdh2358 | 2009年08月05日 17:54:01 +0300 (2009年8月05日)
------------------------------------------------------------------------
-- 
Jouni K. Seppänen
http://www.iki.fi/jks

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /