forked from pyodide/pyodide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
rateslib
to packages (pyodide#5146)
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
1 parent
651b690
commit 2a19f2a
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |