Skip to content

Commit

Permalink
Remove references to numba_scipy
Browse files Browse the repository at this point in the history
it's now vendored in
  • Loading branch information
Kirill888 committed Jan 10, 2024
1 parent 60331a8 commit 0cf52f8
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 19 deletions.
1 change: 0 additions & 1 deletion conda/recipe-meta/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ requirements:
run:
- python >=3.7
- {{ pin_compatible('hdc-algo-core', max_pin='x.x.x') }}
- numba-scipy >=0.3.1
- scipy

test:
Expand Down
11 changes: 3 additions & 8 deletions dev-env.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# Setup instructions:
# > mamba env create -f dev-env.yml
# > conda activate vam-hdc-algo
# > conda activate hdc-algo
# > pip install -e .
# > pytest -s tests/
name: hdc-algo
channels:
- conda-forge

dependencies:
- python =3.9
- pip =20
- python =3.10
- pip =23

# hdc-algo dependencies
- xarray
- numpy
- numba
- dask[array]
- scipy
- numba-scipy >=0.3.0

# tests and dev
## to use from jupyter-lab: `python -m ipykernel install --user --name vam-seasmon`
Expand All @@ -33,10 +32,6 @@ dependencies:
- pycodestyle
- pylint
- docutils
### shed dependencies
- pyyaml
- pyupgrade
- libcst

## test
- pytest
Expand Down
4 changes: 3 additions & 1 deletion hdc/algo/ops/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
from math import erf, log, sqrt

import numba
import numba_scipy # pylint: disable=unused-import
import numpy as np
import scipy.special as sc

from ..vendor.numba_scipy import _init_extension
from ._helper import lazycompile

_init_extension()


@numba.njit
def brentq(xa, xb, s):
Expand Down
14 changes: 13 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,21 @@ exclude = '''
| _build
| build
| dist
| hdc/algo/vendor
)/
'''

[tool.isort]
profile = "black"

[tool.pylint.main]
ignore-paths = [
"hdc/algo/vendor/*"
]
extension-pkg-allow-list = [
"scipy.special"
]

[tool.pylint.messages_control]
max-line-length = 99

Expand All @@ -48,4 +57,7 @@ disable = [
"fixme",
"wrong-import-order",
"unnecessary-lambda-assignment",
]
]

[tool.pydocstyle]
match-dir = "(?!vendor).*"
10 changes: 4 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
numba-scipy==0.3.1
scipy==1.7.3
numba==0.57.0
numpy==1.22.4
xarray==2023.5.0

scipy
numba
numpy
xarray
dask[array]
7 changes: 5 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[metadata]
name =hdc-algo
name = hdc-algo
description = xarray tools for seasonal monitor
version = attr: hdc.algo._version.__version__
author = WFP-VAM
Expand Down Expand Up @@ -43,7 +43,6 @@ test =
pytest
stats =
scipy
numba-scipy

[options.packages.find]
include =
Expand All @@ -52,3 +51,7 @@ include =
[aliases]
# Define setup.py command aliases here
test = pytest

[options.entry_points]
numba_extensions =
init = hdc.algo.vendor.numba_scipy:_init_extension

0 comments on commit 0cf52f8

Please sign in to comment.