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..f9c8273 --- /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 +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/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..80160f2 --- /dev/null +++ b/setup.py @@ -0,0 +1,33 @@ +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, +)