diff --git a/packages/rateslib/meta.yaml b/packages/rateslib/meta.yaml new file mode 100644 index 00000000000..0df2e18ebf8 --- /dev/null +++ b/packages/rateslib/meta.yaml @@ -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 diff --git a/packages/rateslib/test_rateslib.py b/packages/rateslib/test_rateslib.py new file mode 100644 index 00000000000..d352dd28177 --- /dev/null +++ b/packages/rateslib/test_rateslib.py @@ -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