You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uses pytest to run a set of extensive test suites for the project
12
14
cmds:
13
15
- docker compose exec api sh -c "pytest"
14
16
dev:pyshell:
@@ -43,3 +45,18 @@ tasks:
43
45
desc: migrates models to HEAD
44
46
cmds:
45
47
- docker compose exec api sh -c "alembic -c /opt/$PROJ_NAME/alembic.ini upgrade head"
48
+
eject:
49
+
desc: eject the project from a template
50
+
summary: |
51
+
This process will remove any references to the Anomaly labs template,
52
+
it specifically will set the package name to your project name, fix
53
+
any references in configuration files to the labs project.
54
+
55
+
Finally it will remove references to all alembic migrations
56
+
57
+
Ejecting the template should only ever be done once!
58
+
cmds:
59
+
- rm src/labs/alembic/versions/*.py
60
+
- FROM="labs"; TO=$PROJ_NAME; for FROM_DIR in `find . -name $FROM`; do if [ -d $FROM_DIR ]; then TARGET_DIR=`echo $FROM_DIR | sed "s/$FROM/$TO/g"`; echo $FROM_DIR ">" $TARGET_DIR; mv $FROM_DIR $TARGET_DIR; fi ; done; for SRC_FILE in `ls **/*.py **/Makefile **/*.yml **/Dockerfile **/*.dockerfile **/alembic.ini **/.env* **/README.md `; do sed -i '' "s/$FROM/$TO/g" $SRC_FILE; done
0 commit comments