Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 40 additions & 10 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,56 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.13", "3.14"]
installer: ["conda"]

include:
- os: "ubuntu-latest"
python-version: "3.15"
installer: "python"
- os: "windows-latest"
python-version: "3.15"
installer: "python"

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/checkout@v5

- name: Set up Conda Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
if: matrix.installer == 'conda'
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: npf-dev
environment-file: environment.yml
auto-activate-base: false
channels: conda-forge
channel-priority: strict
activate-environment: npf-dev
python-version: ${{ matrix.python-version }}
miniforge-version: latest
- name: Conda metadata
if: matrix.installer == 'conda'
run: |
conda info
conda list

- name: Set up Python.org Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
if: matrix.installer == 'python'
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
- name: Install dependencies
if: matrix.installer == 'python'
run: |
# Unfortunately, no pip install --only-build-deps command yet,
# so we have to jump through some hoops.
pip install $(python -c 'import tomllib; print(" ".join(tomllib.load(open("pyproject.toml", "rb"))["build-system"]["requires"]))')

pip install --only-deps .[dev,test]
pip list

- name: Lint
run: |
set -euo pipefail
ruff version
ruff check numpy_financial/ benchmarks/
spin lint
- name: Build project
run: |
spin build -v
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/type_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- uses: astral-sh/setup-uv@v6
with:
python-version: "3.11"
python-version: "3.14"
activate-environment: true

- name: env setup
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ alias is `npf`. For example,
>>> npf.irr([-250000, 100000, 150000, 200000, 250000, 300000])
0.5672303344358536
```

## Development

Test the package:

```
spin test -- --doctest-modules
```
2 changes: 2 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ dependencies:
- pydata-sphinx-theme>=0.15.0
# Lint
- ruff>=0.11.5
- mypy
- pyright
# Benchmarks
- asv>=0.6.0
# Misc tools
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ requires = [
[project]
name = "numpy-financial"
version = "2.0.0"
requires-python = ">=3.10"
requires-python = ">=3.13"
description = "Simple financial functions"
license = "BSD-3-Clause"
authors = [{name = "Travis E. Oliphant et al."}]
Expand All @@ -24,10 +24,6 @@ classifiers = [
"Intended Audience :: Financial and Insurance Industry",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Office/Business :: Financial :: Investment",
Expand All @@ -38,6 +34,9 @@ classifiers = [
"Operating System :: MacOS",
"Typing :: Typed",
]
dependencies = [
"numpy>=1.23.5"
]

[project.optional-dependencies]
test = [
Expand All @@ -52,6 +51,7 @@ doc = [
"myst-parser>=2.0.0",
]
dev = [
"spin",
"ruff>=0.11.5",
"asv>=0.6.0",
"mypy",
Expand Down
Loading