Skip to content
Open
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
17 changes: 17 additions & 0 deletions DockerFile
Original file line number Diff line number Diff line change
@@ -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"]
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

## Features

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
* Auto-release to [PyPI](https://pypi.python.org/pypi) when you push a new tag to master (optional)
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3.8'

services:
app:
build: .
container_name: mypackage_app
command: python -m your_package
ports:
- "8000:8000"
volumes:
- .:/app
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_bake_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_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):
Expand Down