-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b829bd3
commit ca44956
Showing
6 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from evdspy import menu | ||
menu() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from evdspy import * | ||
help_evdspy() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ six>=1.16.0 | |
urllib3>=1.26.12 | ||
openpyxl>=3.0.10 | ||
numpy>=1.5.0 | ||
pytest>=8.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[tox] | ||
envlist= | ||
py39,py310,py311,py312 |