Skip to content

Commit

Permalink
Merge pull request #6 from Battery-Intelligence-Lab/develop
Browse files Browse the repository at this point in the history
Version 1.0.0-rc0
  • Loading branch information
ElektrikAkar committed Apr 29, 2024
2 parents 03a0575 + e14e072 commit a9042c2
Show file tree
Hide file tree
Showing 28 changed files with 483 additions and 147 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout current branch
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Build master with Jekyll
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
Expand Down
31 changes: 17 additions & 14 deletions .github/workflows/macos-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,38 @@ name: macOS unit
on:
push:
branches:
# - main
# - main
- develop
pull_request:
branches:
- '**'

jobs:

build-and-test:
name: macOS unit
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: install openmp
run: brew reinstall libomp & brew link libomp --force
- uses: actions/checkout@v4

- name: make build directory
- name: Install libomp without linking
run: |
brew install libomp llvm && brew link --force libomp
- name: Make build directory
run: mkdir build_dir

- name: cmake configure
run: cmake .. -DCMAKE_BUILD_TYPE=Debug -DDTWC_BUILD_TESTING=ON
- name: CMake configure
run: |
cmake .. -DCMAKE_BUILD_TYPE=Debug -DDTWC_BUILD_TESTING=ON
working-directory: build_dir

- name: cmake build
run: cmake --build . --parallel 2
- name: CMake build
run: |
cmake --build . --parallel 2
working-directory: build_dir

- name: cmake test
run: ctest -j2 -C Debug --output-on-failure
working-directory: build_dir
- name: CMake test
run: |
ctest -j2 -C Debug --output-on-failure
working-directory: build_dir
27 changes: 16 additions & 11 deletions .github/workflows/ubuntu-unit.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: Ubuntu unit
# adapted from: https://github.com/trase-cpp/trase/tree/master/.github/workflows
name: Ubuntu unit # adapted from: https://github.com/trase-cpp/trase/tree/master/.github/workflows
on:
push:
branches:
# - main
# - main
- develop
pull_request:
branches:
- '**'

jobs:

build-and-test:
name: Ubuntu unit ${{matrix.CC}}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -42,18 +40,25 @@ jobs:
- CC: clang-15
CXX: clang++-15
compiler: clang-15 libomp-15-dev
# - CC: clang-16 -> we don't have these as package.
# CXX: clang++-16
# compiler: clang-16
# - CC: clang-17
# CXX: clang++-17
# compiler: clang-17
- CC: clang-16
CXX: clang++-16
compiler: clang-16 libomp-16-dev
- CC: clang-17
CXX: clang++-17
compiler: clang-17 libomp-17-dev
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: update
run: sudo apt update

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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: make build directory
run: mkdir build_dir
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ cmake-build-debug/*
cmake-build-relwithdebinfo/*
build/*
bin/*
*.egg-info/*
16 changes: 8 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ This changelog contains a non-exhaustive list of new features and notable bug-fi


<br/><br/>
# DTWC v0.1.0
# DTWC v1.0.0

## New features
* HiGHS solver is added for open-source alternative to Gurobi.
* HiGHS solver is added for open-source alternative to Gurobi (which is now not necessary for compilation and can be enabled by necessary flags).
* Command line interface is added.
* Documentation is improved.

* Documentation is improved (Doxygen website).


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

## Developer updates:
* The software is now being tested via Catch2 library.
* Dependabot is added.

<br/><br/>
# DTWC v0.0.3
# DTWC v0.3.0

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

<br/><br/>
# DTWC v0.0.2
# DTWC v0.2.0

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

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

<br/><br/>
# DTWC v0.0.1
# DTWC v0.1.0

This is the initial release of DTWC.

Expand Down
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.21)
# so that it works well with tools like CPM or other
# manual dependency management

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

if(BUILD_BENCHMARK)
add_subdirectory(benchmark)
endif()

find_package(pybind11 QUIET)

if(pybind11_FOUND)
pybind11_add_module(dtwcpp
python/py_main.cpp)

target_link_libraries(dtwcpp PRIVATE dtwc++ project_warnings project_options armadillo)
else()
message(STATUS "pybind11 not found. Skipping the dtwcpp module.")
endif()
7 changes: 4 additions & 3 deletions benchmark/UCR_dtwc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ inline void UCR_2018()
//(settings::root_folder / "data/benchmark/UCRArchive_2018/AllGestureWiimoteZ/AllGestureWiimoteZ_TEST.tsv")

};

dataofInterest = UCR_list; // Comment this out to do an individual testing.

size_t solved = 0;
for (auto &file_path : dataofInterest) {
dl.path(file_path);
Expand All @@ -108,10 +111,8 @@ inline void UCR_2018()

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

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

prob.set_numberOfClusters(Nc); // Nc = number of clusters.
Expand Down
1 change: 0 additions & 1 deletion cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,4 @@ function(dtwc_setup_dependencies)
OPTIONS
"BUILD_SMOKE_TEST OFF"
)

endfunction()
10 changes: 6 additions & 4 deletions develop/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@

### Current priority:

- [ ] Numpy-like arrays for multi-dimensional DTW.
- [ ] If you accidentally compile with amd64_x86 you get bad_alloc due to the insufficient RAM in 32-bit computer. So, put a warning for that.
- [ ] Modernise `*.csv` reading interface, allow for rowwise or columnwise data.
- [x] CMake files arranging:
- [x] HiGHS 1.6.0 does not always work. Also it does not work in debug mode due to iterator level.
- [ ] Commenting
- [ ] MATLAB / Python integration
- [ ] JOSS paper
- [ ] Pybind11 usage for Python integration.
- [x] JOSS paper
- [ ] Speed up the code
- [ ] GPU programming
- [ ] Lighter and faster DTW cost calculation + make the band from long side so it is more accurate.
Expand All @@ -26,8 +28,8 @@
- [ ] Give error message if data could not be loaded.
- Benchmarking:
- [x] UCR_test_2018 is continuing.
- [ ] USR_dtai.py
- [ ] TSlearn
- [x] USR_dtai.py
- [x] TSlearn
- [ ] dtwclust in R
- [ ] Encapsulating Data and related functions in one folder.
- [ ] Open-source solver addition.
Expand All @@ -38,7 +40,7 @@
- [x] Doxygen website?
- [x] Remove unnecessary warping functions.
- [ ] Fix warnings. Especially, we should not get warnings from external libraries.
- [ ] Make Gurobi dependency optional. (Now it cannot be disabled. )
- [x] Make Gurobi dependency optional. (Now it cannot be disabled. )
- [x] Consider including Eigen library for matrix operations / linear system solution.
- [ ] w based DTW.
- [ ] Reading memoisation matrix distMat from file instead of re-calculating DTW every time.
Expand Down
9 changes: 9 additions & 0 deletions develop/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
- Do not use "using" in global namespace.
- First include standard headers then our headers.

## Versioning:

We use semantic versioning with MAJOR.MINOR.PATCH where:

- PATCH: Backwards compatible bug fix without introducing a new feature.
- MINOR: Backwards compatible new feature.
- MAJOR: Incompatible changes, especially on API.

See [this link](https://www.youtube.com/watch?v=xvPiZyx0cDc) for a detailed tutorial on versioning.

### Commenting:

Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = DTWC++
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.1.0
PROJECT_NUMBER = 1.0.0-rc0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
Loading

0 comments on commit a9042c2

Please sign in to comment.