Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Makefile #9

Merged
merged 3 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 26 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SHELL = /bin/bash

PYTHON = python3
FRONTEND_PATH = ./df_designer_front
BACKEND_DIR = df_designer

.PHONY: help
help:
Expand All @@ -20,7 +21,7 @@ env_frontend:

.PHONY: clean_env_frontend
clean_env_frontend:
cd ${FRONTEND_PATH} && rm -rf
cd ${FRONTEND_PATH} && rm -rf node_modules

.PHONY: build_frontend
build_frontend: env_frontend
Expand All @@ -30,8 +31,8 @@ build_frontend: env_frontend
run_frontend: env_frontend
cd ${FRONTEND_PATH} && npm start

.PHONY: dev_frontend
dev_frontend: env_frontend
.PHONY: run_dev_frontend
run_dev_frontend: env_frontend
make run_frontend


Expand All @@ -46,14 +47,17 @@ env_backend:
clean_env_backend:
poetry env remove --all

.PHONY: build_backend
build_backend: env_backend
poetry build

.PHONY: run_backend
run_backend:
poetry run python -m df_designer run-app --cmd-to-run="ping ya.ru"
run_backend: env_backend
poetry run python -m ${BACKEND_DIR} run-app --cmd-to-run="ping ya.ru" --conf-reload="False"

.PHONY: run_dev_backend
run_dev_backend:
poetry shell
# TODO ...
run_dev_backend: env_backend
poetry run python -m ${BACKEND_DIR} run-app --cmd-to-run="ping ya.ru"



Expand All @@ -64,26 +68,25 @@ env:
make env_frontend
make env_backend

.PHONY: run_app
run_app:
make build_frontend
make run_backend

.PHONY: run_dev
run_dev:
make build_frontend
make run_dev_backend
.PHONY: clean_env
clean_env:
make clean_env_frontend
make clean_env_backend

.PHONY: build
build:
build: env
make build_frontend
# TODO build wheel
make build_backend

.PHONY: clean
clean:
make clean_env_frontend
make clean_env_backend
.PHONY: run_app
run_app: env
make run_frontend
make run_backend

.PHONY: run_dev
run_dev: env
make run_dev_frontend
make run_dev_backend



Expand Down
3 changes: 2 additions & 1 deletion df_designer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def run_app(
port: int = app.conf_port,
dir_logs: str = app.dir_logs,
cmd_to_run: str = app.cmd_to_run,
conf_reload: str = str(app.conf_reload),
):
"""Run the application."""
app.cmd_to_run = cmd_to_run
Expand All @@ -36,7 +37,7 @@ def run_app(
host=ip_address,
port=port,
log_level=app.conf_log_level,
reload=app.conf_reload,
reload=conf_reload.lower() in ["true", "yes", "t", "y", "1"],
)
server = uvicorn.Server(config)
server.run()
Expand Down
Loading