acmpesuecc / creme-brulee

0 stars 7 forks source link

Abstract away the row generation logic from file writers #2

Closed not-ad-chaos closed 1 month ago

not-ad-chaos commented 1 month ago

Currently, row generation and writing to the DB happen at the same time, which makes it very tightly coupled with the file type we'll be writing to. For example, if we wanted to instead generate a json or a csv, we will have to write bespoke code for each format, as seen in write_to_file and write_to_db, this is also error prone as any changes will need to be replicated everywhere.

It would be nice to be able to specify the file format to write_tables and everything else is taken care for automatically.

with MockDB(dbidx) as mdb:
    # writes a json
    mdb.init_tables().write_tables(MockDB.json).log_answer()
bunsamosa-bot[bot] commented 1 month ago

Thank you for opening this issue! A Maintainer will review it soon!

rithulkamesh commented 1 month ago

can i get assigned to this?

not-ad-chaos commented 1 month ago

!assign @rithulkamesh

not-ad-chaos commented 1 month ago

There has been a recession, this issue is now worth 800 points

bunsamosa-bot[bot] commented 1 month ago

Hey @not-ad-chaos! The timer for the @rithulkamesh to work on the issue has finished, deassign and assign a new contributor or extend the current timer. Contact maintainer leads if inactive @DedLad @polarhive @achyuthcodes30

not-ad-chaos commented 1 month ago

!deassign @rithulkamesh

not-ad-chaos commented 1 month ago

!assign @rithulkamesh 60

bunsamosa-bot[bot] commented 1 month ago

Hey @not-ad-chaos! The timer for the @rithulkamesh to work on the issue has finished, deassign and assign a new contributor or extend the current timer. Contact maintainer leads if inactive @DedLad @polarhive @achyuthcodes30

not-ad-chaos commented 1 month ago

!extend 30