• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

XENONnT / straxen / 11293456467

11 Oct 2024 01:41PM UTC coverage: 89.774% (-0.06%) from 89.83%
11293456467

push

github

web-flow
Fixed default window position (#1429)

* fixed default window position

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed empty input handling

* fixed empty record handling II

* changed area averaging

* fixed default window clipping

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed minimum_led_position help and docstring

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed whitespace at the end of help strings

* fixed area averaging help strings

* Added baseline to datatype

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Giovanni Volta <38431109+GiovanniVolta@users.noreply.github.com>
Co-authored-by: Dacheng Xu <dx2227@columbia.edu>
Co-authored-by: Yue Ma <3124558229@qq.com>

15 of 30 new or added lines in 1 file covered. (50.0%)

4 existing lines in 2 files now uncovered.

9156 of 10199 relevant lines covered (89.77%)

1.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

14.63
/straxen/docs_utils.py
1
from m2r import convert
2✔
2

3
from .misc import kind_colors
2✔
4

5
header = """
2✔
6
Release notes
7
==============
8

9
"""
10

11

12
def convert_release_notes(notes, target, pull_url):
2✔
13
    """Convert the release notes to an RST page with links to PRs."""
14
    with open(notes, "r") as f:
×
15
        notes = f.read()
×
16
    rst = convert(notes)
×
17
    with_ref = ""
×
18
    for line in rst.split("\n"):
×
19
        # Get URL for PR
20
        if "#" in line:
×
21
            pr_number = line.split("#")[1]
×
22
            while len(pr_number):
×
23
                try:
×
24
                    pr_number = int(pr_number)
×
25
                    break
×
26
                except ValueError:
×
27
                    # Too many tailing characters to be an int
28
                    pr_number = pr_number[:-1]
×
29
            if pr_number:
×
30
                line = line.replace(
×
31
                    f"#{pr_number}",
32
                    f"`#{pr_number} <{pull_url}/{pr_number}>`_",
33
                )
34
        with_ref += line + "\n"
×
35

36
    with open(target, "w") as f:
×
37
        f.write(header + with_ref)
×
38

39

40
def add_spaces(x):
2✔
41
    """Add four spaces to every line in x.
42

43
    This is needed to make html raw blocks in rst format correctly
44

45
    """
46
    y = ""
×
47
    if isinstance(x, str):
×
48
        x = x.split("\n")
×
49
    for q in x:
×
50
        y += "    " + q
×
51
    return y
×
52

53

54
def add_deps_to_graph_tree(graph_tree, plugin, data_type, _seen=None):
2✔
55
    """Recursively add nodes to graph base on plugin.deps."""
56
    if _seen is None:
×
57
        _seen = []
×
58
    if data_type in _seen:
×
59
        return graph_tree, _seen
×
60

61
    # Add new one
62
    graph_tree.node(
×
63
        data_type,
64
        style="filled",
65
        href="#" + data_type.replace("_", "-"),
66
        fillcolor=kind_colors.get(plugin.data_kind_for(data_type), "grey"),
67
    )
68
    for dep in plugin.depends_on:
×
69
        graph_tree.edge(data_type, dep)
×
70

71
    # Add any of the lower plugins if we have to
72
    for lower_data_type, lower_plugin in plugin.deps.items():
×
73
        graph_tree, _seen = add_deps_to_graph_tree(graph_tree, lower_plugin, lower_data_type, _seen)
×
74
    _seen.append(data_type)
×
75
    return graph_tree, _seen
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc