Skip to content

Commit

Permalink
deprecate TableCollection.fs (#1292)
Browse files Browse the repository at this point in the history
* remove scipy as a dependency

Closes #1271
  • Loading branch information
molpopgen authored Apr 10, 2024
1 parent 2c820bf commit 92aa92c
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 228 deletions.
2 changes: 1 addition & 1 deletion doc/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ parts:
- file: pages/mvdes
- file: pages/tsoverview
- file: pages/tstypes
- file: pages/tablefs
# - file: pages/tablefs
- file: pages/recorders
- caption: Technical details
chapters:
Expand Down
2 changes: 1 addition & 1 deletion doc/misc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@ release candidates (see below) plus the following:
{issue}`389`
{issue}`390`
{issue}`392`
* {func}`fwdpy11.TableCollection.fs` added. See {ref}`tablefs`.
* {func}`fwdpy11.TableCollection.fs` added. See `tablefs`.
PR {pr}`387`
PR {pr}`399`
* Creating populations from `msprime` input improved.
Expand Down
4 changes: 3 additions & 1 deletion fwdpy11/_types/table_collection.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from deprecated import deprecated
from typing import Iterable

import numpy as np
import scipy.sparse # type: ignore

from .._fwdpy11 import Edge, MutationRecord, Node, Site, ll_TableCollection

Expand Down Expand Up @@ -181,6 +181,7 @@ def _ndfs(
later.
"""
from . import TreeIterator
import scipy.sparse # type: ignore

shapes = tuple(len(i) + 1 for i in samples)
dok_JFS = [scipy.sparse.dok_matrix(shapes, dtype=np.int32) for i in windows]
Expand Down Expand Up @@ -240,6 +241,7 @@ def _fs_implementation(self, samples, windows, include_function, simplify):
simplify,
)

@deprecated(reason="dependency on scikit is a problem")
def fs(
self,
samples,
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ dependencies = [
"attrs >= 20.3.0",
"black",
"numpy < 2.0",
"scipy",
"tskit >= 0.5.6",
"demes ~= 0.2.2",
"Deprecated",
Expand Down
1 change: 0 additions & 1 deletion requirements/minimal_install_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ attrs >= 20.3.0
demes == 0.2.2
numpy < 2
tskit >= 0.5.6
scipy
Deprecated
223 changes: 0 additions & 223 deletions tests/test_TableCollection_fs.py

This file was deleted.

0 comments on commit 92aa92c

Please sign in to comment.