Skip to content

Commit a9042c2

Browse files
authored
Merge pull request #6 from Battery-Intelligence-Lab/develop
Version 1.0.0-rc0
2 parents 03a0575 + e14e072 commit a9042c2

28 files changed

+483
-147
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
3+
version: 2
4+
updates:
5+
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "weekly"

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout current branch
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222
- name: Setup Pages
2323
uses: actions/configure-pages@v2
2424
- name: Build master with Jekyll

.github/workflows/draft-pdf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Paper Draft
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717
- name: Build draft PDF
1818
uses: openjournals/openjournals-draft-action@master
1919
with:

.github/workflows/macos-unit.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,38 @@ name: macOS unit
33
on:
44
push:
55
branches:
6-
# - main
6+
# - main
77
- develop
88
pull_request:
99
branches:
1010
- '**'
1111

1212
jobs:
13-
1413
build-and-test:
1514
name: macOS unit
1615
runs-on: macos-latest
1716

1817
steps:
19-
- uses: actions/checkout@v3
20-
21-
- name: install openmp
22-
run: brew reinstall libomp & brew link libomp --force
18+
- uses: actions/checkout@v4
2319

24-
- name: make build directory
20+
- name: Install libomp without linking
21+
run: |
22+
brew install libomp llvm && brew link --force libomp
23+
24+
- name: Make build directory
2525
run: mkdir build_dir
2626

27-
- name: cmake configure
28-
run: cmake .. -DCMAKE_BUILD_TYPE=Debug -DDTWC_BUILD_TESTING=ON
27+
- name: CMake configure
28+
run: |
29+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DDTWC_BUILD_TESTING=ON
2930
working-directory: build_dir
3031

31-
- name: cmake build
32-
run: cmake --build . --parallel 2
32+
- name: CMake build
33+
run: |
34+
cmake --build . --parallel 2
3335
working-directory: build_dir
3436

35-
- name: cmake test
36-
run: ctest -j2 -C Debug --output-on-failure
37-
working-directory: build_dir
37+
- name: CMake test
38+
run: |
39+
ctest -j2 -C Debug --output-on-failure
40+
working-directory: build_dir

.github/workflows/ubuntu-unit.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
name: Ubuntu unit
2-
# adapted from: https://github.com/trase-cpp/trase/tree/master/.github/workflows
1+
name: Ubuntu unit # adapted from: https://github.com/trase-cpp/trase/tree/master/.github/workflows
32
on:
43
push:
54
branches:
6-
# - main
5+
# - main
76
- develop
87
pull_request:
98
branches:
109
- '**'
1110

1211
jobs:
13-
1412
build-and-test:
1513
name: Ubuntu unit ${{matrix.CC}}
1614
runs-on: ubuntu-latest
@@ -42,18 +40,25 @@ jobs:
4240
- CC: clang-15
4341
CXX: clang++-15
4442
compiler: clang-15 libomp-15-dev
45-
# - CC: clang-16 -> we don't have these as package.
46-
# CXX: clang++-16
47-
# compiler: clang-16
48-
# - CC: clang-17
49-
# CXX: clang++-17
50-
# compiler: clang-17
43+
- CC: clang-16
44+
CXX: clang++-16
45+
compiler: clang-16 libomp-16-dev
46+
- CC: clang-17
47+
CXX: clang++-17
48+
compiler: clang-17 libomp-17-dev
5149
steps:
52-
- uses: actions/checkout@v3
50+
- uses: actions/checkout@v4
5351

5452
- name: update
5553
run: sudo apt update
5654

55+
- name: Install Clang 16 or 17
56+
if: matrix.CC == 'clang-16' || matrix.CC == 'clang-17'
57+
run: |
58+
wget https://apt.llvm.org/llvm.sh
59+
chmod +x llvm.sh
60+
sudo ./llvm.sh $(echo "${{ matrix.CC }}" | cut -d '-' -f 2)
61+
5762
- name: install compiler
5863
run: sudo apt install ${{matrix.compiler}}
5964

.github/workflows/windows-unit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: windows-latest
1717

1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020

2121
- name: make build directory
2222
run: mkdir build_dir

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ cmake-build-debug/*
4949
cmake-build-relwithdebinfo/*
5050
build/*
5151
bin/*
52+
*.egg-info/*

CHANGELOG.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ This changelog contains a non-exhaustive list of new features and notable bug-fi
66

77

88
<br/><br/>
9-
# DTWC v0.1.0
9+
# DTWC v1.0.0
1010

1111
## New features
12-
* HiGHS solver is added for open-source alternative to Gurobi.
12+
* HiGHS solver is added for open-source alternative to Gurobi (which is now not necessary for compilation and can be enabled by necessary flags).
1313
* Command line interface is added.
14-
* Documentation is improved.
15-
14+
* Documentation is improved (Doxygen website).
1615

1716

1817
## Notable Bug-fixes
@@ -27,9 +26,10 @@ This changelog contains a non-exhaustive list of new features and notable bug-fi
2726

2827
## Developer updates:
2928
* The software is now being tested via Catch2 library.
29+
* Dependabot is added.
3030

3131
<br/><br/>
32-
# DTWC v0.0.3
32+
# DTWC v0.3.0
3333

3434
## New features
3535
* UCR_test_2018 data integration for benchmarking.
@@ -44,9 +44,9 @@ This changelog contains a non-exhaustive list of new features and notable bug-fi
4444
* `std::filesystem::path operator+` was unnecessary and removed.
4545

4646
<br/><br/>
47-
# DTWC v0.0.2
47+
# DTWC v0.2.0
4848

49-
DTWC with a better interface for other people's use.
49+
A user interface is created for other people's use.
5050

5151
## New features / updates
5252
- Scores file with silhouette score is added.
@@ -68,7 +68,7 @@ DTWC with a better interface for other people's use.
6868
* Required C++ standard is upgraded from C++17 to C++20.
6969

7070
<br/><br/>
71-
# DTWC v0.0.1
71+
# DTWC v0.1.0
7272

7373
This is the initial release of DTWC.
7474

CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.21)
66
# so that it works well with tools like CPM or other
77
# manual dependency management
88

9-
project(DTWC++ VERSION "0.1.0"
9+
project(DTWC++ VERSION "1.0.0"
1010
DESCRIPTION "A C++ library for fast Dynamic Time Wrapping Clustering"
1111
HOMEPAGE_URL https://battery-intelligence-lab.github.io/dtw-cpp/
1212
LANGUAGES CXX C)
@@ -78,4 +78,15 @@ endif()
7878

7979
if(BUILD_BENCHMARK)
8080
add_subdirectory(benchmark)
81+
endif()
82+
83+
find_package(pybind11 QUIET)
84+
85+
if(pybind11_FOUND)
86+
pybind11_add_module(dtwcpp
87+
python/py_main.cpp)
88+
89+
target_link_libraries(dtwcpp PRIVATE dtwc++ project_warnings project_options armadillo)
90+
else()
91+
message(STATUS "pybind11 not found. Skipping the dtwcpp module.")
8192
endif()

benchmark/UCR_dtwc.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ inline void UCR_2018()
9797
//(settings::root_folder / "data/benchmark/UCRArchive_2018/AllGestureWiimoteZ/AllGestureWiimoteZ_TEST.tsv")
9898

9999
};
100+
101+
dataofInterest = UCR_list; // Comment this out to do an individual testing.
102+
100103
size_t solved = 0;
101104
for (auto &file_path : dataofInterest) {
102105
dl.path(file_path);
@@ -108,10 +111,8 @@ inline void UCR_2018()
108111

109112
std::cout << "Now, number " << solved << " " << file_path << " is being solved.\n";
110113
solved++;
111-
// if (solved < 25) // We already calculated this part
112-
// continue;
113114

114-
if (prob.data.size() > 1000) // DOnt calculate large data it is not good. For example Crop.
115+
if (prob.data.size() > 1000) // Don't calculate large data it is not good. For example Crop.
115116
continue;
116117

117118
prob.set_numberOfClusters(Nc); // Nc = number of clusters.

0 commit comments

Comments
 (0)