Skip to content

Commit

Permalink
fixing decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-lahoda committed Apr 15, 2024
1 parent 59ffbe1 commit 96ece26
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 20 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 41 additions & 15 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -285,27 +285,28 @@
# buildInputs = old.buildInputs or [] ++ [self.python.pkgs.setuptools];
SCIPOPTDIR = scip-src;
});
# editables = super.editables.overridePythonAttrs (old: {
# buildInputs = old.buildInputs or [] ++ [self.python.pkgs.flit-core];
# });
# pyscipopt = pyscipopt-latest;
# google = super.google.overridePythonAttrs (old: {
# buildInputs = old.buildInputs or [] ++ [self.python.pkgs.setuptools];
# });
# wirerope = super.wirerope.overridePythonAttrs (old: {
# buildInputs = old.buildInputs or [] ++ [self.python.pkgs.setuptools];
# });

maturin = super.maturin.overridePythonAttrs (old: {
buildInputs = old.buildInputs or [] ++ [self.python.pkgs.setuptools];
});
grpc = super.grpc.overridePythonAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config pkgs.stdenv.cc.cc.lib pkgs.stdenv.cc.cc ];
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.stdenv.cc.cc.lib pkgs.stdenv.cc.cc ];
LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [
stdenv.cc.cc.lib
];
runtimeInputs = [
pkgs.stdenv.cc.cc.lib
pkgs.stdenv.cc.cc

];
});
# cylp = super.cylp.overridePythonAttrs (old: {
# buildInputs = old.buildInputs or [] ++ [self.python.pkgs.setuptools self.python.pkgs.wheel pkgs.cbc pkgs.pkg-config];
# nativeBuildInputs = old.nativeBuildInputs or [] ++ [self.python.pkgs.setuptools self.python.pkgs.wheel pkgs.cbc pkgs.pkg-config];
# });

# google-cloud = super.google-cloud.overridePythonAttrs (old: {
# buildInputs = old.buildInputs or [] ++ [self.python.pkgs.setuptools];
# });
# cvxpy = cvxpy-latest;

# maturin = maturin-latest;
Expand Down Expand Up @@ -373,8 +374,27 @@
pkgs.ipopt
pkgs.or-tools
];
poetry = pkgs.stdenv.mkDerivation {
name = "poetry";
buildInputs = [ pyEnvShell ];

LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [
stdenv.cc.cc.lib
];

buildCommand = ''
mkdir -p $out/bin
cat <<EOF > $out/bin/poetry
#!${pkgs.bash}/bin/bash
export LD_LIBRARY_PATH=${pkgs.lib.escapeShellArg "\$LD_LIBRARY_PATH"}
exec ${pkgs.poetry}/bin/poetry "\$@"
EOF
chmod +x $out/bin/poetry
'';
};

pythonPackages = [
pkgs.poetry
poetry
pkgs.stdenv.cc.cc.lib
pyEnvShell
];
Expand All @@ -390,9 +410,15 @@
OSMOSIS_POOLS = env.OSMOSIS_POOLS;
ASTROPORT_POOLS = env.ASTROPORT_POOLS;
SKIP_MONEY = env.SKIP_MONEY;

# LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [
# stdenv.cc.cc.lib
# ];
BETTER_EXCEPTIONS = 1;

runtimeInputs = [
pkgs.stdenv.cc.cc.lib
pkgs.stdenv.cc.cc

];
buildInputs =
[
#inputs'.scip.packages.scip
Expand Down
4 changes: 2 additions & 2 deletions mantis/simulation/routers/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
from disjoint_set import DisjointSet
from loguru import logger
from pydantic import BaseModel, Field, model_validator, validator

from decimal import Decimal as dec
from simulation.routers.oracles.usdoracle import merge_by_connection_from_existing

# This is global unique ID for token(asset) or exchange(pool)
TId = TypeVar("TId", int, str)
TNetworkId = TypeVar("TNetworkId", int, str)
TAmount = TypeVar("TAmount", int, str, float)
TAmount = TypeVar("TAmount", int, float, dec)

MINIMAL_FEE_PER_MILLION_DEFAULT = 100
"""
Expand Down

0 comments on commit 96ece26

Please sign in to comment.