Skip to content

Commit

Permalink
fix: some errors; github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bout3fiddy committed Nov 24, 2023
1 parent adfed8d commit 5a03822
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pre-commit

on: [pull_request, push]
on: [push]

jobs:
pre-commit:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: unit-tests-boa

on: ["push", "pull_request"]
on: [push]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 0 additions & 12 deletions tests/unitary/math/test_newton_D_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,23 +168,11 @@ def _test_newton_D(
try:
result_contract = math_optimized.newton_D(A, gamma, X, K0)
except BoaError:
case = (
"{"
f"'ANN': {A}, 'D': {D}, 'xD': {xD}, 'yD': {yD}, 'GAMMA': {gamma}, 'j': {j}, 'btcScalePrice': {btcScalePrice}, 'ethScalePrice': {ethScalePrice}, 'mid_fee': {mid_fee}, 'out_fee': {out_fee}, 'fee_gamma': {fee_gamma}"
"}"
)
print("broken at:", case)
raise

try:
assert abs(result_sim - result_contract) <= max(
10000, result_sim / 1e12
)
except AssertionError:
case = (
"{"
f"'ANN': {A}, 'D': {D}, 'xD': {xD}, 'yD': {yD}, 'GAMMA': {gamma}, 'j': {j}, 'btcScalePrice': {btcScalePrice}, 'ethScalePrice': {ethScalePrice}, 'mid_fee': {mid_fee}, 'out_fee': {out_fee}, 'fee_gamma': {fee_gamma}"
"},\n"
)
print("broken at:", case)
raise

0 comments on commit 5a03822

Please sign in to comment.