Skip to content

Commit

Permalink
d
Browse files Browse the repository at this point in the history
  • Loading branch information
SermetPekin committed Jul 26, 2024
1 parent b829bd3 commit ca44956
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use an official Python runtime as a parent image
FROM python:3.9-slim

# Set the working directory in the container
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . /app

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Make port 80 available to the world outside this container
EXPOSE 80

# Define environment variable
ENV NAME evdspy

# Run the application
CMD ["python", "main_t.py"]
51 changes: 51 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Variables
VENV = venv
PYTHON = $(VENV)/bin/python
PIP = $(VENV)/bin/pip
TEST_DIR = tests

# Targets
all: install test

.PHONY: venv
venv:
python3 -m venv $(VENV)

.PHONY: install
install: venv
$(PIP) install --upgrade pip
$(PIP) install -r requirements.txt

.PHONY: test
test:
python3.11 -m pip install -r ./requirements-dev.txt
pytest -v
tox run
.PHONY: lint
lint:
$(PYTHON) -m flake8 .

.PHONY: format
format:
$(PYTHON) -m black .

.PHONY: check
check:
ruff check
tox run

.PHONY: clean
clean:
rm -rf $(VENV)
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete

.PHONY: help
help:
@echo "Makefile targets:"
@echo " venv - Create a virtual environment"
@echo " install - Install dependencies"
@echo " test - Run tests"
@echo " lint - Lint the code"
@echo " format - Format the code"
@echo " clean - Clean up the environment"
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from evdspy import menu
menu()
2 changes: 2 additions & 0 deletions main_t.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from evdspy import *
help_evdspy()
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ six>=1.16.0
urllib3>=1.26.12
openpyxl>=3.0.10
numpy>=1.5.0
pytest>=8.1.0
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tox]
envlist=
py39,py310,py311,py312

0 comments on commit ca44956

Please sign in to comment.