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

winter-telescope / winterdrp / 3769534174

pending completion
3769534174

Pull #256

github

GitHub
<a href="https://github.com/winter-telescope/winterdrp/commit/<a class=hub.com/winter-telescope/winterdrp/commit/<a class="double-link" href="https://git"><a class=hub.com/winter-telescope/winterdrp/commit/<a class="double-link" href="https://git"><a class=hub.com/winter-telescope/winterdrp/commit/<a class="double-link" href="https://git"><a class=hub.com/winter-telescope/winterdrp/commit/<a class="double-link" href="https://git"><a class=hub.com/winter-telescope/winterdrp/commit/fb65b52dfae2af597cf36513c5c72601721ab3b3">fb65b52df">&lt;a href=&quot;https://github.com/winter-telescope/winterdrp/commit/</a><a class="double-link" href="https://github.com/winter-telescope/winterdrp/commit/&lt;a class=&quot;double-link&quot; href=&quot;https://git">&lt;a class=</a>hub.com/winter-telescope/winterdrp/commit/&lt;a class=&quot;double-link&quot; href=&quot;https://git">&lt;a class=</a>hub.com/winter-telescope/winterdrp/commit/&lt;a class=&quot;double-link&quot; href=&quot;https://git">&lt;a class=</a>hub.com/winter-telescope/winterdrp/commit/&lt;a class=&quot;double-link&quot; href=&quot;https://git">&lt;a class=</a>hub.com/winter-telescope/winterdrp/commit/&lt;a class=&quot;double-link&quot; href=&quot;https://git">&lt;a class=</a>hub.com/winter-telescope/winterdrp/commit/fb65b52dfae2af597cf36513c5c72601721ab3b3">fb65b52df</a><a href="https://github.com/winter-telescope/winterdrp/commit/fb65b52dfae2af597cf36513c5c72601721ab3b3">&quot;&gt;&amp;lt;a href=&amp;quot;https://github.com/winter-telescope/winterdrp/commit/&lt;/a&gt;&lt;a class=&quot;double-link&quot; href=&quot;https://github.com/winter-telescope/winterdrp/commit/&amp;lt;a class=&amp;quot;double-link&amp;quot; href=&amp;quot;https://git&quot;&gt;&amp;lt;a class=&lt;/a&gt;hub.com/winter-telescope/winterdrp/commit/&amp;lt;a class=&amp;quot;double-link&amp;quot; href=&amp;quot;https://git&quot;&gt;&amp;lt;a class=&lt;/a&gt;hub.com/winter-telescope/winterdrp/commit/&amp;lt;a class=&amp;quot;double-link&amp;quot; href=&amp;quot;https://git&quot;&gt;&amp;lt;a class=&lt;/a&gt;hub.com/winter-telescope/winterdrp/commit/fb65b52dfae2af597cf36513c5c72601721ab3b3&quot;&gt;fb65b52df&lt;/a&gt;&lt;a href=&quot;https://github.com/winter-telescope/winterdrp/commit/fb65b52dfae2af597cf36513c5c72601721ab3b3&quot;&gt;&amp;lt;a href=&amp;quot;https://github.com/winter-telescope/winterdrp/commit/fb65b52dfae2af597cf36513c5c72601721ab3b3&amp;quot;&amp;... (continued)
Pull Request #256: Lintify

90 of 90 new or added lines in 15 files covered. (100.0%)

4632 of 6121 relevant lines covered (75.67%)

0.76 hits per line

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

57.14
/winterdrp/data/source_data.py
1
"""
2
Module for SourceTable objects, and their corresponding SourceBatches
3
"""
4
from typing import Optional
1✔
5

6
import pandas as pd
1✔
7

8
from winterdrp.data.base_data import DataBatch, DataBlock
1✔
9

10

11
class SourceTable(DataBlock):
1✔
12
    """
13
    Data class for SourceTables, a type data block  based around
14
    sources detected in an image
15
    """
16

17
    def __init__(self, source_list: pd.DataFrame, metadata: dict):
1✔
18
        self.source_list = source_list
×
19
        self.metadata = metadata
×
20
        super().__init__()
×
21

22
    def get_data(self) -> pd.DataFrame:
1✔
23
        """
24
        Get the table of sources
25

26
        :return: source dataframe
27
        """
28
        return self.source_list
×
29

30
    def set_data(self, source_list: pd.DataFrame):
1✔
31
        """
32
        Set the table of sources
33

34
        :param source_list: new source list
35
        :return: None
36
        """
37
        self.source_list = source_list
×
38

39
    def get_metadata(self) -> dict:
1✔
40
        """
41
        Get the metadata associated with the source table
42

43
        :return: metadata
44
        """
45
        return self.metadata
×
46

47
    def __getitem__(self, item):
1✔
48
        return self.metadata.__getitem__(item)
×
49

50
    def __setitem__(self, key, value):
1✔
51
        self.metadata.__setitem__(key, value)
×
52

53
    def keys(self):
1✔
54
        """
55
        Return the metadata keys
56

57
        :return: keys
58
        """
59
        return self.metadata.keys()
×
60

61

62
class SourceBatch(DataBatch):
1✔
63
    """
64
    DataBatch class for holding SourceTables
65
    """
66

67
    data_type = SourceTable
1✔
68

69
    def __init__(self, batch: Optional[list[SourceTable] | SourceTable] = None):
1✔
70
        super().__init__(batch=batch)
×
71

72
    def append(self, item: SourceTable):
1✔
73
        self._append(item)
×
74

75
    def get_batch(self) -> list[SourceTable]:
1✔
76
        return self.get_data_list()
×
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

© 2026 Coveralls, Inc