From cdebc92b90e9485672a6330c19f3999c9cbb67b6 Mon Sep 17 00:00:00 2001 From: Nick Bair Date: Sat, 4 Jan 2025 15:24:55 -0700 Subject: [PATCH] Fix position validation warnings (#40) * Fix position validation warnings * Bump version, fix GH action --- .github/workflows/elixir.yml | 13 ++++++------- lib/models/definitions/position/position_side.ex | 4 ++-- mix.exs | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 12dbf1f..c10d93d 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -18,18 +18,18 @@ jobs: strategy: matrix: elixir: ['1.14', '1.15', '1.16', '1.17'] - otp: ['24.0', '25.0', '26.0', '27.0'] + otp: ['24.3.4.13', '25.3.2.8', '26.2.1', '27.0.0'] exclude: - elixir: '1.14' - otp: '26.0' + otp: '26.2.1' - elixir: '1.14' - otp: '27.0' + otp: '27.0.0' - elixir: '1.15' - otp: '27.0' + otp: '27.0.0' - elixir: '1.16' - otp: '27.0' + otp: '27.0.0' - elixir: '1.17' - otp: '24.0' + otp: '24.3.4.13' steps: - uses: actions/checkout@v3 @@ -38,7 +38,6 @@ jobs: with: elixir-version: ${{ matrix.elixir }} otp-version: ${{ matrix.otp }} - http-client-timeout: 300 - name: Restore dependencies cache uses: actions/cache@v3 with: diff --git a/lib/models/definitions/position/position_side.ex b/lib/models/definitions/position/position_side.ex index 938de36..e90fdea 100644 --- a/lib/models/definitions/position/position_side.ex +++ b/lib/models/definitions/position/position_side.ex @@ -29,8 +29,8 @@ defmodule ExOanda.PositionSide do :financing, :commission, :dividend_adjustment, :guaranteed_execution_fees ]) |> validate_required([ - :units, :average_price, :trade_ids, :pl, :unrealized_pl, :resettable_pl, - :financing, :commission, :dividend_adjustment, :guaranteed_execution_fees + :units, :trade_ids, :pl, :unrealized_pl, :resettable_pl, + :financing, :dividend_adjustment, :guaranteed_execution_fees ]) end end diff --git a/mix.exs b/mix.exs index 67cb784..ca7dee7 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule ExOanda.MixProject do def project do [ app: :ex_oanda, - version: "0.0.3", + version: "0.0.4", elixir: "~> 1.14", start_permanent: Mix.env() == :prod, deps: deps(),