Package: deap / 1.3.1-2

0001-fix-docs.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
From: Daniel Stender <debian@danielstender.com>
Date: Fri, 16 Oct 2015 19:28:48 +0200
Subject: fix-docs

privacy breaches and minor flaws, extlinks extension, don't produce PDFs,
hardcode copyright span for reproducible builds.
Forwarded: not-needed
Last-Update: 2016-03-20
---
 doc/_templates/layout.html | 10 +---------
 doc/conf.py                | 22 +++++++++++++---------
 doc/examples/pso_basic.rst | 19 -------------------
 3 files changed, 14 insertions(+), 37 deletions(-)

diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html
index e7737eb..ae46414 100644
--- a/doc/_templates/layout.html
+++ b/doc/_templates/layout.html
@@ -25,13 +25,5 @@
     <br />
     Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version|e }}.
 </div>
-<script type="text/javascript">
-  (function() {
-     var ga = document.createElement('script');
-         ga.src = ('https:' == document.location.protocol ?
-                'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-    ga.setAttribute('async', 'true');
-    document.documentElement.firstChild.appendChild(ga);
-  })();
-</script>
+
 {% endblock %}
diff --git a/doc/conf.py b/doc/conf.py
index 602949c..1b76d81 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -38,6 +38,8 @@ else:
     extensions += ['matplotlib.sphinxext.only_directives',
                    'matplotlib.sphinxext.plot_directive']
 
+plot_formats = [('png', 80), ('hires.png', 200)]
+
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
 
@@ -52,7 +54,8 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'DEAP'
-copyright = u'2009-%s, DEAP Project' % time.strftime('%Y')
+#copyright = u'2009-%s, DEAP Project' % time.strftime('%Y')
+copyright = u'2009-2015, DEAP Project'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
@@ -127,14 +130,15 @@ plot_include_source = False
 plot_html_show_formats = True
 
 # -- Options for extlinks extension ----------------------------------------------
-import subprocess
-try:
-    tree = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip()
-except OSError:
-    import warnings
-    warnings.warn("Cannot link examples because we cannot retrieve the git version", Warning)
-else:
-    extlinks = {'example': ('https://github.com/DEAP/deap/blob/{tree}/examples/%s.py'.format(tree=tree), "examples/")}
+#import subprocess
+#try:
+#    tree = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip()
+#except OSError:
+#    import warnings
+#    warnings.warn("Cannot link examples because we cannot retrieve the git version", Warning)
+#else:
+#    extlinks = {'example': ('https://github.com/DEAP/deap/blob/{tree}/examples/%s.py'.format(tree=tree), "examples/")}
+extlinks = {'example': ('https://github.com/DEAP/deap/blob/master/examples/%s.py','examples/')}
 # -- Options for HTML output ---------------------------------------------------
 
 # Add any paths that contain custom themes here, relative to this directory.
diff --git a/doc/examples/pso_basic.rst b/doc/examples/pso_basic.rst
index 3f1e697..eb12bcb 100644
--- a/doc/examples/pso_basic.rst
+++ b/doc/examples/pso_basic.rst
@@ -97,25 +97,6 @@ Conclusion
 
 The full PSO basic example can be found here : :example:`pso/basic`.
 
-This is a video of the algorithm in action, plotted with matplotlib_. 
-The red dot represents the best solution found so far.
-
-.. _matplotlib: http://matplotlib.org/
-
-.. raw:: html
-
-	<center>
-	<object style="height: 390px; width: 640px">
-	<param name="movie" value="http://www.youtube.com/v/f3MW2krobpo?version=3&feature=player_detailpage">
-	<param name="allowFullScreen" value="true">
-	<param name="allowScriptAccess" value="always">
-	<embed src="http://www.youtube.com/v/f3MW2krobpo?version=3&feature=player_detailpage" 
-		   type="application/x-shockwave-flash" allowfullscreen="true" 
-		   allowScriptAccess="always" 
-		   width="640" height="360">
-	</object>
-	</center>
-
 References
 ==========