From 8887524794f1ef7085c4254c3069b910e847430d Mon Sep 17 00:00:00 2001 From: nivika11 Date: Mon, 25 Aug 2025 14:08:24 +0800 Subject: [PATCH 1/7] Added dependency in the pyproject file --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index d70d48a28..75e9fe113 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ dependencies = [ "typer>=0.16.0", "alabaster>=1.0.0", "watchdog>=6.0.0", + "requests>=2.31.0", # added by Nivika ] [project.optional-dependencies] From fcfec10707920e13e49f0ccf69b13d261e03034e Mon Sep 17 00:00:00 2001 From: nivika11 Date: Mon, 25 Aug 2025 14:29:21 +0800 Subject: [PATCH 2/7] Updated README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d0eeab112..63350f574 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ ## Features +We use unittest for testing. + * Testing setup with pytest * GitHub Actions testing: Setup to easily test for Python 3.10, 3.11, 3.12, and 3.13 * Auto-release to [PyPI](https://pypi.python.org/pypi) when you push a new tag to master (optional) From ada45ea96484b2356a3cbbf1f097550f5201ba8f Mon Sep 17 00:00:00 2001 From: beier Date: Mon, 25 Aug 2025 13:58:21 +0800 Subject: [PATCH 3/7] Add Dockerfile and docker-compose.yml for deployment automation --- docker-compose.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..34dfe626a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.8' + +services: + app: + build: . + container_name: mypackage_app + command: python -m your_package + ports: + - "8000:8000" + volumes: + - .:/app From e6a50d7d6308e9fb5232fe956a564f44ca764621 Mon Sep 17 00:00:00 2001 From: beier Date: Mon, 25 Aug 2025 14:51:13 +0800 Subject: [PATCH 4/7] Issue Resolved --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 63350f574..7eef19468 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ## Features -We use unittest for testing. +We use unittest for testing. This project uses pytest for testing.. * Testing setup with pytest * GitHub Actions testing: Setup to easily test for Python 3.10, 3.11, 3.12, and 3.13 From 06071f21c095baf043123603aa43730798975329 Mon Sep 17 00:00:00 2001 From: beier Date: Mon, 25 Aug 2025 14:39:10 +0800 Subject: [PATCH 5/7] Update README: This project uses pytest for testing. --- DockerFile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 DockerFile diff --git a/DockerFile b/DockerFile new file mode 100644 index 000000000..269db261b --- /dev/null +++ b/DockerFile @@ -0,0 +1,17 @@ +# Use official Python image +FROM python:3.11-slim + +# Set working directory +WORKDIR /app + +# Copy project files into container +COPY . . + +# Install dependencies +RUN pip install --no-cache-dir -r requirements.txt + +# Run tests (optional - useful for CI/CD) +RUN pytest || true + +# Set entrypoint (replace "your_package" with your actual package folder name) +ENTRYPOINT ["python", "-m", "your_package"] From 783144480ab3f989cee6ff394b013cbf75305272 Mon Sep 17 00:00:00 2001 From: nivika11 Date: Wed, 10 Sep 2025 20:45:03 +0800 Subject: [PATCH 6/7] Made changes to the test_bake_project.py variable name --- tests/test_bake_project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_bake_project.py b/tests/test_bake_project.py index 28bbac91b..56b03803c 100644 --- a/tests/test_bake_project.py +++ b/tests/test_bake_project.py @@ -56,8 +56,8 @@ def check_output_inside_dir(command, dirpath): def test_year_compute_in_license_file(cookies): with bake_in_temp_dir(cookies) as result: license_file_path = result.project.join("LICENSE") - now = datetime.datetime.now() - assert str(now.year) in license_file_path.read() + current_time = datetime.datetime.now() # made changes here from now to current_time + assert str(current_time.year) in license_file_path.read() def project_info(result): From e92acae9b2e799079371a6ca6d584f51103097c6 Mon Sep 17 00:00:00 2001 From: nivika11 Date: Wed, 10 Sep 2025 21:37:25 +0800 Subject: [PATCH 7/7] modifed now variable in test_bake_project.py --- tests/test_bake_project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_bake_project.py b/tests/test_bake_project.py index 56b03803c..2825e849e 100644 --- a/tests/test_bake_project.py +++ b/tests/test_bake_project.py @@ -56,8 +56,8 @@ def check_output_inside_dir(command, dirpath): def test_year_compute_in_license_file(cookies): with bake_in_temp_dir(cookies) as result: license_file_path = result.project.join("LICENSE") - current_time = datetime.datetime.now() # made changes here from now to current_time - assert str(current_time.year) in license_file_path.read() + current_times = datetime.datetime.now() # made changes here from now to current_time + assert str(current_times.year) in license_file_path.read() def project_info(result):