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

winter-telescope / winterdrp / 3769531095

pending completion
3769531095

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/c9c60d6f5a2eb1ca848b81e8749cd3389f854ac1">c9c60d6f5">&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/c9c60d6f5a2eb1ca848b81e8749cd3389f854ac1">c9c60d6f5</a><a href="https://github.com/winter-telescope/winterdrp/commit/c9c60d6f5a2eb1ca848b81e8749cd3389f854ac1">&lt;a href=&quot;https://github.com/winter-telescope/winterdrp/commit/c9c60d6f5a2eb1ca848b81e8749cd3389f854ac1&quot;&gt;&amp;quot;&amp;gt;&amp;amp;lt;a href=&amp;amp;quot;https://github.com/winter-telescope/winterdrp/commit/&amp;lt;/a&amp;gt;&amp;lt;a class=&amp;quot;double-link&amp;quot; href=&amp;quot;https://github.com/winter-telescope/winterdrp/commit/&amp;amp;lt;a class=&amp;amp;quot;double-link&amp;amp;quot; href=&amp;amp;quot;https://git&amp;quot;&amp;gt;&amp;amp;lt;a class=&amp;lt;/a&amp;gt;hub.com/winter-telescope/winterdrp/commit/c9c60d6f5a2eb1ca848b81e8749cd3389f854ac1&amp;quot;&amp;gt;c9c60d6f5&amp;lt;/a&amp;gt;&amp;lt;a href=&amp;quot;https://github.com/winter-telescope/winterdrp/commit/c9c60d6f5a2eb1ca848b81e8749cd3389f854ac1&amp;quot;&amp;gt;&amp;amp;lt;a href=&amp;amp;quot;https://github.com/winter-telescope/winterdrp/commit/c9c60d6f5a2eb1ca848b81e8749cd338&amp;lt;/a&amp;gt;9f854ac1&amp;quot;</a>&gt;&amp;quot;&amp;gt;Merge &amp;lt;/a&amp;gt;&amp;lt;a class=&amp;quot;double-link&amp;quot; href=&amp;quot;https://github.com/winter-telescope/winterdrp/commit/&amp;lt;a class=&amp;quot;double-link&amp;quot; href=&amp;quot;https://github.com/winter-telescope/winterdrp/commit/&lt;a cla... (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