issues
search
fetchai
/
ledger-subquery
This is the Fetch Ledger SubQuery project, an indexer for the Fetch network.
MIT License
2
stars
10
forks
source link
refactor: python models
#229
Closed
bryanchriswhite
closed
1 year ago
bryanchriswhite
commented
1 year ago
Rationale
Some inconsistencies have developed over time around the convention
The recent python linting PRs and resulting refactoring has illustrated the cost of unnecessary complexity in this area of the code
Changes
rename python model classes to match their respective table names
table name is the lower snake case of the respective class name
clean up any inconsistencies
compute table name in parent class using sub-class name
remove (now redundant)
get_table
methods from
NamedFields
sub-classes
Code Review Checklist (to be filled out by reviewer)
[ ] Description accurately reflects what changes are being made.
[ ] Either the PR references an issue (via the "Development" combobox) or the description explains the need for the changes.
[ ] The PR appropriately sized.
[ ] The PR contains an idempotent DB migration.
[ ] I have verified the correctness of the DB migration using relevant data (e.g. test-generated data).
[ ] New code has enough tests.
[ ] New code has enough documentation to answer "how do I use it?" and "what does it do?".
[ ] Existing documentation is up-to-date, if impacted.
Rationale
Changes
get_table
methods fromNamedFields
sub-classesCode Review Checklist (to be filled out by reviewer)