-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from statefb/feature/github-actions
add: main git actions for cicd
- Loading branch information
Showing
4 changed files
with
59 additions
and
9 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,30 @@ | ||
name: Test and upload to PyPI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: r-lib/actions/setup-r@v2 | ||
- run: Rscript -e 'install.packages("dtw")' | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.9" # Version range or exact version of a Python version to use, using SemVer's version range syntax | ||
architecture: "x64" # optional x64 or x86. Defaults to x64 if not specified | ||
- run: pip install -e . | ||
- run: pip install -r tests/requirements.txt | ||
- run: python tests/test_cost.py | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: pypa/[email protected] | ||
with: | ||
user: ${{ secrets.PYPI_USER_NAME }} | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Pipfile | ||
Pipfile.lock | ||
docs/_build | ||
.env | ||
|
||
__pycache__ | ||
/dtwalign.egg-info/ | ||
|
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 |
---|---|---|
@@ -1,54 +1,72 @@ | ||
# DTW (Dynamic Time Warping) | ||
|
||
[![Documentation Status](https://readthedocs.org/projects/dtwalign/badge/?version=latest)](https://dtwalign.readthedocs.io/en/latest/?badge=latest) | ||
|
||
|
||
![cicd workflow](https://github.com/statefb/dtwalign/actions/workflows/main.yml/badge.svg) | ||
|
||
Comprehensive dynamic time warping module for python. | ||
Documentation is [available via ReadTheDocs](https://dtwalign.readthedocs.io/en/latest/index.html). | ||
|
||
## Installation | ||
|
||
``` | ||
pip install dtwalign | ||
``` | ||
|
||
## Features | ||
|
||
### Fast computation | ||
|
||
--- | ||
|
||
by [Numba](https://numba.pydata.org) | ||
|
||
### Partial alignment | ||
|
||
--- | ||
- before alignment | ||
|
||
- before alignment | ||
|
||
![](docs/img/partial_org.png) | ||
|
||
- after alignment | ||
- after alignment | ||
|
||
![](docs/img/partial_res.png) | ||
|
||
### Local constraint (step pattern) | ||
|
||
--- | ||
|
||
example: | ||
|
||
| Symmetric2 | AsymmetricP2 | TypeIVc | | ||
|:-----------:|:------------:|:------------:| | ||
| Symmetric2 | AsymmetricP2 | TypeIVc | | ||
| :--------------------------: | :----------------------------: | :-----------------------: | | ||
| ![](docs/img/symmetric2.png) | ![](docs/img/asymmetricP2.png) | ![](docs/img/typeIVc.png) | | ||
|
||
### Global constraint (windowing) | ||
|
||
--- | ||
|
||
example: | ||
|
||
| Sakoechiba | Itakura | User defined | | ||
|:-----------:|:------------:|:------------:| | ||
| Sakoechiba | Itakura | User defined | | ||
| :--------------------------: | :-----------------------: | :------------------------: | | ||
| ![](docs/img/sakoechiba.png) | ![](docs/img/itakura.png) | ![](docs/img/user_win.png) | | ||
|
||
### Alignment path visualization | ||
|
||
--- | ||
|
||
![](docs/img/partial_path.png) | ||
|
||
## Usage | ||
|
||
see [example](https://htmlpreview.github.io/?https://github.com/statefb/dtwalign/blob/master/example/example.html) | ||
|
||
## Reference | ||
|
||
1. Sakoe, H.; Chiba, S., Dynamic programming algorithm optimization for spoken word recognition, Acoustics, Speech, and Signal Processing | ||
|
||
* Paolo Tormene, Toni Giorgino, Silvana Quaglini, Mario Stefanelli (2008). Matching Incomplete Time Series with Dynamic Time Warping: An Algorithm and an Application to Post-Stroke Rehabilitation. Artificial Intelligence in Medicine, 45(1), 11-34. | ||
- Paolo Tormene, Toni Giorgino, Silvana Quaglini, Mario Stefanelli (2008). Matching Incomplete Time Series with Dynamic Time Warping: An Algorithm and an Application to Post-Stroke Rehabilitation. Artificial Intelligence in Medicine, 45(1), 11-34. | ||
|
||
* Toni Giorgino (2009). Computing and Visualizing Dynamic Time Warping Alignments in R: The dtw Package. Journal of Statistical Software, 31(7), 1-24. | ||
- Toni Giorgino (2009). Computing and Visualizing Dynamic Time Warping Alignments in R: The dtw Package. Journal of Statistical Software, 31(7), 1-24. |
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 @@ | ||
rpy2 |