From b0e51cc7ed000b7d9d41c9a6a8e0e866dc424a7a Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Tue, 28 Oct 2025 21:02:58 +0545 Subject: [PATCH] refactor(deployment): rename class and update docstrings for clarity --- src/scripts/deployment_files_generator.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/scripts/deployment_files_generator.py b/src/scripts/deployment_files_generator.py index eb8a3c6..de17874 100644 --- a/src/scripts/deployment_files_generator.py +++ b/src/scripts/deployment_files_generator.py @@ -1,12 +1,12 @@ """ -Deployment files generator for djinit +Deployment file generator for djinit. Handles creation of Justfile, Procfile, and deployment-related files. """ -from scr.utils import change_cwd, create_file_with_content +from src.utils import change_cwd, create_file_with_content -class DeploymentFileGenerator: +class DeploymentConfigGenerator: def __init__(self, project_root: str, project_name: str): self.project_root = project_root self.project_name = project_name @@ -208,7 +208,6 @@ release: python manage.py migrate --noinput && python manage.py collectstatic -- return result def create_gunicorn_config(self) -> bool: - """Create a gunicorn configuration file.""" with change_cwd(self.project_root): gunicorn_config_content = f"""# Gunicorn configuration file for {self.project_name} # Usage: gunicorn -c gunicorn_config.py {self.project_name}.wsgi:application @@ -257,7 +256,6 @@ tmp_upload_dir = None return result def create_runtime_txt(self, python_version: str = "3.13") -> bool: - """Create runtime.txt file for specifying Python version.""" with change_cwd(self.project_root): runtime_content = f"""python-{python_version} """ @@ -270,7 +268,6 @@ tmp_upload_dir = None return result def create_nixpacks_toml(self) -> bool: - """Create nixpacks.toml for Nixpacks deployment configuration.""" with change_cwd(self.project_root): nixpacks_content = f"""# Nixpacks configuration for {self.project_name} # Used by Railway, Render, and other platforms that support Nixpacks