From 8a50db8309fef45ae9904c2192962f71ea1a6099 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 25 Jan 2026 11:33:29 +0000 Subject: [PATCH 1/3] Initial plan From daac7eec6c92ad4d6eefaa9eda3999c312ec92e1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 25 Jan 2026 11:38:35 +0000 Subject: [PATCH 2/3] Add build configuration files for Python project Co-authored-by: mdellison90-stack <230609064+mdellison90-stack@users.noreply.github.com> --- .gitignore | 46 +++++++++++++++++++++++++++++++++++++++++++- Dockerfile | 4 +++- MANIFEST.in | 10 ++++++++++ requirements-dev.txt | 6 ++++++ requirements.txt | 1 + setup.py | 38 ++++++++++++++++++++++++++++++++++++ 6 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 MANIFEST.in create mode 100644 requirements-dev.txt create mode 100644 requirements.txt create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index ef3f0fe..fbf2949 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,52 @@ /db/orders.db /binance-trader.log +# Python **/env *.pyc .pyc +__pycache__/ +*.py[cod] +*$py.class + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# Virtual environments +venv/ +ENV/ +env.bak/ +venv.bak/ + +# IDEs +.vscode/ +.idea/ +*.swp +*.swo +*~ .DS_Store -.gitignore + +# Testing +.pytest_cache/ +.coverage +htmlcov/ +.tox/ +.mypy_cache/ diff --git a/Dockerfile b/Dockerfile index 6b896b3..8af53eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ FROM python:3-alpine -RUN pip install requests +# Copy requirements first for better caching +COPY requirements.txt /tmp/ +RUN pip install --no-cache-dir -r /tmp/requirements.txt COPY app/ /app COPY db/ /db diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..7962c83 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,10 @@ +include README.md +include LICENSE +include requirements.txt +include requirements-dev.txt +recursive-include app *.py +recursive-include db *.db +exclude .gitignore +exclude .dockerignore +global-exclude __pycache__ +global-exclude *.py[cod] diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..7e617f2 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,6 @@ +-r requirements.txt +pytest>=7.0.0 +pytest-cov>=3.0.0 +flake8>=4.0.0 +black>=22.0.0 +mypy>=0.950 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4a5625c --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +requests>=2.25.0 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..f53fb81 --- /dev/null +++ b/setup.py @@ -0,0 +1,38 @@ +from setuptools import setup, find_packages + +with open("README.md", "r", encoding="utf-8") as fh: + long_description = fh.read() + +with open("requirements.txt", "r", encoding="utf-8") as fh: + requirements = [line.strip() for line in fh if line.strip() and not line.startswith("#")] + +setup( + name="binance-trader", + version="2.0.0", + author="Yasin Kuyu", + description="Cryptocurrency Trading Bot for Binance (Experimental)", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/yasinkuyu/binance-trader", + packages=find_packages(), + classifiers=[ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + ], + python_requires=">=3.7", + install_requires=requirements, + entry_points={ + "console_scripts": [ + "binance-trader=trader:main", + ], + }, +) From bb41a67a0efa8267e6489ce196a429907600516b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 25 Jan 2026 11:40:41 +0000 Subject: [PATCH 3/3] Address code review feedback - add __init__.py and fix packaging Co-authored-by: mdellison90-stack <230609064+mdellison90-stack@users.noreply.github.com> --- MANIFEST.in | 2 +- app/__init__.py | 1 + setup.py | 5 ----- 3 files changed, 2 insertions(+), 6 deletions(-) create mode 100644 app/__init__.py diff --git a/MANIFEST.in b/MANIFEST.in index 7962c83..f9c8273 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,8 +3,8 @@ include LICENSE include requirements.txt include requirements-dev.txt recursive-include app *.py -recursive-include db *.db exclude .gitignore exclude .dockerignore global-exclude __pycache__ global-exclude *.py[cod] +global-exclude *.db diff --git a/app/__init__.py b/app/__init__.py new file mode 100644 index 0000000..d95b0f0 --- /dev/null +++ b/app/__init__.py @@ -0,0 +1 @@ +# App package initialization diff --git a/setup.py b/setup.py index f53fb81..80160f2 100644 --- a/setup.py +++ b/setup.py @@ -30,9 +30,4 @@ ], python_requires=">=3.7", install_requires=requirements, - entry_points={ - "console_scripts": [ - "binance-trader=trader:main", - ], - }, )