<commit_before>from sqlalchemy import Column, Text, Integer, String, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine

Base = declarative_base()

connection_str = 'postgresql://vagrant:vagrant@localhost/restaurant_menu'


class Restaurant(Base):
    __tablename__ = 'restaurant'
    name = Column(Text, nullable=False)
    id = Column(Integer, primary_key=True)


class Menu(Base):
    __tablename__ = 'menu'
    name = Column(Text, nullable=False)
    id = Column(Integer, primary_key=True)
    course = Column(Text)
    description = Column(Text)
    price = Column(String(7))
    restaurant_id = Column(Integer, ForeignKey('restaurant.id'))
    restaurant = relationship(Restaurant)


engine = create_engine(connection_str)<commit_msg>Feat: Added serialization for Menu Table<commit_after>from sqlalchemy import Column, Text, Integer, String, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine

Base = declarative_base()

connection_str = 'postgresql://vagrant:vagrant@localhost/restaurant_menu'


class Restaurant(Base):
    __tablename__ = 'restaurant'
    name = Column(Text, nullable=False)
    id = Column(Integer, primary_key=True)


class Menu(Base):
    __tablename__ = 'menu'
    name = Column(Text, nullable=False)
    id = Column(Integer, primary_key=True)
    course = Column(Text)
    description = Column(Text)
    price = Column(String(7))
    restaurant_id = Column(Integer, ForeignKey('restaurant.id'))
    restaurant = relationship(Restaurant)

    @property
    def serialize(self):
        return {
            'id': self.id,
            'restaurant_id': self.restaurant_id,
            'name': self.name,
            'course': self.course,
            'description': self.description,
            'price': self.price,
        }


engine = create_engine(connection_str)
{'fraction_non_alphanumeric': 0.0994949494949495, 'fraction_numerical': 0.00101010101010101, 'mean_word_length': 4.1454545454545455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2872995', 'n_tokens_mistral': 612, 'n_tokens_neox': 587, 'n_words': 134}