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 <bevilacquajoey@gmail.com>
Change-Id: I87cd9837cd7f23c39309cb9b692ef1ebda0b5d20
parent 001d57bc
......@@ -13,15 +13,15 @@
/local.properties
# ML
/ml/.Python
/ml/bin
/ml/out
/ml/export
/ml/include
/ml/lib
/ml/out
/ml/pip-selfcheck.json
/ml/pyvenv.cfg
/_ml/.Python
/_ml/bin
/_ml/out
/_ml/export
/_ml/include
/_ml/lib
/_ml/out
/_ml/pip-selfcheck.json
/_ml/pyvenv.cfg
# Build
app/release
......
......@@ -56,7 +56,7 @@ Setup the work environment
* Prevent git from tracking changes to your trained plugin models
```shell
./setup.sh
./_scripts/setup.sh
```
### 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.md).
[readme found in the `ml` module](_ml/Readme.md).
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:
```shell
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)
PARENT_DIR=${LOCAL_DIR}/..
KTLINT_BIN=${PARENT_DIR}/ktlint
ML_DIR=${LOCAL_DIR}/../_ml
function install_pre_push() {
cp "pre-push.sh" ".git/hooks/pre-push"
chmod +x ".git/hooks/pre-push"
cp "${LOCAL_DIR}/pre-push.sh" "${PARENT_DIR}/.git/hooks/pre-push"
chmod +x "${PARENT_DIR}/.git/hooks/pre-push"
}
function install_ktlint() {
echo "Downloading ktlint..."
curl -sSLO https://github.com/shyiko/ktlint/releases/download/0.31.0/ktlint
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 https://github.com/pinterest/ktlint/releases/download/0.31.0/ktlint
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