Skip to content

Commit 482477b

Browse files
committed
Create personalize.py
1 parent ddca232 commit 482477b

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ PYTHON = python3
2828

2929
# .PHONY defines parts of the makefile that are not dependant on any specific file
3030
# This is most often used to store functions
31-
.PHONY = all help init setup upgrade format lint format-n-lint test-n-cover pre-commit debug-run dev-run prod-run clean wipe clean-n-wipe
31+
.PHONY = all help init setup upgrade format lint format-n-lint test-n-cover pre-commit debug-run dev-run prod-run docker-build docker-run clean wipe clean-n-wipe
3232

3333
# Defining an array variable
3434
IGNORED_FILES_AND_FOLDERS = .mypy_cache/ .pytest_cache/ htmlcov/ logs/ .coverage
@@ -52,6 +52,8 @@ help:
5252
@echo "$(BOLD_CYAN)make debug-run$(RESET_STYLES) : Debug pyflask-microservice"
5353
@echo "$(BOLD_CYAN)make dev-run$(RESET_STYLES) : Run pyflask-microservice in environment=development"
5454
@echo "$(BOLD_CYAN)make prod-run$(RESET_STYLES) : Run pyflask-microservice in environment=prod"
55+
@echo "$(BOLD_CYAN)make docker-build$(RESET_STYLES) : Build docker image for pyflask-microservice"
56+
@echo "$(BOLD_CYAN)make docker-run$(RESET_STYLES) : Run docker image for pyflask-microservice"
5557
@echo "$(BOLD_CYAN)make clean$(RESET_STYLES) : Clean pyflask-microservice"
5658
@echo "$(BOLD_CYAN)make wipe$(RESET_STYLES) : Wipe pyflask-microservice"
5759
@echo "$(BOLD_CYAN)make clean-n-wipe$(RESET_STYLES) : Clean and wipe pyflask-microservice"

pyflask-preferences.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ python_env_manager: venv
1111
# supported python versions: 3.7 | 3.8
1212
python_base_version_major: 3
1313
python_base_version_minor: 8
14-
14+
# docker_maintainer_details: add info of maintainer to docker image
1515
docker_maintainer_details: User <[email protected]>

scripts/dev/personalize.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import os
2+
3+
if __name__ == "__main__":
4+
5+
directory = os.listdir("scripts/dev")
6+
7+
for f_name in directory:
8+
print(f_name)

scripts/dev/service_init.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ function main() {
3535
eval $(get_python3_version)
3636
printf "\n"
3737

38-
# shellcheck disable=SC2154
39-
if [ "$pyflask_pref_is_personalized" == "false" ]; then
40-
echo "$style_bold_blue""Starting project personalization . . .""$style_reset"
41-
# TODO: start personalization
42-
printf "\n"
43-
fi
44-
4538
# check python3 and pip3 versions
4639
check_python3_dep_versions
4740
printf "\n"
@@ -53,6 +46,13 @@ function main() {
5346

5447
. "$SCRIPT_DIR"/check_env_manager.sh
5548

49+
# shellcheck disable=SC2154
50+
if [ "$pyflask_pref_is_personalized" == "false" ]; then
51+
echo "$style_bold_blue""Starting project personalization . . .""$style_reset"
52+
python3 scripts/dev/personalize.py
53+
printf "\n"
54+
fi
55+
5656
if [ "$pyflask_pref_python_env_manager" == "conda" ]; then
5757
recreate_conda_env
5858
# shellcheck disable=SC2154

0 commit comments

Comments
 (0)