Skip to content

Commit

Permalink
pattern matching on 0.0 is equivalent to matching only on +0.0 from E…
Browse files Browse the repository at this point in the history
…rlang/OTP 27+. Instead you must match on +0.0 or -0.0 (#2)

* GitHub Actions, update dependencies, Config

* git ignore

* pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0

* don’t commit benchmarks

* mix format

* ci

* no dialyzer for now

* update readme

* readme — setup
  • Loading branch information
nathany-copia authored Sep 26, 2024
1 parent 3880c59 commit 9a79314
Show file tree
Hide file tree
Showing 21 changed files with 83 additions and 1,326 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Pull Request Workflow
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
push:
branches:
- main

jobs:
test:
name: Elixir Tests
runs-on: ubuntu-latest
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: "27.1"
elixir-version: "1.17.3"
- uses: actions/cache@v4
id: cache
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: mix deps.get
- name: Compile
run: mix compile --warnings-as-errors
- name: Check code formatting
run: mix format --check-formatted
- name: Run Elixir tests
run: mix coveralls

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ erl_crash.dump
*.ez
*.swp
snapshots/*
.elixir_ls
/benchmarks
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# ExXirr
[![codecov](https://codecov.io/gh/scripbox/ex-xirr/branch/master/graph/badge.svg)](https://codecov.io/gh/scripbox/ex-xirr) ![Hex.pm](https://img.shields.io/hexpm/dt/ex_xirr.svg) ![Travis](https://img.shields.io/travis/scripbox/ex-xirr.svg)

A library to calculate xirr using the [Newton Raphson method](https://en.wikipedia.org/wiki/Newton%27s_method).

Expand All @@ -19,15 +18,19 @@ The package can be installed as:

```ex
def deps do
[{:ex_xirr, "~> 1.0.0"}]
[
{:ex_xirr, "~> 1.0.0", github: "copia-wealth-studios/ex-xirr"},
]
end
```

2. Ensure ex_xirr is started before your application:

```ex
def application do
[applications: [:ex_xirr]]
[
extra_applications: [:logger, :ex_xirr]
]
end
```
## Test
Expand All @@ -43,8 +46,9 @@ The package can be installed as:
```
mix run test/xirr_comparison_bench.exs
```
- The reports are available [here](https://htmlpreview.github.io/?https://github.com/scripbox/ex-xirr/blob/master/benchmarks/output/results.html).

## Credits

This is a fork of [scripbox/ex-xirr](https://github.com/scripbox/ex-xirr).

This application is built on the fantastic [finance-elixir](https://github.com/tubedude/finance-elixir) package. Many thanks to [tubedude](https://github.com/tubedude) for his work.
12 changes: 0 additions & 12 deletions benchmarks/output/assets/fontello/LICENSE.txt

This file was deleted.

43 changes: 0 additions & 43 deletions benchmarks/output/assets/fontello/css/fontello.css

This file was deleted.

119 changes: 0 additions & 119 deletions benchmarks/output/assets/javascripts/benchee.js

This file was deleted.

78 changes: 0 additions & 78 deletions benchmarks/output/assets/javascripts/plotly-1.30.1.min.js

This file was deleted.

Loading

0 comments on commit 9a79314

Please sign in to comment.