Skip to content

Commit

Permalink
Add rateslib to packages (pyodide#5146)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Agriya Khetarpal <[email protected]>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent 651b690 commit 2a19f2a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/rateslib/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package:
name: rateslib
version: 1.5.0
top-level:
- rateslib
source:
url: https://files.pythonhosted.org/packages/02/d7/7695bb1b6a240ecfae77804d3fc242e30582fd83973f76dda03b23d921a6/rateslib-1.5.0.tar.gz
sha256: 7c7af2707f20974a70403689f84905757a4ed084e4c92229388d2fc30b331b04
requirements:
run:
- numpy
- pandas
- matplotlib
executable:
- rustup
about:
home: https://github.com/attack68/rateslib
PyPI: https://pypi.org/project/rateslib
summary: A fixed income library for trading interest rates
license: CC-BY-NC-ND-4.0
extra:
recipe-maintainers:
- NickAltmann
17 changes: 17 additions & 0 deletions packages/rateslib/test_rateslib.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import pytest
from pytest_pyodide import run_in_pyodide


@pytest.mark.driver_timeout(60)
@run_in_pyodide(packages=["rateslib"])
def test_add_tenor(selenium):
import datetime

import rateslib as rl

start_date = datetime.datetime(2024, 10, 29)
end_date = datetime.datetime(2024, 10, 31)

test_date = rl.add_tenor(start_date, "2b", "F", "nyc")

assert end_date == test_date

0 comments on commit 2a19f2a

Please sign in to comment.