Skip to content

Commit 4254440

Browse files
author
Nima Sarajpoor
authored
Merge branch 'stumpy-dev:main' into Tutorial_VALMOD
2 parents f6126ca + 33ca9dd commit 4254440

153 files changed

Lines changed: 366378 additions & 225698 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.flake8‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ exclude =
1616
setup.py
1717
per-file-ignores =
1818
stumpy/__init__.py:D104
19-
stumpy/stumpi.py:E743
19+
build/lib/stumpy/__init__.py:D104
2020
tests/*:D101,D102,D103
21+
stumpy/cache.py:D414

‎.fossa.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 2
55
cli:
66
server: https://app.fossa.com
77
fetcher: custom
8-
project: https://github.com/TDAmeritrade/stumpy
8+
project: https://github.com/stumpy-dev/stumpy
99
analyze:
1010
modules:
1111
- name: .

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @seanlaw

‎.github/workflows/github-actions.yml‎

Lines changed: 52 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,64 +4,51 @@ on:
44
branches: main
55
pull_request:
66
branches: main
7+
workflow_dispatch:
8+
schedule:
9+
- cron: '0 14 * * *' # 2pm UTC == 9am EST
710
jobs:
8-
minimum-version-testing:
9-
runs-on: ${{ matrix.os }}
10-
strategy:
11-
matrix:
12-
os: [ubuntu-latest, macos-latest, windows-latest]
13-
python-version: ['3.7']
11+
generate_python_matrix:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
python_versions: ${{ steps.set-matrix.outputs.python_versions }}
15+
min_python_version: ${{ steps.set-matrix.outputs.min_python_version }}
1416
steps:
15-
- uses: actions/checkout@v3
16-
- name: Set Up Python
17-
uses: actions/setup-python@v4
17+
- name: Checkout STUMPY
18+
uses: actions/checkout@v4
1819
with:
19-
python-version: ${{ matrix.python-version }}
20-
- name: Display Python Version
21-
run: python -c "import sys; print(sys.version)"
22-
shell: bash
23-
- name: Generate Minimum Requirements File
24-
run: sed 's/>/=/g' requirements.txt | sed 's/$/\.*/g' > requirements.min.txt
25-
shell: bash
26-
- name: Install Minimum Requirements
27-
run: python -m pip install --upgrade -r requirements.min.txt
28-
shell: bash
29-
- name: Install STUMPY And Other Dependencies
30-
run: python -m pip install --editable .[ci]
31-
shell: bash
32-
- name: Run Black
33-
run: black --check --diff ./
34-
shell: bash
35-
- name: Run Flake8
36-
run: flake8 ./
37-
shell: bash
38-
- name: Link OpenMP
20+
repository: stumpy-dev/stumpy
21+
- name: Upgrade Pip, Install Minimum Requirements
3922
run: |
40-
if [ "$RUNNER_OS" == "macOS" ]; then
41-
brew link --force libomp
42-
fi
23+
python -m pip install --upgrade pip pandas lxml packaging
4324
shell: bash
44-
- name: Show Full Numba Environment
45-
run: python -m numba -s
46-
shell: bash
47-
- name: Run Unit Tests
48-
run: ./test.sh unit
25+
- name: Generate Python versions
26+
id: set-matrix
27+
run: |
28+
MIN_PYTHON=$(python ./versions.py -mode min | grep python | awk '{print $2}')
29+
MAX_PYTHON=$(python ./versions.py -mode max | grep python | awk '{print $2}')
30+
echo "python_versions=$(python ./versions.py -mode range $MIN_PYTHON $MAX_PYTHON)" >> $GITHUB_OUTPUT
31+
echo "min_python_version=\"$MIN_PYTHON\"" >> $GITHUB_OUTPUT
4932
shell: bash
5033
unit-testing:
34+
needs: generate_python_matrix
5135
runs-on: ${{ matrix.os }}
5236
strategy:
5337
matrix:
5438
os: [ubuntu-latest, macos-latest, windows-latest]
55-
python-version: ['3.7', '3.8', '3.9', '3.10']
39+
python-version: ${{ fromJSON(needs.generate_python_matrix.outputs.python_versions) }}
5640
steps:
57-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v4
5842
- name: Set Up Python
59-
uses: actions/setup-python@v4
43+
uses: actions/setup-python@v5
6044
with:
6145
python-version: ${{ matrix.python-version }}
6246
- name: Display Python Version
6347
run: python -c "import sys; print(sys.version)"
6448
shell: bash
49+
- name: Upgrade Pip
50+
run: python -m pip install --upgrade pip
51+
shell: bash
6552
- name: Install STUMPY And Other Dependencies
6653
run: python -m pip install --editable .[ci]
6754
shell: bash
@@ -71,11 +58,19 @@ jobs:
7158
- name: Run Flake8
7259
run: flake8 ./
7360
shell: bash
74-
- name: Link OpenMP
61+
- name: Install OpenMP
7562
run: |
7663
if [ "$RUNNER_OS" == "macOS" ]; then
64+
echo "Installing OpenMP"
65+
brew install libomp
66+
echo "Linking OpenMP"
7767
brew link --force libomp
78-
fi
68+
echo "Find OpenMP Linking Location"
69+
libfile=`brew list libomp --verbose | grep libomp.dylib`
70+
echo $libfile
71+
echo "Changing @rpath for the omppool.cpython-x-darwin.so shared object to look in $libfile"
72+
ls "$(python -c 'import site; print(site.getsitepackages()[0])')"/numba/np/ufunc/omppool.*.so | xargs install_name_tool -change @rpath/libomp.dylib $libfile
73+
fi
7974
shell: bash
8075
- name: Show Full Numba Environment
8176
run: python -m numba -s
@@ -84,20 +79,24 @@ jobs:
8479
run: ./test.sh unit
8580
shell: bash
8681
coverage-testing:
82+
needs: generate_python_matrix
8783
runs-on: ${{ matrix.os }}
8884
strategy:
8985
matrix:
9086
os: [ubuntu-latest, macos-latest, windows-latest]
91-
python-version: ['3.7', '3.8', '3.9', '3.10']
87+
python-version: ${{ fromJSON(needs.generate_python_matrix.outputs.python_versions) }}
9288
steps:
93-
- uses: actions/checkout@v3
89+
- uses: actions/checkout@v4
9490
- name: Set Up Python
95-
uses: actions/setup-python@v4
91+
uses: actions/setup-python@v5
9692
with:
9793
python-version: ${{ matrix.python-version }}
9894
- name: Display Python Version
9995
run: python -c "import sys; print(sys.version)"
10096
shell: bash
97+
- name: Upgrade Pip
98+
run: python -m pip install --upgrade pip
99+
shell: bash
101100
- name: Install STUMPY And Other Dependencies
102101
run: python -m pip install --editable .[ci]
103102
shell: bash
@@ -110,7 +109,15 @@ jobs:
110109
- name: Link OpenMP
111110
run: |
112111
if [ "$RUNNER_OS" == "macOS" ]; then
112+
echo "Installing OpenMP"
113+
brew install libomp
114+
echo "Linking OpenMP"
113115
brew link --force libomp
116+
echo "Find OpenMP Linking Location"
117+
libfile=`brew list libomp --verbose | grep libomp.dylib`
118+
echo $libfile
119+
echo "Changing @rpath for the omppool.cpython-x-darwin.so shared object to look in $libfile"
120+
ls "$(python -c 'import site; print(site.getsitepackages()[0])')"/numba/np/ufunc/omppool.*.so | xargs install_name_tool -change @rpath/libomp.dylib $libfile
114121
fi
115122
shell: bash
116123
- name: Show Full Numba Environment
@@ -119,5 +126,3 @@ jobs:
119126
- name: Run Coverage Tests
120127
run: ./test.sh coverage
121128
shell: bash
122-
- name: Upload Coverage Tests Results
123-
uses: codecov/codecov-action@v3

‎.gitignore‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
LOG*
99
PID
1010
.coverage*
11-
coverage.xml
11+
coverage.json
12+
coverage.stumpy.json
1213
dask-worker-space
1314
stumpy.egg-info
1415
build
@@ -20,3 +21,4 @@ docs/_build
2021
.mypy_cache
2122
.directory
2223
test.py
24+
*.nbconvert.ipynb

‎.readthedocs.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
version: 2
2-
formats: all
2+
sphinx:
3+
configuration: docs/conf.py
4+
formats: []
5+
build:
6+
os: ubuntu-22.04
7+
tools:
8+
python: "3.11"
39
python:
410
install:
511
- requirements: docs/requirements.txt

‎CHANGELOG.md‎

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,154 @@
1+
# 2024-07-08 [ 1.13.0 ]:
2+
---------------------------
3+
* bugfixes
4+
- Fixed Ostinato overwriting original time series
5+
* features
6+
- Added Ray support
7+
- Added `numpy` 2.0 support
8+
- Added named attributes to matrix profile array
9+
- Added Python 3.12 support
10+
- Migrated setup.py, setuptools to pyproject.toml
11+
* tasks
12+
- Added version mismatch checker
13+
- Added `copy` param to `preprocess`-related functions
14+
- Disabled bokeh dashboard in dask
15+
- Added `numba` channel to environment.yml
16+
- Replace `np.INF` with `-np.infg`
17+
- Fixed inability to import packages in tutorials
18+
- Added matplotlib to RTD requirements
19+
- Removed unnecessary comments in code
20+
- Added `tests/__pycache__` to `clean_up` process
21+
- Added option to display current dev environment in `test.sh`
22+
- Added keyword `test.sh` to only execute `gpu` containing tests
23+
- Added "upgrade pip" to Github Actions workflow
24+
- Removed Twitter and Zenodo badges, added NumFOCUS badge
25+
- Added Github Discussions link
26+
- Updated codecove version for Github Actions
27+
- Removed `pkg_resources` as a dependency
28+
- Added codeowners file
29+
* documentation
30+
- Improved syntax highlighting
31+
- Updated class docstrings
32+
- Removed napoleon extension
33+
- Switched to Myst
34+
- Relocated notebooks/tutorials
35+
- Fixed named attributes being displayed incorrectly
36+
- Fixed typos
37+
38+
39+
# 2023-08-20 [ 1.12.0 ]:
40+
---------------------------
41+
* bugfixes
42+
- Fixed prescrump, scrump, and scraamp miscalculation of AB-joins
43+
- Fixed bug in `is False` by converting to `bool` type
44+
- Fixed bug in `snippet` that caused loss in precision, add unit tests
45+
- Fixed RTD incompatibility with urllib3
46+
- Fixed loss of precision in distances computed for self-matches
47+
- Fixed libiomp5.dylib Github Actions location
48+
- Fixed incorrect post-processing in naive.mass_PI
49+
- Fixed incorrect number of contiguous windows in snippets
50+
* features
51+
- Improved matrix profile performance (15-20%) with uint64 indexing
52+
- Added top-k nearest neighbor feature
53+
- Added rolling_isconstant function
54+
- Added `subseq_isconstant` to API for transparent handling of constant time series subsequences
55+
- Added parallelized rolling_nanstd
56+
- Added abstraction layer for distributed client functions (e.g., Dask, Ray, etc)
57+
- Added initial support for `numba` function caching
58+
- Added Python 3.11 support
59+
- Added `query_idx` to improve distances computed for self-matches in `motifs` function
60+
- Added `mmotifs` for multi-dimensional motif discovery
61+
- Added function `process_isconstant`
62+
* tasks
63+
- Refactored mpdist
64+
- Added MERLIN notebook reproducer
65+
- Added negative index checks to mmotifs
66+
- Fixed mybinder badge and links
67+
- Renamed nave.mass to naive.mass_PI
68+
- Added `row_wise` parameter to naive.stump
69+
- Added input type (list) check to ostinato
70+
- Added ability to return fully filled bfs indices
71+
- Updated setup.py to enable Github dependency graph tracking
72+
- Improved stability of prescrimp
73+
- Split coverage tests for more verbosity
74+
- Added more features to custom test function
75+
- Removed explicit cancellation of dask futures
76+
- Removed max `dask`/`distributed` version requirement
77+
- Optimized stumpi and aampi class init
78+
- Improve aampi update behavior with constant sequences returning nan
79+
- Added pytest notebook link checking
80+
- Refactored `match` function
81+
- Added warnings to motifs and aamp_motifs
82+
- Added `numba -s` step in Github Actions workflow
83+
- Added explicit link to OpenMP for MacOS Github Actions workflow
84+
- Moved to Actions/Checkout V3 in Github Actions
85+
- Improved numba function signatures
86+
- Added '--editable' install mode to setup.sh
87+
- Updated Github Action codecov/codecov-action@v1 to v3
88+
- Maintained 100% code coverage
89+
- Used unittest.mock.patch to prevent overwriting of config variables during testing
90+
- Added Python 3.11 to test matrix
91+
- Added ability to detect missing parameter definitions in docstrings (docstring.py)
92+
- Updated pytest flags to report skips and added additional summary
93+
- Replaced logging.warning with warnings.warn
94+
- Improved multi-line warnings
95+
- Ensured `bfs_indices` are sent to correct GPU device
96+
- Refactored window size check in mass/mass_absolute functions
97+
- Added animated GIF to README
98+
- Updated minimum black version
99+
- Removed `_parallel_rolling_func` as it conflicted with `numba` caching
100+
- Removed mamba timeout
101+
- Improved warnings
102+
- Added missing p-norm param to idx_to_mp and floss functions
103+
- Added test failure when coverage is below 100%
104+
- Added boolean array test for rolling_isfinite
105+
- Added isort, resolved circular dependencies, updated examples
106+
- Only build HTML for RTD
107+
- Added `mp` param to stumpi to allow pre-computed matrix profile as input
108+
- Added various unit tests
109+
- Removed codecov as dependency
110+
- Added ability to test the execution of tutorial notebooks
111+
- Added check for negative matrix profile indices
112+
- Added `test_precision.py` for all issues related to loss-of-precision
113+
- Fixed tls deprecation warning
114+
- Replaced np.int with np.int64
115+
- Specified fastmath flags to include nan/inf values in inputs/outputs
116+
- Replaced bool dtype with np.bool_
117+
- Replaced np.newaxis with np.expand_dims
118+
- Added check for docstring and parameter mismatch
119+
- Update URLs for minimum version references
120+
- Added explicit shell declaration in Github Actions workflow
121+
- Show OpenMP libraries in Github Actions workflow
122+
- Added `pip.sh` script for setting up dev environment using `pip`
123+
- Removed parallel=True in `core._compute_multi_PI`
124+
- Updated coverage testing to include all modules
125+
- Improved code consistency for `T_A` and `T_A` definitions
126+
- Refactored `test.sh` and include missing test files in unit tests
127+
- Added minimum dependency compatibility script (min.py)
128+
- Updated minimum dependency bumping instructions
129+
- Bumped minimum Python version to 3.8
130+
- Update PyPI downloads badge
131+
* documentation
132+
- Improved/updated various docstrings
133+
- Added shapelet discovery tutorial
134+
- Clarified unanchored chain description
135+
- Fixed typos
136+
- Improved `core._get_QT docstring`
137+
- Fixed imbalanced tree representation in docstring
138+
- Improved scrump documentation
139+
- Made light mode default and remove theme switcher from header nav bar
140+
- Improved dataframe layout display in tutorials
141+
- Added multi-dimensional motif and match tutorial
142+
= Added T_subseq_isfinite to docstring
143+
- Added tutorial for "Discovering motifs under uniform scaling"
144+
- Updated docs for using a dask client
145+
- Fixed malformed link in floss docstring
146+
- Added missing parameter section in various docstrings
147+
- Added Minkowski docstring for Euclidean distance
148+
- Added missing parameters for GPU functions in docstrings
149+
- Improved documentation for `P` in motifs function
150+
151+
1152
# 2022-03-31 [ 1.11.1 ]:
2153
---------------------------
3154
* bugfixes

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ Contributions of all kinds are welcome. In particular pull requests are apprecia
44

55
## Issues
66

7-
The easiest contribution to make is to [file an issue](https://github.com/TDAmeritrade/stumpy/issues/new). It is beneficial if you perform a cursory search of [existing issues](https://github.com/TDAmeritrade/stumpy/issues?q=is%3Aissue) and it is also helpful, but not necessary, if you can provide clear instruction for how to reproduce a problem. If you have resolved an issue yourself please consider contributing to this repository so others can benefit from your work.
7+
The easiest contribution to make is to [file an issue](https://github.com/stumpy-dev/stumpy/issues/new). It is beneficial if you perform a cursory search of [existing issues](https://github.com/stumpy-dev/stumpy/issues?q=is%3Aissue) and it is also helpful, but not necessary, if you can provide clear instruction for how to reproduce a problem. If you have resolved an issue yourself please consider contributing to this repository so others can benefit from your work.
88

99
## Documentation
1010

1111
Contributing to documentation is the easiest way to get started. Providing simple clear or helpful documentation for new users is critical. Anything that *you* as a new user found hard to understand, or difficult to work out, are excellent places to begin. Contributions to more detailed and descriptive error messages is especially appreciated. To contribute to the documentation please
12-
[fork the project](https://github.com/TDAmeritrade/stumpy/fork) into your own repository, make changes there, and then submit a pull request.
12+
[fork the project](https://github.com/stumpy-dev/stumpy/fork) into your own repository, make changes there, and then submit a pull request.
1313

1414
## Code
1515

16-
Code contributions are always welcome, from simple bug fixes, to new features. To contribute code please [fork the project](https://github.com/TDAmeritrade/stumpy/fork) into your own repository, make changes there, run [black](https://github.com/python/black) and [flake8](http://flake8.pycqa.org/en/latest/) on your code, add tests for bugs/new features, and then submit a pull request. If you are fixing a known issue please add the issue number to the PR message. If you are fixing a new issue feel free to file an issue and then reference it in the PR. You can [browse open issues](https://github.com/TDAmeritrade/stumpy/issues), or consult the [project roadmap](https://github.com/TDAmeritrade/stumpy/issues/1), for potential code contributions. Fixes for issues tagged with 'help wanted' are especially appreciated.
16+
Code contributions are always welcome, from simple bug fixes, to new features. To contribute code please [fork the project](https://github.com/stumpy-dev/stumpy/fork) into your own repository, make changes there, run [black](https://github.com/python/black) and [flake8](http://flake8.pycqa.org/en/latest/) on your code, add tests for bugs/new features, and then submit a pull request. If you are fixing a known issue please add the issue number to the PR message. If you are fixing a new issue feel free to file an issue and then reference it in the PR. You can [browse open issues](https://github.com/stumpy-dev/stumpy/issues) for potential code contributions. Fixes for issues tagged with 'help wanted' are especially appreciated.
1717

1818

‎MANIFEST.in‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
include LICENSE.txt
2+
prune docs
3+
prune notebooks

0 commit comments

Comments
 (0)