Skip to content

Commit 15eb9dc

Browse files
committed
update documentation for new release
1 parent 0d075ad commit 15eb9dc

29 files changed

+129
-71
lines changed

docs/_static/basic.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx stylesheet -- basic theme.
66
*
7-
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -757,6 +757,7 @@ span.pre {
757757
-ms-hyphens: none;
758758
-webkit-hyphens: none;
759759
hyphens: none;
760+
white-space: nowrap;
760761
}
761762

762763
div[class*="highlight-"] {

docs/_static/doctools.js

Lines changed: 56 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx JavaScript utilities for all documentation.
66
*
7-
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -154,9 +154,7 @@ var Documentation = {
154154
this.fixFirefoxAnchorBug();
155155
this.highlightSearchWords();
156156
this.initIndexTable();
157-
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
158-
this.initOnKeyListeners();
159-
}
157+
this.initOnKeyListeners();
160158
},
161159

162160
/**
@@ -264,6 +262,16 @@ var Documentation = {
264262
hideSearchWords : function() {
265263
$('#searchbox .highlight-link').fadeOut(300);
266264
$('span.highlighted').removeClass('highlighted');
265+
var url = new URL(window.location);
266+
url.searchParams.delete('highlight');
267+
window.history.replaceState({}, '', url);
268+
},
269+
270+
/**
271+
* helper function to focus on search bar
272+
*/
273+
focusSearchBar : function() {
274+
$('input[name=q]').first().focus();
267275
},
268276

269277
/**
@@ -288,27 +296,54 @@ var Documentation = {
288296
},
289297

290298
initOnKeyListeners: function() {
299+
// only install a listener if it is really needed
300+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
301+
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
302+
return;
303+
291304
$(document).keydown(function(event) {
292305
var activeElementType = document.activeElement.tagName;
293306
// don't navigate when in search box, textarea, dropdown or button
294307
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
295-
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
296-
&& !event.shiftKey) {
297-
switch (event.keyCode) {
298-
case 37: // left
299-
var prevHref = $('link[rel="prev"]').prop('href');
300-
if (prevHref) {
301-
window.location.href = prevHref;
302-
return false;
303-
}
304-
break;
305-
case 39: // right
306-
var nextHref = $('link[rel="next"]').prop('href');
307-
if (nextHref) {
308-
window.location.href = nextHref;
309-
return false;
310-
}
311-
break;
308+
&& activeElementType !== 'BUTTON') {
309+
if (event.altKey || event.ctrlKey || event.metaKey)
310+
return;
311+
312+
if (!event.shiftKey) {
313+
switch (event.key) {
314+
case 'ArrowLeft':
315+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
316+
break;
317+
var prevHref = $('link[rel="prev"]').prop('href');
318+
if (prevHref) {
319+
window.location.href = prevHref;
320+
return false;
321+
}
322+
break;
323+
case 'ArrowRight':
324+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
325+
break;
326+
var nextHref = $('link[rel="next"]').prop('href');
327+
if (nextHref) {
328+
window.location.href = nextHref;
329+
return false;
330+
}
331+
break;
332+
case 'Escape':
333+
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
334+
break;
335+
Documentation.hideSearchWords();
336+
return false;
337+
}
338+
}
339+
340+
// some keyboard layouts may need Shift to get /
341+
switch (event.key) {
342+
case '/':
343+
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
344+
break;
345+
Documentation.focusSearchBar();
346+
return false;
312347
}
313348
}
314349
});
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
var DOCUMENTATION_OPTIONS = {
22
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
3-
VERSION: '2.0.5',
3+
VERSION: '2.1.0',
44
LANGUAGE: 'None',
55
COLLAPSE_INDEX: false,
66
BUILDER: 'html',
77
FILE_SUFFIX: '.html',
88
LINK_SUFFIX: '.html',
99
HAS_SOURCE: true,
1010
SOURCELINK_SUFFIX: '.txt',
11-
NAVIGATION_WITH_KEYS: false
11+
NAVIGATION_WITH_KEYS: false,
12+
SHOW_SEARCH_SUMMARY: true,
13+
ENABLE_SEARCH_SHORTCUTS: true,
1214
};

docs/_static/language_data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* This script contains the language-specific data used by searchtools.js,
66
* namely the list of stopwords, stemmer, scorer and splitter.
77
*
8-
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
8+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
99
* :license: BSD, see LICENSE for details.
1010
*
1111
*/

docs/_static/searchtools.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx JavaScript utilities for the full-text search.
66
*
7-
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -172,10 +172,6 @@ var Search = {
172172
}
173173
// stem the word
174174
var word = stemmer.stemWord(tmp[i].toLowerCase());
175-
// prevent stemmer from cutting word smaller than two chars
176-
if(word.length < 3 && tmp[i].length >= 3) {
177-
word = tmp[i];
178-
}
179175
var toAppend;
180176
// select the correct list
181177
if (word[0] == '-') {
@@ -276,7 +272,7 @@ var Search = {
276272
setTimeout(function() {
277273
displayNextItem();
278274
}, 5);
279-
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
275+
} else if (DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY) {
280276
$.ajax({url: requestUrl,
281277
dataType: "text",
282278
complete: function(jqxhr, textstatus) {
@@ -293,7 +289,7 @@ var Search = {
293289
}, 5);
294290
}});
295291
} else {
296-
// no source available, just display title
292+
// just display title
297293
Search.output.append(listItem);
298294
setTimeout(function() {
299295
displayNextItem();

docs/about.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta charset="utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
88

9-
<title>About &#8212; pwlf 2.0.5 documentation</title>
9+
<title>About &#8212; pwlf 2.1.0 documentation</title>
1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
1111
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
1212
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
@@ -117,7 +117,7 @@ <h3 id="searchlabel">Quick search</h3>
117117
&copy;2020, Charles Jekel.
118118

119119
|
120-
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.3.1</a>
120+
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.5.0</a>
121121
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
122122

123123
|

docs/examples.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta charset="utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
88

9-
<title>Examples &#8212; pwlf 2.0.5 documentation</title>
9+
<title>Examples &#8212; pwlf 2.1.0 documentation</title>
1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
1111
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
1212
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
@@ -486,8 +486,8 @@ <h2>get the linear regression matrix<a class="headerlink" href="#get-the-linear-
486486
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">sklearn.linear_model</span> <span class="kn">import</span> <span class="n">ElasticNetCV</span>
487487
<span class="c1"># set up the elastic net</span>
488488
<span class="n">en_model</span> <span class="o">=</span> <span class="n">ElasticNetCV</span><span class="p">(</span><span class="n">cv</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span>
489-
<span class="n">l1_ratio</span><span class="o">=</span><span class="p">[</span><span class="o">.</span><span class="mi">1</span><span class="p">,</span> <span class="o">.</span><span class="mi">5</span><span class="p">,</span> <span class="o">.</span><span class="mi">7</span><span class="p">,</span> <span class="o">.</span><span class="mi">9</span><span class="p">,</span>
490-
<span class="o">.</span><span class="mi">95</span><span class="p">,</span> <span class="o">.</span><span class="mi">99</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span>
489+
<span class="n">l1_ratio</span><span class="o">=</span><span class="p">[</span><span class="mf">.1</span><span class="p">,</span> <span class="mf">.5</span><span class="p">,</span> <span class="mf">.7</span><span class="p">,</span> <span class="mf">.9</span><span class="p">,</span>
490+
<span class="mf">.95</span><span class="p">,</span> <span class="mf">.99</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span>
491491
<span class="n">fit_intercept</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
492492
<span class="n">max_iter</span><span class="o">=</span><span class="mi">1000000</span><span class="p">,</span> <span class="n">n_jobs</span><span class="o">=-</span><span class="mi">1</span><span class="p">)</span>
493493
<span class="c1"># fit the model using the elastic net</span>
@@ -970,7 +970,7 @@ <h3 id="searchlabel">Quick search</h3>
970970
&copy;2020, Charles Jekel.
971971

972972
|
973-
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.3.1</a>
973+
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.5.0</a>
974974
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
975975

976976
|

docs/genindex.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<head>
66
<meta charset="utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8-
<title>Index &#8212; pwlf 2.0.5 documentation</title>
8+
<title>Index &#8212; pwlf 2.1.0 documentation</title>
99
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
1010
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
1111
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
@@ -206,7 +206,7 @@ <h3 id="searchlabel">Quick search</h3>
206206
&copy;2020, Charles Jekel.
207207

208208
|
209-
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.3.1</a>
209+
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.5.0</a>
210210
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
211211

212212
</div>

docs/how_it_works.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta charset="utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
88

9-
<title>How it works &#8212; pwlf 2.0.5 documentation</title>
9+
<title>How it works &#8212; pwlf 2.1.0 documentation</title>
1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
1111
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
1212
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
@@ -119,7 +119,7 @@ <h3 id="searchlabel">Quick search</h3>
119119
&copy;2020, Charles Jekel.
120120

121121
|
122-
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.3.1</a>
122+
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.5.0</a>
123123
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
124124

125125
|

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta charset="utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
88

9-
<title>pwlf: piecewise linear fitting &#8212; pwlf 2.0.5 documentation</title>
9+
<title>pwlf: piecewise linear fitting &#8212; pwlf 2.1.0 documentation</title>
1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
1111
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
1212
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
@@ -145,7 +145,7 @@ <h3 id="searchlabel">Quick search</h3>
145145
&copy;2020, Charles Jekel.
146146

147147
|
148-
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.3.1</a>
148+
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.5.0</a>
149149
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
150150

151151
|

0 commit comments

Comments
 (0)