Beispiel #1
0
class TraceSheet(TableSheet):
    line_nr = IntColumn()
    trace_id = CharColumn()
    cpu_id = CharColumn()
    thread_id = CharColumn()
    timestamp = CharColumn()
    time_diff = IntColumn()
Beispiel #2
0
class Table_Sheet(TableSheet):
    affects_url = CharColumn()
    severity = IntColumn()
    criticality = IntColumn()
    affects_detail = CharColumn()
    vt_name = CharColumn()
    last_seen = CharColumn()
    status = CharColumn()
Beispiel #3
0
class IceCreamSheet(TableSheet):
    name = CharColumn()
    description = TextColumn(width=32)
    flavour = CharColumn()
    color = CharColumn()
    price = FloatColumn()

    def create_object(self, row_number, **data):
        return IceCream(**data)
class PersonSheet(TableSheet):
    first_name = CharColumn()
    last_name = CharColumn()
    date_of_birth = DateColumn()
    favorite_fruit = ChoiceColumn(choices=(
        (Fruits.apple, "Apple"),
        (Fruits.banana, "Banana"),
        (Fruits.orange, "Orange"),
    ))
Beispiel #5
0
class TransactionsReportSheet(TableSheet):
    # Date	Account Balance	Type	Details	Position ID	Amount	Realized Equity Change	Realized Equity	NWA
    date = CharColumn(header="Date")
    account_balance = CharColumn(header="Account Balance")
    type = CharColumn(header="Type")
    details = CharColumn(header="Details")
    position_id = CharColumn(header="Position ID")
    amount = CharColumn(header="Amount")
    realized_equity_change = CharColumn(header="Realized Equity Change")
    realized_equity = CharColumn(header="Realized Equity")
    nwa = CharColumn(header="NWA")
class PrettyDemoSheet(TableSheet):
    def __init__(self):
        super().__init__(title_style="Bold & red, title",
                         description_style="Extra tiny, description")

    column1 = CharColumn()
    column2 = IntColumn()
Beispiel #7
0
class DividendsSheet(TableSheet):
    date = CharColumn(header="Date")
    symbol = CharColumn(header="Symbol")
    name = CharColumn(header="Company/Name", width=60)
    dividend_eur = CharColumn(header="Dividend [EUR]")
    currency = CharColumn(header="Orig. currency")
    position_ids = CharColumn(header="Position ID(s)")
    link = CharColumn(header="Info link", width=60, cell_style="hyperlink")
Beispiel #8
0
class OrgStructureWorksheet(TableSheet):
    name = CharColumn(header="Name")
    title = CharColumn(header="Title")
    unit = CharColumn(header="Unit")
    manager = CharColumn(header="Manager",
                         getter=lambda column, obj: obj.manager.name
                         if obj.manager else "")
    level = IntColumn(header="Level")

    hide_excess_columns = False

    row_styles = [
        RowStyle(row_type=1,
                 cell_style=ExtendedStyle(None,
                                          lambda x: x + " level 1",
                                          fill=SolidFill("bbbbbb"))),
        RowStyle(row_type=2,
                 cell_style=ExtendedStyle(None,
                                          lambda x: x + " level 2",
                                          fill=SolidFill("dddddd"))),
    ]

    def row_type(self, object, row_number):
        return object.level
Beispiel #9
0
class ColumnDemoSheet(TableSheet):
    table_name = "ColumnDemo"

    char = CharColumn(header="CharColumn")
    text = TextColumn(header="TextColumn", freeze=True)
    boolean = BoolColumn(header="BoolColumn",
                         row_style="Row, integer",
                         conditional_formatting=bold_true)
    integer = IntColumn(header="IntColumn", group=True)
    float = FloatColumn(header="FloatColumn", group=True)
    datetime = DatetimeColumn(header="DatetimeColumn", group=True)
    date = DateColumn(header="DateColumn")
    time = TimeColumn(header="TimeColumn", group=True)
    formula = FormulaColumn(header="FormulaColumn",
                            formula="=SUM(ColumnDemo[IntColumn])")
Beispiel #10
0
    def test_string_to_long(self):
        column = CharColumn(max_length=5)
        column._from_excel(FakeCell("12345"))

        with self.assertRaises(StringToLong):
            column._from_excel(FakeCell("123456"))
Beispiel #11
0
 def setUp(self):
     self.column = CharColumn()
Beispiel #12
0
class ExtendedDemoTableSheet(DemoTableSheet):
    column3 = CharColumn()
Beispiel #13
0
class DemoTableSheet(TableSheet):
    column1 = CharColumn(header="Header 1")
    column2 = IntColumn()  # The header of column2 will be set automatically to "column2"
Beispiel #14
0
class DemoTableSheet(TableSheet):
    column1 = CharColumn()
    column2 = IntColumn()
Beispiel #15
0
class ClosedPositionsSheet(TableSheet):
    # Position ID	Action	Copy Trader Name	Amount	Units	Open Rate	Close Rate	Spread	Profit	Open Date	Close Date	Take Profit Rate	Stop Loss Rate	Rollover Fees And Dividends	Is Real	Leverage	Notes
    position_id = CharColumn(header="Position ID")
    action = CharColumn(header="Action")
    trader = CharColumn(header="Copy Trader Name")
    amount = CharColumn(header="Amount")
    units = CharColumn(header="Units")
    open_rate = CharColumn(header="Open Rate")
    close_rate = CharColumn(header="Close Rate")
    spread = CharColumn(header="Spread")
    profit = CharColumn(header="Profit")
    open_date = CharColumn(header="Open Date")
    close_date = CharColumn(header="Close Date")
    take_profit_rate = CharColumn(header="Take Profit Rate")
    stop_loss_rate = CharColumn(header="Stop Loss Rate")
    rollover_fees_and_dividends = CharColumn(
        header="Rollover Fees And Dividends")
    is_real = CharColumn(header="Is Real")
    leverage = CharColumn(header="Leverage")
    notes = CharColumn(header="Notes")
class TableSheetElements(TableSheet):
    column1 = CharColumn(header="Header 1")
    column2 = CharColumn(header="Header 2")
    column3 = CharColumn(header="Header 3")
    column4 = CharColumn(header="Header 4")
Beispiel #17
0
class CryptoInfoSheet(TableSheet):
    name = CharColumn(header='Crypto name')
    symbol = CharColumn(header='Symbol')