Skip to content

Commit

Permalink
bump docs to 0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nilomr committed Mar 14, 2023
1 parent 6ef2b86 commit 942428a
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 113 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<br>
<br>

![version](https://img.shields.io/badge/package_version-0.1.3-orange)
![version](https://img.shields.io/badge/package_version-0.1.4-orange)
![PyPI status](https://img.shields.io/pypi/status/ansicolortags.svg)
![license](https://img.shields.io/github/license/mashape/apistatus.svg)
![Open Source Love](https://img.shields.io/badge/open%20source-♡-lightgrey)
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 8d3dece494f9aa6c3ab1b26769a86beb
config: 02015b5d8e133bda0ea82d8b84874b12
tags: 645f666f9bcd5a90fca523b33c5a78b7
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pykanto.utils.types
pykanto.utils.types
===================

.. automodule:: pykanto.utils.types
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/_sources/index.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ more reproducible. This website contains its documentation.<br>
it to analyse bird songs.

![Python 3.8](https://img.shields.io/badge/_python-≥3.8-lighgreen.svg)
![version](https://img.shields.io/badge/_version-0.1.0-orange.svg)
![version](https://img.shields.io/badge/_version-0.1.4-orange.svg)

<div id="main-page">

Expand Down
3 changes: 1 addition & 2 deletions docs/_build/html/_static/copybutton.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ div.highlight {
position: relative;
}

/* Show the copybutton */
.highlight:hover button.copybtn, button.copybtn.success {
.highlight:hover button.copybtn {
opacity: 1;
}

Expand Down
42 changes: 7 additions & 35 deletions docs/_build/html/_static/copybutton.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,25 +102,18 @@ const clearSelection = () => {
}
}

// Changes tooltip text for a moment, then changes it back
// We want the timeout of our `success` class to be a bit shorter than the
// tooltip and icon change, so that we can hide the icon before changing back.
var timeoutIcon = 2000;
var timeoutSuccessClass = 1500;

// Changes tooltip text for two seconds, then changes it back
const temporarilyChangeTooltip = (el, oldText, newText) => {
el.setAttribute('data-tooltip', newText)
el.classList.add('success')
// Remove success a little bit sooner than we change the tooltip
// So that we can use CSS to hide the copybutton first
setTimeout(() => el.classList.remove('success'), timeoutSuccessClass)
setTimeout(() => el.setAttribute('data-tooltip', oldText), timeoutIcon)
setTimeout(() => el.setAttribute('data-tooltip', oldText), 2000)
setTimeout(() => el.classList.remove('success'), 2000)
}

// Changes the copy button icon for two seconds, then changes it back
const temporarilyChangeIcon = (el) => {
el.innerHTML = iconCheck;
setTimeout(() => {el.innerHTML = iconCopy}, timeoutIcon)
setTimeout(() => {el.innerHTML = iconCopy}, 2000)
}

const addCopyButtonToCodeCells = () => {
Expand All @@ -132,8 +125,7 @@ const addCopyButtonToCodeCells = () => {
}

// Add copybuttons to all of our code cells
const COPYBUTTON_SELECTOR = 'div.highlight pre';
const codeCells = document.querySelectorAll(COPYBUTTON_SELECTOR)
const codeCells = document.querySelectorAll('div.highlight pre')
codeCells.forEach((codeCell, index) => {
const id = codeCellId(index)
codeCell.setAttribute('id', id)
Expand All @@ -149,25 +141,10 @@ function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
}

/**
* Removes excluded text from a Node.
*
* @param {Node} target Node to filter.
* @param {string} exclude CSS selector of nodes to exclude.
* @returns {DOMString} Text from `target` with text removed.
*/
function filterText(target, exclude) {
const clone = target.cloneNode(true); // clone as to not modify the live DOM
if (exclude) {
// remove excluded nodes
clone.querySelectorAll(exclude).forEach(node => node.remove());
}
return clone.innerText;
}

// Callback when a copy button is clicked. Will be passed the node that was clicked
// should then grab the text and replace pieces of text that shouldn't be used in output
function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") {

var regexp;
var match;

Expand Down Expand Up @@ -222,12 +199,7 @@ function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onl

var copyTargetText = (trigger) => {
var target = document.querySelector(trigger.attributes['data-clipboard-target'].value);

// get filtered text
let exclude = '.linenos, .gp';

let text = filterText(target, exclude);
return formatCopyText(text, '>>> |^\\d+|\\.\\.\\. |\\$ |In \\[\\d*\\]: | {2,5}\\.\\.\\.: | {5,8}: ', true, true, true, true, '', '')
return formatCopyText(target.innerText, '>>> |^\\d+|\\.\\.\\. |\\$ |In \\[\\d*\\]: | {2,5}\\.\\.\\.: | {5,8}: ', true, true, true, true, '', '')
}

// Initialize with a callback so we can modify the text before copy
Expand Down
17 changes: 1 addition & 16 deletions docs/_build/html/_static/copybutton_funcs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,10 @@ function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
}

/**
* Removes excluded text from a Node.
*
* @param {Node} target Node to filter.
* @param {string} exclude CSS selector of nodes to exclude.
* @returns {DOMString} Text from `target` with text removed.
*/
export function filterText(target, exclude) {
const clone = target.cloneNode(true); // clone as to not modify the live DOM
if (exclude) {
// remove excluded nodes
clone.querySelectorAll(exclude).forEach(node => node.remove());
}
return clone.innerText;
}

// Callback when a copy button is clicked. Will be passed the node that was clicked
// should then grab the text and replace pieces of text that shouldn't be used in output
export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") {

var regexp;
var match;

Expand Down
1 change: 0 additions & 1 deletion docs/_build/html/_static/pygments.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #000000 } /* Name.Variable */
.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */
.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */
.highlight .w { color: #f8f8f8 } /* Text.Whitespace */
.highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */
Expand Down
62 changes: 24 additions & 38 deletions docs/_build/html/contents/basic-workflow.html

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/_build/html/contents/feature-extraction.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_build/html/contents/kantodata-dataset.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_build/html/contents/segmenting-files.html

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/_build/html/contents/segmenting-vocalisations.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ <h1>Modules</h1>
<a class="reference external" href="https://arxiv.org/pdf/2302.10340v1.pdf"><code class="docutils literal notranslate"><span class="pre">This</span> <span class="pre">article</span></code></a> explains the motivation behind the project and provides a worked example using
it to analyse bird songs.</p>
<p><img alt="Python 3.8" src="https://img.shields.io/badge/_python-%E2%89%A53.8-lighgreen.svg" />
<img alt="version" src="https://img.shields.io/badge/_version-0.1.0-orange.svg" /></p>
<img alt="version" src="https://img.shields.io/badge/_version-0.1.4-orange.svg" /></p>
<div id="main-page">
<div class="toctree-wrapper compound">
<p aria-level="2" class="caption" role="heading"><span class="caption-text">User guide</span></p>
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ more reproducible. This website contains its documentation.<br>
it to analyse bird songs.

![Python 3.8](https://img.shields.io/badge/_python-≥3.8-lighgreen.svg)
![version](https://img.shields.io/badge/_version-0.1.0-orange.svg)
![version](https://img.shields.io/badge/_version-0.1.4-orange.svg)

<div id="main-page">

Expand Down

0 comments on commit 942428a

Please sign in to comment.