Commit 21bbf920 authored by Joey's avatar Joey

scripts, ml: rename dirs

So that they don't get confused with app-modules dirs
Signed-off-by: Joey's avatarJoey <[email protected]>
Change-Id: I87cd9837cd7f23c39309cb9b692ef1ebda0b5d20
parent 001d57bc
......@@ -13,15 +13,15 @@
# ML
# Build
......@@ -56,7 +56,7 @@ Setup the work environment
* Prevent git from tracking changes to your trained plugin models
### Compile
......@@ -108,6 +108,6 @@ is bundled with the app, nor made available for download.
### Build your own suggestion plugin
To create your customized insulin suggestions plugins using ml, see the
[readme found in the `ml` module](ml/
[readme found in the `ml` module](_ml/
It's also possible to build a plugin manually, but no documentation is available for the time being.
......@@ -66,6 +66,6 @@ Sensitive file changes tracking should be disabled by running the
by updating the git index manually:
git update-index --skip-worktree ml/data/*
git update-index --skip-worktree ml/export/*
git update-index --skip-worktree _ml/data/*
git update-index --skip-worktree _ml/export/*
#!/usr/bin/env bash
LOCAL_DIR=$(dirname $0)
function install_pre_push() {
cp "" ".git/hooks/pre-push"
chmod +x ".git/hooks/pre-push"
cp "${LOCAL_DIR}/" "${PARENT_DIR}/.git/hooks/pre-push"
chmod +x "${PARENT_DIR}/.git/hooks/pre-push"
function install_ktlint() {
echo "Downloading ktlint..."
curl -sSLO
chmod a+x ktlint
./ktlint --apply-to-idea-project --android -y
./ktlint --install-git-pre-commit-hook
sed -i "s:xargs ktlint:xargs ./ktlint:" .git/hooks/pre-commit
curl -o ${KTLINT_BIN} -sSLO
chmod a+x ${KTLINT_BIN}
./${KTLINT_BIN} --apply-to-idea-project --android -y
./${KTLINT_BIN} --install-git-pre-commit-hook
sed -i "s:xargs ktlint:xargs ./ktlint:" ${PARENT_DIR}/.git/hooks/pre-commit
function disable_git_track_changes() {
......@@ -20,9 +25,8 @@ function disable_git_track_changes() {
function assume_models_unchanged() {
disable_git_track_changes ml/export
disable_git_track_changes ml/data/test_*.csv
disable_git_track_changes ml/data/train_*.csv
disable_git_track_changes ${ML_DIR}/data/test_*.csv
disable_git_track_changes ${ML_DIR}/data/train_*.csv
install_pre_push && install_ktlint && assume_models_unchanged
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment