From 831525a88f6959892b3f30771ae1cc84b632ba87 Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Sun, 21 Nov 2021 23:09:30 +0000 Subject: [PATCH] Deployed b710338 with MkDocs version: 1.2.3 --- coverage/.gitignore | 2 - coverage/coverage_html.js | 575 ------------------ coverage/covindex.html | 138 ----- coverage/d_2b703ede0196a3c0___init___py.html | 101 --- coverage/d_2b703ede0196a3c0_cli_py.html | 280 --------- coverage/d_678a5ac99edfd408___init___py.html | 80 --- coverage/d_678a5ac99edfd408___main___py.html | 82 --- coverage/d_678a5ac99edfd408__version_py.html | 73 --- .../d_678a5ac99edfd408_exceptions_py.html | 121 ---- coverage/d_9c7e16c5deec493b___init___py.html | 88 --- coverage/d_e89a57001f83f3a6___init___py.html | 75 --- coverage/d_e89a57001f83f3a6_pages_py.html | 550 ----------------- coverage/favicon_32.png | Bin 1732 -> 0 bytes coverage/keybd_closed.png | Bin 9004 -> 0 bytes coverage/keybd_open.png | Bin 9003 -> 0 bytes coverage/status.json | 1 - coverage/style.css | 307 ---------- coverage/{index.html => tmp.html} | 0 sitemap.xml.gz | Bin 326 -> 326 bytes 19 files changed, 2473 deletions(-) delete mode 100644 coverage/.gitignore delete mode 100644 coverage/coverage_html.js delete mode 100644 coverage/covindex.html delete mode 100644 coverage/d_2b703ede0196a3c0___init___py.html delete mode 100644 coverage/d_2b703ede0196a3c0_cli_py.html delete mode 100644 coverage/d_678a5ac99edfd408___init___py.html delete mode 100644 coverage/d_678a5ac99edfd408___main___py.html delete mode 100644 coverage/d_678a5ac99edfd408__version_py.html delete mode 100644 coverage/d_678a5ac99edfd408_exceptions_py.html delete mode 100644 coverage/d_9c7e16c5deec493b___init___py.html delete mode 100644 coverage/d_e89a57001f83f3a6___init___py.html delete mode 100644 coverage/d_e89a57001f83f3a6_pages_py.html delete mode 100644 coverage/favicon_32.png delete mode 100644 coverage/keybd_closed.png delete mode 100644 coverage/keybd_open.png delete mode 100644 coverage/status.json delete mode 100644 coverage/style.css rename coverage/{index.html => tmp.html} (100%) diff --git a/coverage/.gitignore b/coverage/.gitignore deleted file mode 100644 index ccccf14..0000000 --- a/coverage/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Created by coverage.py -* diff --git a/coverage/coverage_html.js b/coverage/coverage_html.js deleted file mode 100644 index 00e1848..0000000 --- a/coverage/coverage_html.js +++ /dev/null @@ -1,575 +0,0 @@ -// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 -// For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt - -// Coverage.py HTML report browser code. -/*jslint browser: true, sloppy: true, vars: true, plusplus: true, maxerr: 50, indent: 4 */ -/*global coverage: true, document, window, $ */ - -coverage = {}; - -// General helpers -function debounce(callback, wait) { - let timeoutId = null; - return function(...args) { - clearTimeout(timeoutId); - timeoutId = setTimeout(() => { - callback.apply(this, args); - }, wait); - }; -}; - -function checkVisible(element) { - const rect = element.getBoundingClientRect(); - const viewBottom = Math.max(document.documentElement.clientHeight, window.innerHeight); - const viewTop = 30; - return !(rect.bottom < viewTop || rect.top >= viewBottom); -} - -// Helpers for table sorting -function getCellValue(row, column = 0) { - const cell = row.cells[column] - if (cell.childElementCount == 1) { - const child = cell.firstElementChild - if (child instanceof HTMLTimeElement && child.dateTime) { - return child.dateTime - } else if (child instanceof HTMLDataElement && child.value) { - return child.value - } - } - return cell.innerText || cell.textContent; -} - -function rowComparator(rowA, rowB, column = 0) { - let valueA = getCellValue(rowA, column); - let valueB = getCellValue(rowB, column); - if (!isNaN(valueA) && !isNaN(valueB)) { - return valueA - valueB - } - return valueA.localeCompare(valueB, undefined, {numeric: true}); -} - -function sortColumn(th) { - // Get the current sorting direction of the selected header, - // clear state on other headers and then set the new sorting direction - const currentSortOrder = th.getAttribute("aria-sort"); - [...th.parentElement.cells].forEach(header => header.setAttribute("aria-sort", "none")); - if (currentSortOrder === "none") { - th.setAttribute("aria-sort", th.dataset.defaultSortOrder || "ascending"); - } else { - th.setAttribute("aria-sort", currentSortOrder === "ascending" ? "descending" : "ascending"); - } - - const column = [...th.parentElement.cells].indexOf(th) - - // Sort all rows and afterwards append them in order to move them in the DOM - Array.from(th.closest("table").querySelectorAll("tbody tr")) - .sort((rowA, rowB) => rowComparator(rowA, rowB, column) * (th.getAttribute("aria-sort") === "ascending" ? 1 : -1)) - .forEach(tr => tr.parentElement.appendChild(tr) ); -} - -// Find all the elements with data-shortcut attribute, and use them to assign a shortcut key. -coverage.assign_shortkeys = function () { - document.querySelectorAll("[data-shortcut]").forEach(element => { - document.addEventListener("keypress", event => { - if (event.target.tagName.toLowerCase() === "input") { - return; // ignore keypress from search filter - } - if (event.key === element.dataset.shortcut) { - element.click(); - } - }); - }); -}; - -// Create the events for the filter box. -coverage.wire_up_filter = function () { - // Cache elements. - const table = document.querySelector("table.index"); - const table_body_rows = table.querySelectorAll("tbody tr"); - const no_rows = document.getElementById("no_rows"); - - // Observe filter keyevents. - document.getElementById("filter").addEventListener("input", debounce(event => { - // Keep running total of each metric, first index contains number of shown rows - const totals = new Array(table.rows[0].cells.length).fill(0); - // Accumulate the percentage as fraction - totals[totals.length - 1] = { "numer": 0, "denom": 0 }; - - // Hide / show elements. - table_body_rows.forEach(row => { - if (!row.cells[0].textContent.includes(event.target.value)) { - // hide - row.classList.add("hidden"); - return; - } - - // show - row.classList.remove("hidden"); - totals[0]++; - - for (let column = 1; column < totals.length; column++) { - // Accumulate dynamic totals - cell = row.cells[column] - if (column === totals.length - 1) { - // Last column contains percentage - const [numer, denom] = cell.dataset.ratio.split(" "); - totals[column]["numer"] += parseInt(numer, 10); - totals[column]["denom"] += parseInt(denom, 10); - } else { - totals[column] += parseInt(cell.textContent, 10); - } - } - }); - - // Show placeholder if no rows will be displayed. - if (!totals[0]) { - // Show placeholder, hide table. - no_rows.style.display = "block"; - table.style.display = "none"; - return; - } - - // Hide placeholder, show table. - no_rows.style.display = null; - table.style.display = null; - - const footer = table.tFoot.rows[0]; - // Calculate new dynamic sum values based on visible rows. - for (let column = 1; column < totals.length; column++) { - // Get footer cell element. - const cell = footer.cells[column]; - - // Set value into dynamic footer cell element. - if (column === totals.length - 1) { - // Percentage column uses the numerator and denominator, - // and adapts to the number of decimal places. - const match = /\.([0-9]+)/.exec(cell.textContent); - const places = match ? match[1].length : 0; - const { numer, denom } = totals[column]; - cell.dataset.ratio = `${numer} ${denom}`; - // Check denom to prevent NaN if filtered files contain no statements - cell.textContent = denom - ? `${(numer * 100 / denom).toFixed(places)}%` - : `${(100).toFixed(places)}%`; - } else { - cell.textContent = totals[column]; - } - } - })); - - // Trigger change event on setup, to force filter on page refresh - // (filter value may still be present). - document.getElementById("filter").dispatchEvent(new Event("change")); -}; - -coverage.INDEX_SORT_STORAGE = "COVERAGE_INDEX_SORT_2"; - -// Loaded on index.html -coverage.index_ready = function () { - coverage.assign_shortkeys(); - coverage.wire_up_filter(); - document.querySelectorAll("[data-sortable] th[aria-sort]").forEach( - th => th.addEventListener("click", e => sortColumn(e.target)) - ); - - // Look for a localStorage item containing previous sort settings: - const stored_list = localStorage.getItem(coverage.INDEX_SORT_STORAGE); - - if (stored_list) { - const {column, direction} = JSON.parse(stored_list); - const th = document.querySelector("[data-sortable]").tHead.rows[0].cells[column]; - th.setAttribute("aria-sort", direction === "ascending" ? "descending" : "ascending"); - th.click() - } - - // Watch for page unload events so we can save the final sort settings: - window.addEventListener("unload", function () { - const th = document.querySelector('[data-sortable] th[aria-sort="ascending"], [data-sortable] [aria-sort="descending"]'); - if (!th) { - return; - } - localStorage.setItem(coverage.INDEX_SORT_STORAGE, JSON.stringify({ - column: [...th.parentElement.cells].indexOf(th), - direction: th.getAttribute("aria-sort"), - })); - }); -}; - -// -- pyfile stuff -- - -coverage.LINE_FILTERS_STORAGE = "COVERAGE_LINE_FILTERS"; - -coverage.pyfile_ready = function () { - // If we're directed to a particular line number, highlight the line. - var frag = location.hash; - if (frag.length > 2 && frag[1] === 't') { - document.querySelector(frag).closest(".n").classList.add("highlight"); - coverage.set_sel(parseInt(frag.substr(2), 10)); - } else { - coverage.set_sel(0); - } - - const on_click = function(sel, fn) { - const elt = document.querySelector(sel); - if (elt) { - elt.addEventListener("click", fn); - } - } - on_click(".button_toggle_run", coverage.toggle_lines); - on_click(".button_toggle_mis", coverage.toggle_lines); - on_click(".button_toggle_exc", coverage.toggle_lines); - on_click(".button_toggle_par", coverage.toggle_lines); - - on_click(".button_next_chunk", coverage.to_next_chunk_nicely); - on_click(".button_prev_chunk", coverage.to_prev_chunk_nicely); - on_click(".button_top_of_page", coverage.to_top); - on_click(".button_first_chunk", coverage.to_first_chunk); - - coverage.filters = undefined; - try { - coverage.filters = localStorage.getItem(coverage.LINE_FILTERS_STORAGE); - } catch(err) {} - - if (coverage.filters) { - coverage.filters = JSON.parse(coverage.filters); - } - else { - coverage.filters = {run: false, exc: true, mis: true, par: true}; - } - - for (cls in coverage.filters) { - coverage.set_line_visibilty(cls, coverage.filters[cls]); - } - - coverage.assign_shortkeys(); - coverage.init_scroll_markers(); - coverage.wire_up_sticky_header(); - - // Rebuild scroll markers when the window height changes. - window.addEventListener("resize", coverage.build_scroll_markers); -}; - -coverage.toggle_lines = function (event) { - const btn = event.target.closest("button"); - const category = btn.value - const show = !btn.classList.contains("show_" + category); - coverage.set_line_visibilty(category, show); - coverage.build_scroll_markers(); - coverage.filters[category] = show; - try { - localStorage.setItem(coverage.LINE_FILTERS_STORAGE, JSON.stringify(coverage.filters)); - } catch(err) {} -}; - -coverage.set_line_visibilty = function (category, should_show) { - const cls = "show_" + category; - const btn = document.querySelector(".button_toggle_" + category); - if (btn) { - if (should_show) { - document.querySelectorAll("#source ." + category).forEach(e => e.classList.add(cls)); - btn.classList.add(cls); - } - else { - document.querySelectorAll("#source ." + category).forEach(e => e.classList.remove(cls)); - btn.classList.remove(cls); - } - } -}; - -// Return the nth line div. -coverage.line_elt = function (n) { - return document.getElementById("t" + n)?.closest("p"); -}; - -// Set the selection. b and e are line numbers. -coverage.set_sel = function (b, e) { - // The first line selected. - coverage.sel_begin = b; - // The next line not selected. - coverage.sel_end = (e === undefined) ? b+1 : e; -}; - -coverage.to_top = function () { - coverage.set_sel(0, 1); - coverage.scroll_window(0); -}; - -coverage.to_first_chunk = function () { - coverage.set_sel(0, 1); - coverage.to_next_chunk(); -}; - -// Return a string indicating what kind of chunk this line belongs to, -// or null if not a chunk. -coverage.chunk_indicator = function (line_elt) { - const classes = line_elt?.className; - if (!classes) { - return null; - } - const match = classes.match(/\bshow_\w+\b/); - if (!match) { - return null; - } - return match[0]; -}; - -coverage.to_next_chunk = function () { - const c = coverage; - - // Find the start of the next colored chunk. - var probe = c.sel_end; - var chunk_indicator, probe_line; - while (true) { - probe_line = c.line_elt(probe); - if (!probe_line) { - return; - } - chunk_indicator = c.chunk_indicator(probe_line); - if (chunk_indicator) { - break; - } - probe++; - } - - // There's a next chunk, `probe` points to it. - var begin = probe; - - // Find the end of this chunk. - var next_indicator = chunk_indicator; - while (next_indicator === chunk_indicator) { - probe++; - probe_line = c.line_elt(probe); - next_indicator = c.chunk_indicator(probe_line); - } - c.set_sel(begin, probe); - c.show_selection(); -}; - -coverage.to_prev_chunk = function () { - const c = coverage; - - // Find the end of the prev colored chunk. - var probe = c.sel_begin-1; - var probe_line = c.line_elt(probe); - if (!probe_line) { - return; - } - var chunk_indicator = c.chunk_indicator(probe_line); - while (probe > 1 && !chunk_indicator) { - probe--; - probe_line = c.line_elt(probe); - if (!probe_line) { - return; - } - chunk_indicator = c.chunk_indicator(probe_line); - } - - // There's a prev chunk, `probe` points to its last line. - var end = probe+1; - - // Find the beginning of this chunk. - var prev_indicator = chunk_indicator; - while (prev_indicator === chunk_indicator) { - probe--; - if (probe <= 0) { - return; - } - probe_line = c.line_elt(probe); - prev_indicator = c.chunk_indicator(probe_line); - } - c.set_sel(probe+1, end); - c.show_selection(); -}; - -// Returns 0, 1, or 2: how many of the two ends of the selection are on -// the screen right now? -coverage.selection_ends_on_screen = function () { - if (coverage.sel_begin === 0) { - return 0; - } - - const begin = coverage.line_elt(coverage.sel_begin); - const end = coverage.line_elt(coverage.sel_end-1); - - return ( - (checkVisible(begin) ? 1 : 0) - + (checkVisible(end) ? 1 : 0) - ); -}; - -coverage.to_next_chunk_nicely = function () { - if (coverage.selection_ends_on_screen() === 0) { - // The selection is entirely off the screen: - // Set the top line on the screen as selection. - - // This will select the top-left of the viewport - // As this is most likely the span with the line number we take the parent - const line = document.elementFromPoint(0, 0).parentElement; - if (line.parentElement !== document.getElementById("source")) { - // The element is not a source line but the header or similar - coverage.select_line_or_chunk(1); - } else { - // We extract the line number from the id - coverage.select_line_or_chunk(parseInt(line.id.substring(1), 10)); - } - } - coverage.to_next_chunk(); -}; - -coverage.to_prev_chunk_nicely = function () { - if (coverage.selection_ends_on_screen() === 0) { - // The selection is entirely off the screen: - // Set the lowest line on the screen as selection. - - // This will select the bottom-left of the viewport - // As this is most likely the span with the line number we take the parent - const line = document.elementFromPoint(document.documentElement.clientHeight-1, 0).parentElement; - if (line.parentElement !== document.getElementById("source")) { - // The element is not a source line but the header or similar - coverage.select_line_or_chunk(coverage.lines_len); - } else { - // We extract the line number from the id - coverage.select_line_or_chunk(parseInt(line.id.substring(1), 10)); - } - } - coverage.to_prev_chunk(); -}; - -// Select line number lineno, or if it is in a colored chunk, select the -// entire chunk -coverage.select_line_or_chunk = function (lineno) { - var c = coverage; - var probe_line = c.line_elt(lineno); - if (!probe_line) { - return; - } - var the_indicator = c.chunk_indicator(probe_line); - if (the_indicator) { - // The line is in a highlighted chunk. - // Search backward for the first line. - var probe = lineno; - var indicator = the_indicator; - while (probe > 0 && indicator === the_indicator) { - probe--; - probe_line = c.line_elt(probe); - if (!probe_line) { - break; - } - indicator = c.chunk_indicator(probe_line); - } - var begin = probe + 1; - - // Search forward for the last line. - probe = lineno; - indicator = the_indicator; - while (indicator === the_indicator) { - probe++; - probe_line = c.line_elt(probe); - indicator = c.chunk_indicator(probe_line); - } - - coverage.set_sel(begin, probe); - } - else { - coverage.set_sel(lineno); - } -}; - -coverage.show_selection = function () { - // Highlight the lines in the chunk - document.querySelectorAll("#source .highlight").forEach(e => e.classList.remove("highlight")); - for (let probe = coverage.sel_begin; probe < coverage.sel_end; probe++) { - coverage.line_elt(probe).querySelector(".n").classList.add("highlight"); - } - - coverage.scroll_to_selection(); -}; - -coverage.scroll_to_selection = function () { - // Scroll the page if the chunk isn't fully visible. - if (coverage.selection_ends_on_screen() < 2) { - const element = coverage.line_elt(coverage.sel_begin); - coverage.scroll_window(element.offsetTop - 60); - } -}; - -coverage.scroll_window = function (to_pos) { - window.scroll({top: to_pos, behavior: "smooth"}); -}; - -coverage.init_scroll_markers = function () { - // Init some variables - coverage.lines_len = document.querySelectorAll('#source > p').length; - - // Build html - coverage.build_scroll_markers(); -}; - -coverage.build_scroll_markers = function () { - const temp_scroll_marker = document.getElementById('scroll_marker') - if (temp_scroll_marker) temp_scroll_marker.remove(); - // Don't build markers if the window has no scroll bar. - if (document.body.scrollHeight <= window.innerHeight) { - return; - } - - const marker_scale = window.innerHeight / document.body.scrollHeight; - const line_height = Math.min(Math.max(3, window.innerHeight / coverage.lines_len), 10); - - let previous_line = -99, last_mark, last_top; - - const scroll_marker = document.createElement("div"); - scroll_marker.id = "scroll_marker"; - document.getElementById('source').querySelectorAll( - 'p.show_run, p.show_mis, p.show_exc, p.show_exc, p.show_par' - ).forEach(element => { - const line_top = Math.floor(element.offsetTop * marker_scale); - const line_number = parseInt(element.id.substr(1)); - - if (line_number === previous_line + 1) { - // If this solid missed block just make previous mark higher. - last_mark.style.height = `${line_top + line_height - last_top}px`; - } else { - // Add colored line in scroll_marker block. - last_mark = document.createElement("div"); - last_mark.id = `m${line_number}`; - last_mark.classList.add("marker"); - last_mark.style.height = `${line_height}px`; - last_mark.style.top = `${line_top}px`; - scroll_marker.append(last_mark); - last_top = line_top; - } - - previous_line = line_number; - }); - - // Append last to prevent layout calculation - document.body.append(scroll_marker); -}; - -coverage.wire_up_sticky_header = function () { - const header = document.querySelector('header'); - const header_bottom = ( - header.querySelector('.content h2').getBoundingClientRect().top - - header.getBoundingClientRect().top - ); - - function updateHeader() { - if (window.scrollY > header_bottom) { - header.classList.add('sticky'); - } else { - header.classList.remove('sticky'); - } - } - - window.addEventListener('scroll', updateHeader); - updateHeader(); -}; - -document.addEventListener("DOMContentLoaded", () => { - if (document.body.classList.contains("indexfile")) { - coverage.index_ready(); - } else { - coverage.pyfile_ready(); - } -}); diff --git a/coverage/covindex.html b/coverage/covindex.html deleted file mode 100644 index 99d27af..0000000 --- a/coverage/covindex.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - Coverage report - - - - - -
-
-

Coverage report: - 96% -

-
- - -
-

Shortcuts on this page

-
-

- n - s - m - x - c   change column sorting -

-
-
-
-
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Modulestatementsmissingexcludedcoverage
tembo/__init__.py200100%
tembo/__main__.py4400%
tembo/_version.py100100%
tembo/cli/__init__.py195074%
tembo/cli/cli.py9500100%
tembo/exceptions.py1200100%
tembo/journal/__init__.py100100%
tembo/journal/pages.py1412699%
tembo/utils/__init__.py400100%
Total27911696%
-

- No items found using the specified filter. -

-
- - - diff --git a/coverage/d_2b703ede0196a3c0___init___py.html b/coverage/d_2b703ede0196a3c0___init___py.html deleted file mode 100644 index 2346637..0000000 --- a/coverage/d_2b703ede0196a3c0___init___py.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - Coverage for tembo/cli/__init__.py: 74% - - - - - -
-
-

- Coverage for tembo/cli/__init__.py: - 74% -

-
- - -
-

Shortcuts on this page

-
-

- r - m - x -   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
-
-

- 19 statements   - - - -

-
- - - - -
-
-
-
-

1"""Subpackage that contains the CLI application.""" 

-

2 

-

3import os 

-

4from typing import Any 

-

5 

-

6import panaetius 

-

7from panaetius.exceptions import LoggingDirectoryDoesNotExistException 

-

8 

-

9if (config_path := os.environ.get("TEMBO_CONFIG")) is not None: 

-

10 CONFIG: Any = panaetius.Config("tembo", config_path, skip_header_init=True) 

-

11else: 

-

12 CONFIG = panaetius.Config("tembo", "~/tembo/.config", skip_header_init=True) 

-

13 

-

14 

-

15panaetius.set_config(CONFIG, "base_path", "~/tembo") 

-

16panaetius.set_config(CONFIG, "template_path", "~/tembo/.templates") 

-

17panaetius.set_config(CONFIG, "scopes", {}) 

-

18panaetius.set_config(CONFIG, "logging.level", "DEBUG") 

-

19panaetius.set_config(CONFIG, "logging.path") 

-

20 

-

21try: 

-

22 logger = panaetius.set_logger( 

-

23 CONFIG, panaetius.SimpleLogger(logging_level=CONFIG.logging_level) 

-

24 ) 

-

25except LoggingDirectoryDoesNotExistException: 

-

26 _LOGGING_PATH = CONFIG.logging_path 

-

27 CONFIG.logging_path = "" 

-

28 logger = panaetius.set_logger( 

-

29 CONFIG, panaetius.SimpleLogger(logging_level=CONFIG.logging_level) 

-

30 ) 

-

31 logger.warning("Logging directory %s does not exist", _LOGGING_PATH) 

-
- - - diff --git a/coverage/d_2b703ede0196a3c0_cli_py.html b/coverage/d_2b703ede0196a3c0_cli_py.html deleted file mode 100644 index 3304f60..0000000 --- a/coverage/d_2b703ede0196a3c0_cli_py.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - Coverage for tembo/cli/cli.py: 100% - - - - - -
-
-

- Coverage for tembo/cli/cli.py: - 100% -

-
- - -
-

Shortcuts on this page

-
-

- r - m - x -   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
-
-

- 95 statements   - - - -

-
- - - - -
-
-
-
-

1"""Submodule which contains the CLI implementation using Click.""" 

-

2 

-

3from __future__ import annotations 

-

4 

-

5import pathlib 

-

6from typing import Collection 

-

7 

-

8import click 

-

9 

-

10import tembo.cli 

-

11from tembo import exceptions 

-

12from tembo._version import __version__ 

-

13from tembo.journal import pages 

-

14from tembo.utils import Success 

-

15 

-

16CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) 

-

17 

-

18 

-

19@click.group(context_settings=CONTEXT_SETTINGS, options_metavar="<options>") 

-

20@click.version_option( 

-

21 __version__, 

-

22 "-v", 

-

23 "--version", 

-

24 prog_name="Tembo", 

-

25 message=f"Tembo v{__version__} 🐘", 

-

26) 

-

27def main(): 

-

28 """Tembo - an organiser for work notes.""" 

-

29 

-

30 

-

31@click.command(options_metavar="<options>", name="list") 

-

32def list_all(): 

-

33 """List all scopes defined in the config.yml.""" 

-

34 _all_scopes = [user_scope["name"] for user_scope in tembo.cli.CONFIG.scopes] 

-

35 _all_scopes_joined = "', '".join(_all_scopes) 

-

36 cli_message(f"{len(_all_scopes)} names found in config.yml: '{_all_scopes_joined}'") 

-

37 raise SystemExit(0) 

-

38 

-

39 

-

40@click.command(options_metavar="<options>") 

-

41@click.argument("scope", metavar="<scope>") 

-

42@click.argument( 

-

43 "inputs", 

-

44 nargs=-1, 

-

45 metavar="<inputs>", 

-

46) 

-

47@click.option( 

-

48 "--dry-run", 

-

49 is_flag=True, 

-

50 default=False, 

-

51 help="Show the full path of the page to be created without actually saving the page to disk " 

-

52 "and exit.", 

-

53) 

-

54@click.option( 

-

55 "--example", 

-

56 is_flag=True, 

-

57 default=False, 

-

58 help="Show the example command in the config.yml if it exists and exit.", 

-

59) 

-

60def new(scope: str, inputs: Collection[str], dry_run: bool, example: bool): # noqa 

-

61 """ 

-

62 Create a new page. 

-

63 

-

64 \b 

-

65 `<scope>` The name of the scope in the config.yml. 

-

66 \b 

-

67 `<inputs>` Any input token values that are defined in the config.yml for this scope. 

-

68 Accepts multiple inputs separated by a space. 

-

69 

-

70 \b 

-

71 Example: 

-

72 `tembo new meeting my_presentation` 

-

73 """ 

-

74 # check that the name exists in the config.yml 

-

75 try: 

-

76 _new_verify_name_exists(scope) 

-

77 except ( 

-

78 exceptions.ScopeNotFound, 

-

79 exceptions.EmptyConfigYML, 

-

80 exceptions.MissingConfigYML, 

-

81 ) as tembo_exception: 

-

82 cli_message(tembo_exception.args[0]) 

-

83 raise SystemExit(1) from tembo_exception 

-

84 

-

85 # get the scope configuration from the config.yml 

-

86 try: 

-

87 config_scope = _new_get_config_scope(scope) 

-

88 except exceptions.MandatoryKeyNotFound as mandatory_key_not_found: 

-

89 cli_message(mandatory_key_not_found.args[0]) 

-

90 raise SystemExit(1) from mandatory_key_not_found 

-

91 

-

92 # if --example flag, return the example to the user 

-

93 _new_show_example(example, config_scope) 

-

94 

-

95 # if the name is in the config.yml, create the scoped page 

-

96 scoped_page = _new_create_scoped_page(config_scope, inputs) 

-

97 

-

98 if dry_run: 

-

99 cli_message(f"{scoped_page.path} will be created") 

-

100 raise SystemExit(0) 

-

101 

-

102 try: 

-

103 result = scoped_page.save_to_disk() 

-

104 if isinstance(result, Success): 

-

105 cli_message(f"Saved {result.message} to disk") 

-

106 raise SystemExit(0) 

-

107 except exceptions.ScopedPageAlreadyExists as scoped_page_already_exists: 

-

108 cli_message(f"File {scoped_page_already_exists}") 

-

109 raise SystemExit(0) from scoped_page_already_exists 

-

110 

-

111 

-

112def _new_create_scoped_page(config_scope: dict, inputs: Collection[str]) -> pages.Page: 

-

113 page_creator_options = pages.PageCreatorOptions( 

-

114 base_path=tembo.cli.CONFIG.base_path, 

-

115 template_path=tembo.cli.CONFIG.template_path, 

-

116 page_path=config_scope["path"], 

-

117 filename=config_scope["filename"], 

-

118 extension=config_scope["extension"], 

-

119 name=config_scope["name"], 

-

120 example=config_scope["example"], 

-

121 user_input=inputs, 

-

122 template_filename=config_scope["template_filename"], 

-

123 ) 

-

124 try: 

-

125 return pages.ScopedPageCreator(page_creator_options).create_page() 

-

126 except exceptions.BasePathDoesNotExistError as base_path_does_not_exist_error: 

-

127 cli_message(base_path_does_not_exist_error.args[0]) 

-

128 raise SystemExit(1) from base_path_does_not_exist_error 

-

129 except exceptions.TemplateFileNotFoundError as template_file_not_found_error: 

-

130 cli_message(template_file_not_found_error.args[0]) 

-

131 raise SystemExit(1) from template_file_not_found_error 

-

132 except exceptions.MismatchedTokenError as mismatched_token_error: 

-

133 if config_scope["example"] is not None: 

-

134 cli_message( 

-

135 f"Your tembo config.yml/template specifies {mismatched_token_error.expected}" 

-

136 + f" input tokens, you gave {mismatched_token_error.given}. " 

-

137 + f'Example: {config_scope["example"]}' 

-

138 ) 

-

139 raise SystemExit(1) from mismatched_token_error 

-

140 cli_message( 

-

141 f"Your tembo config.yml/template specifies {mismatched_token_error.expected}" 

-

142 + f" input tokens, you gave {mismatched_token_error.given}" 

-

143 ) 

-

144 

-

145 raise SystemExit(1) from mismatched_token_error 

-

146 

-

147 

-

148def _new_verify_name_exists(scope: str) -> None: 

-

149 _name_found = scope in [user_scope["name"] for user_scope in tembo.cli.CONFIG.scopes] 

-

150 if _name_found: 

-

151 return 

-

152 if len(tembo.cli.CONFIG.scopes) > 0: 

-

153 # if the name is missing in the config.yml, raise error 

-

154 raise exceptions.ScopeNotFound(f"Scope {scope} not found in config.yml") 

-

155 # raise error if no config.yml found 

-

156 if pathlib.Path(tembo.cli.CONFIG.config_path).exists(): 

-

157 raise exceptions.EmptyConfigYML( 

-

158 f"Config.yml found in {tembo.cli.CONFIG.config_path} is empty" 

-

159 ) 

-

160 raise exceptions.MissingConfigYML(f"No config.yml found in {tembo.cli.CONFIG.config_path}") 

-

161 

-

162 

-

163def _new_get_config_scope(scope: str) -> dict: 

-

164 config_scope = {} 

-

165 optional_keys = ["example", "template_filename"] 

-

166 for option in [ 

-

167 "name", 

-

168 "path", 

-

169 "filename", 

-

170 "extension", 

-

171 "example", 

-

172 "template_filename", 

-

173 ]: 

-

174 try: 

-

175 config_scope.update( 

-

176 { 

-

177 option: str(user_scope[option]) 

-

178 for user_scope in tembo.cli.CONFIG.scopes 

-

179 if user_scope["name"] == scope 

-

180 } 

-

181 ) 

-

182 except KeyError as key_error: 

-

183 if key_error.args[0] in optional_keys: 

-

184 config_scope.update({key_error.args[0]: None}) 

-

185 continue 

-

186 raise exceptions.MandatoryKeyNotFound(f"Key {key_error} not found in config.yml") 

-

187 return config_scope 

-

188 

-

189 

-

190def _new_show_example(example: bool, config_scope: dict) -> None: 

-

191 if example: 

-

192 if isinstance(config_scope["example"], str): 

-

193 cli_message(f'Example for {config_scope["name"]}: {config_scope["example"]}') 

-

194 else: 

-

195 cli_message("No example in config.yml") 

-

196 raise SystemExit(0) 

-

197 

-

198 

-

199def cli_message(message: str) -> None: 

-

200 """ 

-

201 Relay a message to the user using the CLI. 

-

202 

-

203 Args: 

-

204 message (str): THe message to be displayed. 

-

205 """ 

-

206 click.echo(f"[TEMBO] {message} 🐘") 

-

207 

-

208 

-

209main.add_command(new) 

-

210main.add_command(list_all) 

-
- - - diff --git a/coverage/d_678a5ac99edfd408___init___py.html b/coverage/d_678a5ac99edfd408___init___py.html deleted file mode 100644 index d29f628..0000000 --- a/coverage/d_678a5ac99edfd408___init___py.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - Coverage for tembo/__init__.py: 100% - - - - - -
-
-

- Coverage for tembo/__init__.py: - 100% -

-
- - -
-

Shortcuts on this page

-
-

- r - m - x -   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
-
-

- 2 statements   - - - -

-
- - - - -
-
-
-
-

1""" 

-

2Tembo package. 

-

3 

-

4A simple folder organiser for your work notes. 

-

5""" 

-

6 

-

7# flake8: noqa 

-

8 

-

9from . import exceptions 

-

10from .journal.pages import PageCreatorOptions, ScopedPageCreator 

-
- - - diff --git a/coverage/d_678a5ac99edfd408___main___py.html b/coverage/d_678a5ac99edfd408___main___py.html deleted file mode 100644 index ecc5c7d..0000000 --- a/coverage/d_678a5ac99edfd408___main___py.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - Coverage for tembo/__main__.py: 0% - - - - - -
-
-

- Coverage for tembo/__main__.py: - 0% -

-
- - -
-

Shortcuts on this page

-
-

- r - m - x -   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
-
-

- 4 statements   - - - -

-
- - - - -
-
-
-
-

1""" 

-

2Entrypoint module. 

-

3 

-

4Used when using `python -m tembo` to invoke the CLI. 

-

5""" 

-

6 

-

7import sys 

-

8 

-

9from tembo.cli.cli import main 

-

10 

-

11if __name__ == "__main__": 

-

12 sys.exit(main()) 

-
- - - diff --git a/coverage/d_678a5ac99edfd408__version_py.html b/coverage/d_678a5ac99edfd408__version_py.html deleted file mode 100644 index ca33e62..0000000 --- a/coverage/d_678a5ac99edfd408__version_py.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - Coverage for tembo/_version.py: 100% - - - - - -
-
-

- Coverage for tembo/_version.py: - 100% -

-
- - -
-

Shortcuts on this page

-
-

- r - m - x -   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
-
-

- 1 statements   - - - -

-
- - - - -
-
-
-
-

1"""Module containing the version of tembo.""" 

-

2 

-

3__version__ = "1.0.1" 

-
- - - diff --git a/coverage/d_678a5ac99edfd408_exceptions_py.html b/coverage/d_678a5ac99edfd408_exceptions_py.html deleted file mode 100644 index 7742e65..0000000 --- a/coverage/d_678a5ac99edfd408_exceptions_py.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - Coverage for tembo/exceptions.py: 100% - - - - - -
-
-

- Coverage for tembo/exceptions.py: - 100% -

-
- - -
-

Shortcuts on this page

-
-

- r - m - x -   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
-
-

- 12 statements   - - - -

-
- - - - -
-
-
-
-

1"""Module containing custom exceptions.""" 

-

2 

-

3 

-

4class MismatchedTokenError(Exception): 

-

5 """ 

-

6 Raised when the number of input tokens does not match the user config. 

-

7 

-

8 Attributes: 

-

9 expected (int): number of input tokens in the user config. 

-

10 given (int): number of input tokens passed in. 

-

11 """ 

-

12 

-

13 def __init__(self, expected: int, given: int) -> None: 

-

14 """ 

-

15 Initialise the exception. 

-

16 

-

17 Args: 

-

18 expected (int): number of input tokens in the user config. 

-

19 given (int): number of input tokens passed in. 

-

20 """ 

-

21 self.expected = expected 

-

22 self.given = given 

-

23 super().__init__() 

-

24 

-

25 

-

26class BasePathDoesNotExistError(Exception): 

-

27 """Raised if the base path does not exist.""" 

-

28 

-

29 

-

30class TemplateFileNotFoundError(Exception): 

-

31 """Raised if the template file does not exist.""" 

-

32 

-

33 

-

34class ScopedPageAlreadyExists(Exception): 

-

35 """Raised if the scoped page file already exists.""" 

-

36 

-

37 

-

38class MissingConfigYML(Exception): 

-

39 """Raised if the config.yml file is missing.""" 

-

40 

-

41 

-

42class EmptyConfigYML(Exception): 

-

43 """Raised if the config.yml file is empty.""" 

-

44 

-

45 

-

46class ScopeNotFound(Exception): 

-

47 """Raised if the scope does not exist in the config.yml.""" 

-

48 

-

49 

-

50class MandatoryKeyNotFound(Exception): 

-

51 """Raised if a mandatory key is not found in the config.yml.""" 

-
- - - diff --git a/coverage/d_9c7e16c5deec493b___init___py.html b/coverage/d_9c7e16c5deec493b___init___py.html deleted file mode 100644 index 5da5ae8..0000000 --- a/coverage/d_9c7e16c5deec493b___init___py.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - Coverage for tembo/utils/__init__.py: 100% - - - - - -
-
-

- Coverage for tembo/utils/__init__.py: - 100% -

-
- - -
-

Shortcuts on this page

-
-

- r - m - x -   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
-
-

- 4 statements   - - - -

-
- - - - -
-
-
-
-

1"""Subpackage containing utility objects.""" 

-

2 

-

3from dataclasses import dataclass 

-

4 

-

5 

-

6@dataclass 

-

7class Success: 

-

8 """ 

-

9 A Tembo success object. 

-

10 

-

11 This is returned from [Page][tembo.journal.pages.ScopedPage] methods such as 

-

12 [save_to_disk()][tembo.journal.pages.ScopedPage.save_to_disk] 

-

13 

-

14 Attributes: 

-

15 message (str): A success message. 

-

16 """ 

-

17 

-

18 message: str 

-
- - - diff --git a/coverage/d_e89a57001f83f3a6___init___py.html b/coverage/d_e89a57001f83f3a6___init___py.html deleted file mode 100644 index deec0f0..0000000 --- a/coverage/d_e89a57001f83f3a6___init___py.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - Coverage for tembo/journal/__init__.py: 100% - - - - - -
-
-

- Coverage for tembo/journal/__init__.py: - 100% -

-
- - -
-

Shortcuts on this page

-
-

- r - m - x -   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
-
-

- 1 statements   - - - -

-
- - - - -
-
-
-
-

1"""Subpackage containing the logic to create Tembo journals & pages.""" 

-

2 

-

3# flake8: noqa 

-

4 

-

5from tembo.journal import pages 

-
- - - diff --git a/coverage/d_e89a57001f83f3a6_pages_py.html b/coverage/d_e89a57001f83f3a6_pages_py.html deleted file mode 100644 index 8918e1f..0000000 --- a/coverage/d_e89a57001f83f3a6_pages_py.html +++ /dev/null @@ -1,550 +0,0 @@ - - - - - - Coverage for tembo/journal/pages.py: 99% - - - - - -
-
-

- Coverage for tembo/journal/pages.py: - 99% -

-
- - -
-

Shortcuts on this page

-
-

- r - m - x -   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
-
-

- 141 statements   - - - -

-
- - - - -
-
-
-
-

1"""Submodule containing the factories & page objects to create Tembo pages.""" 

-

2 

-

3from __future__ import annotations 

-

4 

-

5import pathlib 

-

6import re 

-

7from abc import ABCMeta, abstractmethod 

-

8from dataclasses import dataclass 

-

9from typing import Collection, Optional 

-

10 

-

11import jinja2 

-

12import pendulum 

-

13from jinja2.exceptions import TemplateNotFound 

-

14 

-

15import tembo.utils 

-

16from tembo import exceptions 

-

17 

-

18 

-

19@dataclass 

-

20class PageCreatorOptions: 

-

21 """ 

-

22 Options [dataclass][dataclasses.dataclass] to create a Page. 

-

23 

-

24 This is passed to an implemented instance of [PageCreator][tembo.journal.pages.PageCreator] 

-

25 

-

26 Attributes: 

-

27 base_path (str): The base path. 

-

28 page_path (str): The path of the page relative to the base path. 

-

29 filename (str): The filename of the page. 

-

30 extension (str): The extension of the page. 

-

31 name (str): The name of the scope. 

-

32 user_input (Collection[str] | None, optional): User input tokens. 

-

33 example (str | None, optional): User example command. 

-

34 template_path (str | None, optional): The path which contains the templates. This should 

-

35 be the full path and not relative to the base path. 

-

36 template_filename (str | None, optional): The template filename with extension relative 

-

37 to the template path. 

-

38 """ 

-

39 

-

40 base_path: str 

-

41 page_path: str 

-

42 filename: str 

-

43 extension: str 

-

44 name: str 

-

45 user_input: Optional[Collection[str]] = None 

-

46 example: Optional[str] = None 

-

47 template_path: Optional[str] = None 

-

48 template_filename: Optional[str] = None 

-

49 

-

50 

-

51class PageCreator: 

-

52 """ 

-

53 A PageCreator factory base class. 

-

54 

-

55 This factory should implement methods to create [Page][tembo.journal.pages.Page] objects. 

-

56 

-

57 !!! abstract 

-

58 This factory is an abstract base class and should be implemented for each 

-

59 [Page][tembo.journal.pages.Page] type. 

-

60 

-

61 The private methods 

-

62 

-

63 - `_check_base_path_exists()` 

-

64 - `_convert_base_path_to_path()` 

-

65 - `_load_template()` 

-

66 

-

67 are not abstract and are shared between all [Page][tembo.journal.pages.Page] types. 

-

68 """ 

-

69 

-

70 @abstractmethod 

-

71 def __init__(self, options: PageCreatorOptions) -> None: 

-

72 """ 

-

73 When implemented this should initialise the `PageCreator` factory. 

-

74 

-

75 Args: 

-

76 options (PageCreatorOptions): An instance of 

-

77 [PageCreatorOptions][tembo.journal.pages.PageCreatorOptions] 

-

78 

-

79 !!! abstract 

-

80 This method is abstract and should be implemented for each 

-

81 [Page][tembo.journal.pages.Page] type. 

-

82 """ 

-

83 raise NotImplementedError 

-

84 

-

85 @property 

-

86 @abstractmethod 

-

87 def options(self) -> PageCreatorOptions: 

-

88 """ 

-

89 When implemented this should return the `PageCreatorOptions` on the class. 

-

90 

-

91 Returns: 

-

92 PageCreatorOptions: the instance of 

-

93 [PageCreatorOptions][tembo.journal.pages.PageCreatorOptions] set on the class. 

-

94 

-

95 !!! abstract 

-

96 This method is abstract and should be implemented for each 

-

97 [Page][tembo.journal.pages.Page] type. 

-

98 """ 

-

99 raise NotImplementedError 

-

100 

-

101 @abstractmethod 

-

102 def create_page(self) -> Page: 

-

103 """ 

-

104 When implemented this should create a `Page` object. 

-

105 

-

106 Returns: 

-

107 Page: an implemented instance of [Page][tembo.journal.pages.Page] such as 

-

108 [ScopedPage][tembo.journal.pages.ScopedPage]. 

-

109 

-

110 !!! abstract 

-

111 This method is abstract and should be implemented for each 

-

112 [Page][tembo.journal.pages.Page] type. 

-

113 """ 

-

114 raise NotImplementedError 

-

115 

-

116 def _check_base_path_exists(self) -> None: 

-

117 """ 

-

118 Check that the base path exists. 

-

119 

-

120 Raises: 

-

121 exceptions.BasePathDoesNotExistError: raised if the base path does not exist. 

-

122 """ 

-

123 if not pathlib.Path(self.options.base_path).expanduser().exists(): 

-

124 raise exceptions.BasePathDoesNotExistError( 

-

125 f"Tembo base path of {self.options.base_path} does not exist." 

-

126 ) 

-

127 

-

128 def _convert_base_path_to_path(self) -> pathlib.Path: 

-

129 """ 

-

130 Convert the `base_path` from a `str` to a `pathlib.Path` object. 

-

131 

-

132 Returns: 

-

133 pathlib.Path: the `base_path` as a `pathlib.Path` object. 

-

134 """ 

-

135 path_to_file = ( 

-

136 pathlib.Path(self.options.base_path).expanduser() 

-

137 / pathlib.Path(self.options.page_path.replace(" ", "_")).expanduser() 

-

138 / self.options.filename.replace(" ", "_") 

-

139 ) 

-

140 # check for existing `.` in the extension 

-

141 extension = ( 

-

142 self.options.extension[1:] 

-

143 if self.options.extension[0] == "." 

-

144 else self.options.extension 

-

145 ) 

-

146 # return path with a file 

-

147 return path_to_file.with_suffix(f".{extension}") 

-

148 

-

149 def _load_template(self) -> str: 

-

150 """ 

-

151 Load the template file. 

-

152 

-

153 Raises: 

-

154 exceptions.TemplateFileNotFoundError: raised if the template file is specified but 

-

155 not found. 

-

156 

-

157 Returns: 

-

158 str: the contents of the template file. 

-

159 """ 

-

160 if self.options.template_filename is None: 

-

161 return "" 

-

162 if self.options.template_path is not None: 

-

163 converted_template_path = pathlib.Path(self.options.template_path).expanduser() 

-

164 else: 

-

165 converted_template_path = ( 

-

166 pathlib.Path(self.options.base_path).expanduser() / ".templates" 

-

167 ) 

-

168 

-

169 file_loader = jinja2.FileSystemLoader(converted_template_path) 

-

170 env = jinja2.Environment(loader=file_loader, autoescape=True) 

-

171 

-

172 try: 

-

173 loaded_template = env.get_template(self.options.template_filename) 

-

174 except TemplateNotFound as template_not_found: 

-

175 _template_file = f"{converted_template_path}/{template_not_found.args[0]}" 

-

176 raise exceptions.TemplateFileNotFoundError( 

-

177 f"Template file {_template_file} does not exist." 

-

178 ) from template_not_found 

-

179 return loaded_template.render() 

-

180 

-

181 

-

182class ScopedPageCreator(PageCreator): 

-

183 """ 

-

184 Factory to create a scoped page. 

-

185 

-

186 Attributes: 

-

187 base_path (str): base path of tembo. 

-

188 page_path (str): path of the page relative to the base path. 

-

189 filename (str): filename relative to the page path. 

-

190 extension (str): extension of file. 

-

191 """ 

-

192 

-

193 def __init__(self, options: PageCreatorOptions) -> None: 

-

194 """ 

-

195 Initialise a `ScopedPageCreator` factory. 

-

196 

-

197 Args: 

-

198 options (PageCreatorOptions): An instance of 

-

199 [PageCreatorOptions][tembo.journal.pages.PageCreatorOptions]. 

-

200 """ 

-

201 self._all_input_tokens: list[str] = [] 

-

202 self._options = options 

-

203 

-

204 @property 

-

205 def options(self) -> PageCreatorOptions: 

-

206 """ 

-

207 Return the `PageCreatorOptions` instance set on the factory. 

-

208 

-

209 Returns: 

-

210 PageCreatorOptions: 

-

211 An instance of [PageCreatorOptions][tembo.journal.pages.PageCreatorOptions]. 

-

212 """ 

-

213 return self._options 

-

214 

-

215 def create_page(self) -> Page: 

-

216 """ 

-

217 Create a [ScopedPage][tembo.journal.pages.ScopedPage] object. 

-

218 

-

219 This method will 

-

220 

-

221 - Check the `base_path` exists 

-

222 - Verify the input tokens match the number defined in the `config.yml` 

-

223 - Substitue the input tokens in the filepath 

-

224 - Load the template contents and substitue the input tokens 

-

225 

-

226 Raises: 

-

227 exceptions.MismatchedTokenError: Raises 

-

228 [MismatchedTokenError][tembo.exceptions.MismatchedTokenError] if the number of 

-

229 input tokens does not match the number of unique input tokens defined. 

-

230 exceptions.BasePathDoesNotExistError: Raises 

-

231 [BasePathDoesNotExistError][tembo.exceptions.BasePathDoesNotExistError] if the 

-

232 base path does not exist. 

-

233 exceptions.TemplateFileNotFoundError: Raises 

-

234 [TemplateFileNotFoundError][tembo.exceptions.TemplateFileNotFoundError] if the 

-

235 template file is specified but not found. 

-

236 

-

237 

-

238 Returns: 

-

239 Page: A [ScopedPage][tembo.journal.pages.ScopedPage] object using the 

-

240 `PageCreatorOptions`. 

-

241 """ 

-

242 try: 

-

243 self._check_base_path_exists() 

-

244 except exceptions.BasePathDoesNotExistError as base_path_does_not_exist_error: 

-

245 raise base_path_does_not_exist_error 

-

246 self._all_input_tokens = self._get_input_tokens() 

-

247 try: 

-

248 self._verify_input_tokens() 

-

249 except exceptions.MismatchedTokenError as mismatched_token_error: 

-

250 raise mismatched_token_error 

-

251 

-

252 path = self._convert_base_path_to_path() 

-

253 path = pathlib.Path(self._substitute_tokens(str(path))) 

-

254 

-

255 try: 

-

256 template_contents = self._load_template() 

-

257 except exceptions.TemplateFileNotFoundError as template_not_found_error: 

-

258 raise template_not_found_error 

-

259 if self.options.template_filename is not None: 

-

260 template_contents = self._substitute_tokens(template_contents) 

-

261 

-

262 return ScopedPage(path, template_contents) 

-

263 

-

264 def _get_input_tokens(self) -> list[str]: 

-

265 """Get the input tokens from the path & user template.""" 

-

266 path = str( 

-

267 pathlib.Path( 

-

268 self.options.base_path, 

-

269 self.options.page_path, 

-

270 self.options.filename, 

-

271 ) 

-

272 .expanduser() 

-

273 .with_suffix(f".{self.options.extension}") 

-

274 ) 

-

275 template_contents = self._load_template() 

-

276 # get the input tokens from both the path and the template 

-

277 all_input_tokens = [] 

-

278 for tokenified_string in (path, template_contents): 

-

279 all_input_tokens.extend(re.findall(r"(\{input\d*\})", tokenified_string)) 

-

280 return sorted(list(set(all_input_tokens))) 

-

281 

-

282 def _verify_input_tokens(self) -> None: 

-

283 """ 

-

284 Verify the input tokens. 

-

285 

-

286 The number of input tokens should match the number of unique input tokens defined in the 

-

287 path and the user's template. 

-

288 

-

289 Raises: 

-

290 exceptions.MismatchedTokenError: Raises 

-

291 [MismatchedTokenError][tembo.exceptions.MismatchedTokenError] if the number of 

-

292 input tokens does not match the number of unique input tokens defined. 

-

293 """ 

-

294 if len(self._all_input_tokens) > 0 and self.options.user_input is None: 

-

295 raise exceptions.MismatchedTokenError(expected=len(self._all_input_tokens), given=0) 

-

296 if self.options.user_input is None: 

-

297 return 

-

298 if len(self._all_input_tokens) != len(self.options.user_input): 

-

299 raise exceptions.MismatchedTokenError( 

-

300 expected=len(self._all_input_tokens), 

-

301 given=len(self.options.user_input), 

-

302 ) 

-

303 

-

304 def _substitute_tokens(self, tokenified_string: str) -> str: 

-

305 """For a tokened string, substitute input, name and date tokens.""" 

-

306 tokenified_string = self.__substitute_input_tokens(tokenified_string) 

-

307 tokenified_string = self.__substitute_name_tokens(tokenified_string) 

-

308 tokenified_string = self.__substitute_date_tokens(tokenified_string) 

-

309 return tokenified_string 

-

310 

-

311 def __substitute_input_tokens(self, tokenified_string: str) -> str: 

-

312 """ 

-

313 Substitue the input tokens in a `str` with the user input. 

-

314 

-

315 Args: 

-

316 tokenified_string (str): a string with input tokens. 

-

317 

-

318 Returns: 

-

319 str: the string with the input tokens replaced by the user input. 

-

320 

-

321 Examples: 

-

322 A `user_input` of `("monthly_meeting",)` with a `tokenified_string` of 

-

323 `/meetings/{input0}/` results in a string of `/meetings/monthly_meeting/` 

-

324 """ 

-

325 if self.options.user_input is not None: 

-

326 for input_value, extracted_token in zip( 

-

327 self.options.user_input, self._all_input_tokens 

-

328 ): 

-

329 tokenified_string = tokenified_string.replace( 

-

330 extracted_token, input_value.replace(" ", "_") 

-

331 ) 

-

332 return tokenified_string 

-

333 

-

334 def __substitute_name_tokens(self, tokenified_string: str) -> str: 

-

335 """Find any `{name}` tokens and substitute for the name value in a `str`.""" 

-

336 name_extraction = re.findall(r"(\{name\})", tokenified_string) 

-

337 for extracted_input in name_extraction: 

-

338 tokenified_string = tokenified_string.replace(extracted_input, self.options.name) 

-

339 return tokenified_string 

-

340 

-

341 @staticmethod 

-

342 def __substitute_date_tokens(tokenified_string: str) -> str: 

-

343 """Find any {d:%d-%M-%Y} tokens in a `str`.""" 

-

344 # extract the full token string 

-

345 date_extraction_token = re.findall(r"(\{d\:[^}]*\})", tokenified_string) 

-

346 for extracted_token in date_extraction_token: 

-

347 # extract the inner %d-%M-%Y only 

-

348 strftime_value = re.match(r"\{d\:([^\}]*)\}", extracted_token) 

-

349 if strftime_value is not None: 

-

350 strftime_value = strftime_value.group(1) 

-

351 if isinstance(strftime_value, str): 

-

352 tokenified_string = tokenified_string.replace( 

-

353 extracted_token, pendulum.now().strftime(strftime_value) 

-

354 ) 

-

355 return tokenified_string 

-

356 

-

357 

-

358class Page(metaclass=ABCMeta): 

-

359 """ 

-

360 Abstract Page class. 

-

361 

-

362 This interface is used to define a `Page` object. 

-

363 

-

364 A `Page` represents a note/page that will be saved to disk. 

-

365 

-

366 !!! abstract 

-

367 This object is an abstract base class and should be implemented for each `Page` type. 

-

368 """ 

-

369 

-

370 @abstractmethod 

-

371 def __init__(self, path: pathlib.Path, page_content: str) -> None: 

-

372 """ 

-

373 When implemented this should initalise a Page object. 

-

374 

-

375 Args: 

-

376 path (pathlib.Path): the full path of the page including the filename as a 

-

377 [Path][pathlib.Path]. 

-

378 page_content (str): the contents of the page. 

-

379 

-

380 !!! abstract 

-

381 This method is abstract and should be implemented for each `Page` type. 

-

382 """ 

-

383 raise NotImplementedError 

-

384 

-

385 @property 

-

386 @abstractmethod 

-

387 def path(self) -> pathlib.Path: 

-

388 """ 

-

389 When implemented this should return the full path of the page including the filename. 

-

390 

-

391 Returns: 

-

392 pathlib.Path: the path as a [Path][pathlib.Path] object. 

-

393 

-

394 !!! abstract 

-

395 This property is abstract and should be implemented for each `Page` type. 

-

396 """ 

-

397 raise NotImplementedError 

-

398 

-

399 @abstractmethod 

-

400 def save_to_disk(self) -> tembo.utils.Success: 

-

401 """ 

-

402 When implemented this should save the page to disk. 

-

403 

-

404 Returns: 

-

405 tembo.utils.Success: A Tembo [Success][tembo.utils.__init__.Success] object. 

-

406 

-

407 !!! abstract 

-

408 This method is abstract and should be implemented for each `Page` type. 

-

409 """ 

-

410 raise NotImplementedError 

-

411 

-

412 

-

413class ScopedPage(Page): 

-

414 """ 

-

415 A page that uses substitute tokens. 

-

416 

-

417 Attributes: 

-

418 path (pathlib.Path): a [Path][pathlib.Path] object of the page's filepath including the 

-

419 filename. 

-

420 page_content (str): the content of the page from the template. 

-

421 """ 

-

422 

-

423 def __init__(self, path: pathlib.Path, page_content: str) -> None: 

-

424 """ 

-

425 Initalise a scoped page object. 

-

426 

-

427 Args: 

-

428 path (pathlib.Path): a [Path][pathlib.Path] object of the page's filepath including 

-

429 the filename. 

-

430 page_content (str): the content of the page from the template. 

-

431 """ 

-

432 self._path = path 

-

433 self.page_content = page_content 

-

434 

-

435 def __str__(self) -> str: 

-

436 """ 

-

437 Return a `str` representation of a `ScopedPage`. 

-

438 

-

439 Examples: 

-

440 ``` 

-

441 >>> str(ScopedPage(Path("/home/bob/tembo/meetings/my_meeting_0.md"), "")) 

-

442 ScopedPage("/home/bob/tembo/meetings/my_meeting_0.md") 

-

443 ``` 

-

444 

-

445 Returns: 

-

446 str: The `ScopedPage` as a `str`. 

-

447 """ 

-

448 return f'ScopedPage("{self.path}")' 

-

449 

-

450 @property 

-

451 def path(self) -> pathlib.Path: 

-

452 """ 

-

453 Return the full path of the page. 

-

454 

-

455 Returns: 

-

456 pathlib.path: The full path of the page as a [Path][pathlib.Path] object. 

-

457 """ 

-

458 return self._path 

-

459 

-

460 def save_to_disk(self) -> tembo.utils.Success: 

-

461 """ 

-

462 Save the scoped page to disk and write the `page_content`. 

-

463 

-

464 Raises: 

-

465 exceptions.ScopedPageAlreadyExists: If the page already exists a 

-

466 [ScopedPageAlreadyExists][tembo.exceptions.ScopedPageAlreadyExists] exception 

-

467 is raised. 

-

468 

-

469 Returns: 

-

470 tembo.utils.Success: A [Success][tembo.utils.__init__.Success] with the path of the 

-

471 ScopedPage as the message. 

-

472 """ 

-

473 # create the parent directories 

-

474 scoped_page_file = pathlib.Path(self.path) 

-

475 scoped_page_file.parents[0].mkdir(parents=True, exist_ok=True) 

-

476 if scoped_page_file.exists(): 

-

477 raise exceptions.ScopedPageAlreadyExists(f"{self.path} already exists") 

-

478 with scoped_page_file.open("w", encoding="utf-8") as scoped_page: 

-

479 scoped_page.write(self.page_content) 

-

480 return tembo.utils.Success(str(self.path)) 

-
- - - diff --git a/coverage/favicon_32.png b/coverage/favicon_32.png deleted file mode 100644 index 8649f0475d8d20793b2ec431fe25a186a414cf10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1732 zcmV;#20QtQP)K2KOkBOVxIZChq#W-v7@TU%U6P(wycKT1hUJUToW3ke1U1ONa4 z000000000000000bb)GRa9mqwR9|UWHy;^RUrt?IT__Y0JUcxmBP0(51q1>E00030 z|NrOz)aw7%8sJzM<5^g%z7^qE`}_Ot|JUUG(NUkWzR|7K?Zo%@_v-8G-1N%N=D$;; zw;keH4dGY$`1t4M=HK_s*zm^0#KgqfwWhe3qO_HtvXYvtjgX>;-~C$L`&k>^R)9)7 zdPh2TL^pCnHC#0+_4D)M`p?qp!pq{jO_{8;$fbaflbx`Tn52n|n}8VFRTA1&ugOP< zPd{uvFjz7t*Vot1&d$l-xWCk}s;sQL&#O(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*vsh*P$w390i!FV~~_Hv6t2Zl<4VUi|rNja#boFt{%q~xGb z(2petq9A*_>~B*>?d?Olx^lmYg4)}sH2>G42RE; diff --git a/coverage/keybd_open.png b/coverage/keybd_open.png deleted file mode 100644 index a8bac6c9de256626c680f9e9e3f8ee81d9713ecd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9003 zcmeHLc{tST+n?-2i>)FxMv|DtSZA{DOOu_57&BjtZI~H*ma;_1l4LIxB9dJQ*|TO# zN!sjLvQy+8>YUSgf9L)E-g8~=``>Y0!#wx%xj*;)e4hJ$zP?Ym-Z>3679JK52*jqP zscJy|%SHXLGSN|g3$@6f1Az_(`xu?47+^iYt|X!@!3h9Uyj=k>;6<(w94t$&Tmv4vUI0Y(72z4p-=52qQm)ibdMG{Lq zK-QAXj0ngGo#r{-=KfvMuhjI#;F3ml_v?vI<2-B3E&Sb83IPcet8E#VcMLMbDBXp( zietxGS0^|mhdOuNU*! z>lxhuyJ~5HC9jEu^6wu9yggaJEILLJFELe{&yOk3uY^_mY(J*EdTA{CbDHru&S*s5 zFHGCrim@r19P**ASiJAew_7dD+e>cSOtls3Z#(>lZx1iINjrV7NNt%PDNcMkXlA*W z`Bs*%ezf4U5NxJm__K5P?GEB7`Q`04T`~MTc=Sf&%qHuFd;!rn3}>8+-@yEidsy4J zwgV$+ymZ>vxo%s!H&}(*({B{M0j#!`Lt5GDbvmkji<_pajk9^n5DO(1Q=&m;TJ!?& z?dIZM5vQ>Gv(&EdlJNx^(v{pFFPfSP@r^ zUhRTD7bv*AYH`?Gq11M%nz2r;gHNp42jVLD`5tDqtqX8m!12pRUB0&T%w5?UN8u2$ z{33ra^&{S8?zu^Udrw+}HTUH(`Hi#oxx_~8z^KjV88Ir*uZL|Sg~!j^L_s$=4bBRW zop?W3)Xm?LO6n3E9KHt6XpGZ_HN~5oyARM_FU(4I%qcBvz8@9K>nRPh&##*Eoh-~w z_nj&&SNa->_^2rmZKKZTTsb8qBi7eZ+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F8`bgRO G%6|bpD&^7u diff --git a/coverage/status.json b/coverage/status.json deleted file mode 100644 index e0100e8..0000000 --- a/coverage/status.json +++ /dev/null @@ -1 +0,0 @@ -{"format":2,"version":"6.1.2","globals":"c749f05b6072c4945ea4ece5d6d66c66","files":{"d_678a5ac99edfd408___init___py":{"hash":"a99bebc8a6ed6eb80f162815ae7bea72","index":{"nums":[0,1,2,0,0,0,0,0],"html_filename":"d_678a5ac99edfd408___init___py.html","relative_filename":"tembo/__init__.py"}},"d_678a5ac99edfd408___main___py":{"hash":"5002cd4aaebac8e3448a5e7c0f46fc3a","index":{"nums":[0,1,4,0,4,0,0,0],"html_filename":"d_678a5ac99edfd408___main___py.html","relative_filename":"tembo/__main__.py"}},"d_678a5ac99edfd408__version_py":{"hash":"15e46fbe4becea98e7345a593be20466","index":{"nums":[0,1,1,0,0,0,0,0],"html_filename":"d_678a5ac99edfd408__version_py.html","relative_filename":"tembo/_version.py"}},"d_2b703ede0196a3c0___init___py":{"hash":"3c1d021cb567ab0a155fff32d88fd635","index":{"nums":[0,1,19,0,5,0,0,0],"html_filename":"d_2b703ede0196a3c0___init___py.html","relative_filename":"tembo/cli/__init__.py"}},"d_2b703ede0196a3c0_cli_py":{"hash":"c0d0261821eb13d7f53779685ba8fa25","index":{"nums":[0,1,95,0,0,0,0,0],"html_filename":"d_2b703ede0196a3c0_cli_py.html","relative_filename":"tembo/cli/cli.py"}},"d_678a5ac99edfd408_exceptions_py":{"hash":"4abb389e11887aefc532fcdb0f8c62f5","index":{"nums":[0,1,12,0,0,0,0,0],"html_filename":"d_678a5ac99edfd408_exceptions_py.html","relative_filename":"tembo/exceptions.py"}},"d_e89a57001f83f3a6___init___py":{"hash":"7b454d07a69ae8e77062f31b080fcce4","index":{"nums":[0,1,1,0,0,0,0,0],"html_filename":"d_e89a57001f83f3a6___init___py.html","relative_filename":"tembo/journal/__init__.py"}},"d_e89a57001f83f3a6_pages_py":{"hash":"1d68a702c0314fbc06b610fc955a682f","index":{"nums":[0,1,141,6,2,0,0,0],"html_filename":"d_e89a57001f83f3a6_pages_py.html","relative_filename":"tembo/journal/pages.py"}},"d_9c7e16c5deec493b___init___py":{"hash":"f12bd9d58abb6caa9e29777c2dc5ac8e","index":{"nums":[0,1,4,0,0,0,0,0],"html_filename":"d_9c7e16c5deec493b___init___py.html","relative_filename":"tembo/utils/__init__.py"}}}} \ No newline at end of file diff --git a/coverage/style.css b/coverage/style.css deleted file mode 100644 index cca6f11..0000000 --- a/coverage/style.css +++ /dev/null @@ -1,307 +0,0 @@ -@charset "UTF-8"; -/* Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 */ -/* For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt */ -/* Don't edit this .css file. Edit the .scss file instead! */ -html, body, h1, h2, h3, p, table, td, th { margin: 0; padding: 0; border: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline; } - -body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 1em; background: #fff; color: #000; } - -@media (prefers-color-scheme: dark) { body { background: #1e1e1e; } } - -@media (prefers-color-scheme: dark) { body { color: #eee; } } - -html > body { font-size: 16px; } - -a:active, a:focus { outline: 2px dashed #007acc; } - -p { font-size: .875em; line-height: 1.4em; } - -table { border-collapse: collapse; } - -td { vertical-align: top; } - -table tr.hidden { display: none !important; } - -p#no_rows { display: none; font-size: 1.2em; } - -a.nav { text-decoration: none; color: inherit; } - -a.nav:hover { text-decoration: underline; color: inherit; } - -header { background: #f8f8f8; width: 100%; z-index: 2; border-bottom: 1px solid #ccc; } - -@media (prefers-color-scheme: dark) { header { background: black; } } - -@media (prefers-color-scheme: dark) { header { border-color: #333; } } - -header .content { padding: 1rem 3.5rem; } - -header h2 { margin-top: .5em; font-size: 1em; } - -header.sticky { position: fixed; left: 0; right: 0; height: 2.5em; } - -header.sticky .text { display: none; } - -header.sticky h1, header.sticky h2 { font-size: 1em; margin-top: 0; display: inline-block; } - -header.sticky .content { padding: 0.5rem 3.5rem; } - -header.sticky .content p { font-size: 1em; } - -header.sticky ~ #source { padding-top: 6.5em; } - -main { position: relative; z-index: 1; } - -.indexfile footer { margin: 1rem 3.5rem; } - -.pyfile footer { margin: 1rem 1rem; } - -footer .content { padding: 0; color: #666; font-style: italic; } - -@media (prefers-color-scheme: dark) { footer .content { color: #aaa; } } - -#index { margin: 1rem 0 0 3.5rem; } - -h1 { font-size: 1.25em; display: inline-block; } - -#filter_container { float: right; margin: 0 2em 0 0; } - -#filter_container input { width: 10em; padding: 0.2em 0.5em; border: 2px solid #ccc; background: #fff; color: #000; } - -@media (prefers-color-scheme: dark) { #filter_container input { border-color: #444; } } - -@media (prefers-color-scheme: dark) { #filter_container input { background: #1e1e1e; } } - -@media (prefers-color-scheme: dark) { #filter_container input { color: #eee; } } - -#filter_container input:focus { border-color: #007acc; } - -header button { font-family: inherit; font-size: inherit; border: 1px solid; border-radius: .2em; color: inherit; padding: .1em .5em; margin: 1px calc(.1em + 1px); cursor: pointer; border-color: #ccc; } - -@media (prefers-color-scheme: dark) { header button { border-color: #444; } } - -header button:active, header button:focus { outline: 2px dashed #007acc; } - -header button.run { background: #eeffee; } - -@media (prefers-color-scheme: dark) { header button.run { background: #373d29; } } - -header button.run.show_run { background: #dfd; border: 2px solid #00dd00; margin: 0 .1em; } - -@media (prefers-color-scheme: dark) { header button.run.show_run { background: #373d29; } } - -header button.mis { background: #ffeeee; } - -@media (prefers-color-scheme: dark) { header button.mis { background: #4b1818; } } - -header button.mis.show_mis { background: #fdd; border: 2px solid #ff0000; margin: 0 .1em; } - -@media (prefers-color-scheme: dark) { header button.mis.show_mis { background: #4b1818; } } - -header button.exc { background: #f7f7f7; } - -@media (prefers-color-scheme: dark) { header button.exc { background: #333; } } - -header button.exc.show_exc { background: #eee; border: 2px solid #808080; margin: 0 .1em; } - -@media (prefers-color-scheme: dark) { header button.exc.show_exc { background: #333; } } - -header button.par { background: #ffffd5; } - -@media (prefers-color-scheme: dark) { header button.par { background: #650; } } - -header button.par.show_par { background: #ffa; border: 2px solid #bbbb00; margin: 0 .1em; } - -@media (prefers-color-scheme: dark) { header button.par.show_par { background: #650; } } - -#help_panel, #source p .annotate.long { display: none; position: absolute; z-index: 999; background: #ffffcc; border: 1px solid #888; border-radius: .2em; color: #333; padding: .25em .5em; } - -#source p .annotate.long { white-space: normal; float: right; top: 1.75em; right: 1em; height: auto; } - -#help_panel_wrapper { float: right; position: relative; } - -#keyboard_icon { margin: 5px; } - -#help_panel_state { display: none; } - -#help_panel { top: 25px; right: 0; padding: .75em; border: 1px solid #883; } - -#help_panel .legend { font-style: italic; margin-bottom: 1em; } - -.indexfile #help_panel { width: 25em; } - -.pyfile #help_panel { width: 18em; } - -#help_panel_state:checked ~ #help_panel { display: block; } - -.keyhelp { margin-top: .75em; } - -kbd { border: 1px solid black; border-color: #888 #333 #333 #888; padding: .1em .35em; font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-weight: bold; background: #eee; border-radius: 3px; } - -#source { padding: 1em 0 1em 3.5rem; font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; } - -#source p { position: relative; white-space: pre; } - -#source p * { box-sizing: border-box; } - -#source p .n { float: left; text-align: right; width: 3.5rem; box-sizing: border-box; margin-left: -3.5rem; padding-right: 1em; color: #999; } - -@media (prefers-color-scheme: dark) { #source p .n { color: #777; } } - -#source p .n.highlight { background: #ffdd00; } - -#source p .n a { margin-top: -4em; padding-top: 4em; text-decoration: none; color: #999; } - -@media (prefers-color-scheme: dark) { #source p .n a { color: #777; } } - -#source p .n a:hover { text-decoration: underline; color: #999; } - -@media (prefers-color-scheme: dark) { #source p .n a:hover { color: #777; } } - -#source p .t { display: inline-block; width: 100%; box-sizing: border-box; margin-left: -.5em; padding-left: 0.3em; border-left: 0.2em solid #fff; } - -@media (prefers-color-scheme: dark) { #source p .t { border-color: #1e1e1e; } } - -#source p .t:hover { background: #f2f2f2; } - -@media (prefers-color-scheme: dark) { #source p .t:hover { background: #282828; } } - -#source p .t:hover ~ .r .annotate.long { display: block; } - -#source p .t .com { color: #008000; font-style: italic; line-height: 1px; } - -@media (prefers-color-scheme: dark) { #source p .t .com { color: #6a9955; } } - -#source p .t .key { font-weight: bold; line-height: 1px; } - -#source p .t .str { color: #0451a5; } - -@media (prefers-color-scheme: dark) { #source p .t .str { color: #9cdcfe; } } - -#source p.mis .t { border-left: 0.2em solid #ff0000; } - -#source p.mis.show_mis .t { background: #fdd; } - -@media (prefers-color-scheme: dark) { #source p.mis.show_mis .t { background: #4b1818; } } - -#source p.mis.show_mis .t:hover { background: #f2d2d2; } - -@media (prefers-color-scheme: dark) { #source p.mis.show_mis .t:hover { background: #532323; } } - -#source p.run .t { border-left: 0.2em solid #00dd00; } - -#source p.run.show_run .t { background: #dfd; } - -@media (prefers-color-scheme: dark) { #source p.run.show_run .t { background: #373d29; } } - -#source p.run.show_run .t:hover { background: #d2f2d2; } - -@media (prefers-color-scheme: dark) { #source p.run.show_run .t:hover { background: #404633; } } - -#source p.exc .t { border-left: 0.2em solid #808080; } - -#source p.exc.show_exc .t { background: #eee; } - -@media (prefers-color-scheme: dark) { #source p.exc.show_exc .t { background: #333; } } - -#source p.exc.show_exc .t:hover { background: #e2e2e2; } - -@media (prefers-color-scheme: dark) { #source p.exc.show_exc .t:hover { background: #3c3c3c; } } - -#source p.par .t { border-left: 0.2em solid #bbbb00; } - -#source p.par.show_par .t { background: #ffa; } - -@media (prefers-color-scheme: dark) { #source p.par.show_par .t { background: #650; } } - -#source p.par.show_par .t:hover { background: #f2f2a2; } - -@media (prefers-color-scheme: dark) { #source p.par.show_par .t:hover { background: #6d5d0c; } } - -#source p .r { position: absolute; top: 0; right: 2.5em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; } - -#source p .annotate { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; color: #666; padding-right: .5em; } - -@media (prefers-color-scheme: dark) { #source p .annotate { color: #ddd; } } - -#source p .annotate.short:hover ~ .long { display: block; } - -#source p .annotate.long { width: 30em; right: 2.5em; } - -#source p input { display: none; } - -#source p input ~ .r label.ctx { cursor: pointer; border-radius: .25em; } - -#source p input ~ .r label.ctx::before { content: "▶ "; } - -#source p input ~ .r label.ctx:hover { background: #e8f4ff; color: #666; } - -@media (prefers-color-scheme: dark) { #source p input ~ .r label.ctx:hover { background: #0f3a42; } } - -@media (prefers-color-scheme: dark) { #source p input ~ .r label.ctx:hover { color: #aaa; } } - -#source p input:checked ~ .r label.ctx { background: #d0e8ff; color: #666; border-radius: .75em .75em 0 0; padding: 0 .5em; margin: -.25em 0; } - -@media (prefers-color-scheme: dark) { #source p input:checked ~ .r label.ctx { background: #056; } } - -@media (prefers-color-scheme: dark) { #source p input:checked ~ .r label.ctx { color: #aaa; } } - -#source p input:checked ~ .r label.ctx::before { content: "▼ "; } - -#source p input:checked ~ .ctxs { padding: .25em .5em; overflow-y: scroll; max-height: 10.5em; } - -#source p label.ctx { color: #999; display: inline-block; padding: 0 .5em; font-size: .8333em; } - -@media (prefers-color-scheme: dark) { #source p label.ctx { color: #777; } } - -#source p .ctxs { display: block; max-height: 0; overflow-y: hidden; transition: all .2s; padding: 0 .5em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; white-space: nowrap; background: #d0e8ff; border-radius: .25em; margin-right: 1.75em; } - -@media (prefers-color-scheme: dark) { #source p .ctxs { background: #056; } } - -#source p .ctxs span { display: block; text-align: right; } - -#index { font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.875em; } - -#index table.index { margin-left: -.5em; } - -#index td, #index th { text-align: right; width: 5em; padding: .25em .5em; border-bottom: 1px solid #eee; } - -@media (prefers-color-scheme: dark) { #index td, #index th { border-color: #333; } } - -#index td.name, #index th.name { text-align: left; width: auto; } - -#index th { font-style: italic; color: #333; cursor: pointer; } - -@media (prefers-color-scheme: dark) { #index th { color: #ddd; } } - -#index th:hover { background: #eee; } - -@media (prefers-color-scheme: dark) { #index th:hover { background: #333; } } - -#index th[aria-sort="ascending"], #index th[aria-sort="descending"] { white-space: nowrap; background: #eee; padding-left: .5em; } - -@media (prefers-color-scheme: dark) { #index th[aria-sort="ascending"], #index th[aria-sort="descending"] { background: #333; } } - -#index th[aria-sort="ascending"]::after { font-family: sans-serif; content: " ↑"; } - -#index th[aria-sort="descending"]::after { font-family: sans-serif; content: " ↓"; } - -#index td.name a { text-decoration: none; color: inherit; } - -#index tr.total td, #index tr.total_dynamic td { font-weight: bold; border-top: 1px solid #ccc; border-bottom: none; } - -#index tr.file:hover { background: #eee; } - -@media (prefers-color-scheme: dark) { #index tr.file:hover { background: #333; } } - -#index tr.file:hover td.name { text-decoration: underline; color: inherit; } - -#scroll_marker { position: fixed; z-index: 3; right: 0; top: 0; width: 16px; height: 100%; background: #fff; border-left: 1px solid #eee; will-change: transform; } - -@media (prefers-color-scheme: dark) { #scroll_marker { background: #1e1e1e; } } - -@media (prefers-color-scheme: dark) { #scroll_marker { border-color: #333; } } - -#scroll_marker .marker { background: #ccc; position: absolute; min-height: 3px; width: 100%; } - -@media (prefers-color-scheme: dark) { #scroll_marker .marker { background: #444; } } diff --git a/coverage/index.html b/coverage/tmp.html similarity index 100% rename from coverage/index.html rename to coverage/tmp.html diff --git a/sitemap.xml.gz b/sitemap.xml.gz index fa96ee69cd21a82750b2b03caab7711dfe35ee4e..b46b4ef25ec00a4ddbfd1dfea74fc4d841f4ad43 100644 GIT binary patch delta 14 VcmX@cbc~5rzMF$%)kaoFMgSoT1M&a> delta 14 VcmX@cbc~5rzMF%iWFxC1BLE-$1H1qL