Skip to content

Chainsync cleanup#807

Merged
slundqui merged 34 commits intodelvtech:mainfrom
slundqui:chainsync_cleanup
Aug 9, 2023
Merged

Chainsync cleanup#807
slundqui merged 34 commits intodelvtech:mainfrom
slundqui:chainsync_cleanup

Conversation

@slundqui
Copy link
Copy Markdown

@slundqui slundqui commented Aug 9, 2023

General cleanup of chainsync (that touches on a couple of other packages). Here's a rundown:

Major changes:

  • Moving crash reporting and test from chainsync to agent0
  • Changing chainsync imports from within a subpackage to be relative imports. This fixes circular import issues
    • Need to go through other packages to match this import structure
  • Changing testing structure of chainsync to live close to the file it's testing, and renaming to be <file_to_be_tested>_test.py
    • elfpy still follows old testing structure, but the pytest config allows for both

Minor changes:

  • Moving chainsync base/hyperdrive to an outer db directory
  • Renaming postgres to db_interface
  • Moving hyperdrive specific transactions to hyperdrive dir, and renaming to HyperdriveTransactions
  • Moving get_hyperdrive_contract to ethpy
  • Moving helper functions for dashboard from the bin script to analysis
  • Adding checks to dashboard so it runs cleanly when there's no data
  • Removing pytest.ini in favor of defining in pyproject.toml

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
elf-simulations ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 9, 2023 9:38pm

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 9, 2023

Remaining rate limit: 4998 🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 9, 2023

Remaining rate limit: 4998 🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 9, 2023

Remaining rate limit: 4997 🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 9, 2023

Remaining rate limit: 4996 🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 9, 2023

Remaining rate limit: 5000 🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 9, 2023

Remaining rate limit: 4988 🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 9, 2023

Remaining rate limit: 4972 🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 9, 2023

Remaining rate limit: 4958 🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 9, 2023

Remaining rate limit: 5000 🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 9, 2023

Remaining rate limit: 4992 🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 9, 2023

Remaining rate limit: 4992 🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 9, 2023

Remaining rate limit: 4991 🚀

Comment thread lib/chainsync/chainsync/dashboard/usernames.py
Comment thread lib/chainsync/chainsync/dashboard/usernames.py
Comment thread lib/chainsync/chainsync/dashboard/usernames.py Outdated
Comment thread lib/chainsync/chainsync/db/hyperdrive/db_interface.py Outdated
@dpaiton
Copy link
Copy Markdown
Contributor

dpaiton commented Aug 9, 2023

might as well remove the lib/chainsync/tests folder

@dpaiton
Copy link
Copy Markdown
Contributor

dpaiton commented Aug 9, 2023

What is the intended difference between scripts and bin?

@dpaiton
Copy link
Copy Markdown
Contributor

dpaiton commented Aug 9, 2023

I think it is better to remove the db_ prefix in front of the files in the db folders. e.g. chainsync/db/base/db_schema.py --> chainsync/db/base/schema.py. Same for the ones in the db/hyperdrive folder.

@slundqui
Copy link
Copy Markdown
Author

slundqui commented Aug 9, 2023

What is the intended difference between scripts and bin?

bin are entrypoints to various services, e.g., from docker. scripts are one-offs, probably should be in jupytext format, and likely shouldn't really be tested or maintained, e.g., calculating previous leaderboards from trading competitions.

I don't know what the best way to keep something like scripts around, because for the time being, some of the functionality in those scripts can definitely be generalized once we get some time to look at it.

Comment thread lib/chainsync/chainsync/db/hyperdrive/interface.py
Comment thread lib/chainsync/chainsync/db/base/__init__.py Outdated
Comment thread lib/chainsync/chainsync/db/hyperdrive/convert_data.py
Copy link
Copy Markdown
Contributor

@dpaiton dpaiton left a comment

Choose a reason for hiding this comment

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

lgtm thanks for doing this & dealing with my many nits!

@slundqui slundqui merged commit b166160 into delvtech:main Aug 9, 2023
@slundqui slundqui deleted the chainsync_cleanup branch August 9, 2023 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants