mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-09-22 04:50:46 +02:00
Added basic docker configuration for test
This commit is contained in:
parent
0135eeeb3d
commit
a1d120f700
4 changed files with 118 additions and 1 deletions
24
.dockerignore
Normal file
24
.dockerignore
Normal file
|
@ -0,0 +1,24 @@
|
|||
__pycache__/
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
.Python
|
||||
env/
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.log
|
||||
.git
|
||||
.mypy_cache
|
||||
.pytest_cache
|
||||
.hypothesis
|
||||
.venv/
|
||||
.env
|
||||
logs/*.log
|
||||
*.egg-info/
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -14,4 +14,5 @@ logs/
|
|||
non_interactive_test.py
|
||||
test_determinism.py
|
||||
test.py
|
||||
deterministic_test.py
|
||||
deterministic_test.py
|
||||
build.ps1
|
34
Dockerfile
Normal file
34
Dockerfile
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Use Python 3.11 slim image for smaller size
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Set environment variables
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# Install system dependencies if needed
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy requirements first for better caching
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy application code
|
||||
COPY code/ ./code/
|
||||
COPY csv_files/ ./csv_files/
|
||||
COPY mypy.ini .
|
||||
|
||||
# Create necessary directories
|
||||
RUN mkdir -p deck_files logs
|
||||
|
||||
# Set the working directory to code for proper imports
|
||||
WORKDIR /app/code
|
||||
|
||||
# Run the application
|
||||
CMD ["python", "main.py"]
|
58
pyproject.toml
Normal file
58
pyproject.toml
Normal file
|
@ -0,0 +1,58 @@
|
|||
[build-system]
|
||||
requires = ["setuptools>=61.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "mtg-deckbuilder"
|
||||
version = "1.0.0"
|
||||
description = "A command-line tool for building and analyzing Magic: The Gathering decks"
|
||||
readme = "README.md"
|
||||
license = {file = "LICENSE"}
|
||||
authors = [
|
||||
{name = "Your Name", email = "your.email@example.com"}
|
||||
]
|
||||
classifiers = [
|
||||
"Development Status :: 4 - Beta",
|
||||
"Intended Audience :: End Users/Desktop",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
]
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
"pandas>=1.5.0",
|
||||
"inquirer>=3.1.3",
|
||||
"typing_extensions>=4.5.0",
|
||||
"fuzzywuzzy>=0.18.0",
|
||||
"python-Levenshtein>=0.12.0",
|
||||
"tqdm>=4.66.0",
|
||||
"scrython>=1.10.0",
|
||||
"numpy>=1.24.0",
|
||||
"requests>=2.31.0",
|
||||
"prettytable>=3.9.0",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"mypy>=1.3.0",
|
||||
"pandas-stubs>=2.0.0",
|
||||
"pytest>=8.0.0",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
mtg-deckbuilder = "code.main:run_menu"
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/mwisnowski/mtg_python_deckbuilder"
|
||||
Repository = "https://github.com/mwisnowski/mtg_python_deckbuilder"
|
||||
Issues = "https://github.com/mwisnowski/mtg_python_deckbuilder/issues"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["code*"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
"*" = ["*.csv"]
|
Loading…
Add table
Add a link
Reference in a new issue