Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[omm] Exchanges CRUD functions and tests #1374

Closed

Conversation

dougneal
Copy link
Contributor

Summary

Test Plan



@dataclass
class Hash(db.Model): # type: ignore[name-defined] # Should this be Signal?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is duplicate with ContentSignal

@@ -0,0 +1,39 @@
"""empty message
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing migrations at this stage seems like an undue burden. Easy enough to do flask reset_all_tables

class ContentSignal(db.Model): # type: ignore[name-defined]
id: Mapped[int] = mapped_column(primary_key=True)
content_id: Mapped[int] = mapped_column(ForeignKey("bank_content.id"))
signal_type: Mapped[str]
signal_val: Mapped[str] = mapped_column(Text)
id: Mapped[int] = db.Column(dbtypes.Integer, primary_key=True, autoincrement=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not mapped syntax? This seems like the preferred one

@@ -64,8 +69,36 @@ def as_storage_iface_cls(self) -> BankContentConfig:
)


@dataclass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This interacts strangely with db.Model and the columns - I found a few edge cases during working that I couldn't find a workaround to. I'm not sure its worth keeping :/

@Dcallies
Copy link
Contributor

Dcallies commented Mar 1, 2024

Hey @dougneal , I'm going to close this PR for inactivity, feel free to re-open if you still want to try and get it merged!

@Dcallies Dcallies closed this Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants