You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we're using an in memory sqlite database as a dropin for postgres for tests. This works fine most of the time, but there are cases where we'd like to explicitly test postgres functionality. The most glaring issue is that sqlite doesn't have a fixed scale numeric type, and instead uses floats as a drop-in. This means we can't do any precision checks in our tests, and have to do a best effort check against values.
The easiest solution for this is to bring up a postgres container for testing. However, this has a bit of complexity, as our tests need to be able to run in CI.
The text was updated successfully, but these errors were encountered:
This PR adds the first system test for elf-simulations.
Major changes:
- It's here! Adds a system test that runs from bots to postgres db on a
local test chain.
- Adding custom bot for test fixtures that cycles through all trades
with known amounts
- Moving `acquire_data.py` to be within chainsync package, and writing
minimal entry point to call
- Breaking change: data capture script renamed from `acquire_data.py` to
`run_chainsync.py`
- Parameterizing `acquire_data.py` to allow for system tests
- Explicitly setting a precision and scale for the Numeric postgres type
Minor changes:
- Adding script for making vscode debugging pytest easier
- Moving helper function `get_web3_and_contracts` from agent0 to ethpy
- Adding `coerce_float` to all postgres getter functions
- Docstrings
- Formatting
Bug fixes:
- Fixed a bug that stores `invTimeStretch` as unscaled values
- Fixed a bug with postgres/python schema typing for `maturityTime`
TODO:
- Do more comparisons in system tests, e.g., how much base for closing
longs, pool info, etc
- Break out system_test
- There are rounding issues with using in-memory sqlite, should use
containerized postgres
- #836
1. Spinning local postgres container for testing
(#836)
2. Using conftest for test fixtures to avoid importing fixture
dependencies in tests
3. Fixing rounding bugs with fixedpoint
(delvtech/fixedpointmath#21)
Currently, we're using an in memory sqlite database as a dropin for postgres for tests. This works fine most of the time, but there are cases where we'd like to explicitly test postgres functionality. The most glaring issue is that sqlite doesn't have a fixed scale numeric type, and instead uses floats as a drop-in. This means we can't do any precision checks in our tests, and have to do a best effort check against values.
The easiest solution for this is to bring up a postgres container for testing. However, this has a bit of complexity, as our tests need to be able to run in CI.
The text was updated successfully, but these errors were encountered: