mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Merge pull request #1877 from freqtrade/eliminate_freqtradebin
[proposal] Eliminate bin/freqtrade
This commit is contained in:
commit
28c796a234
|
@ -1,7 +1,13 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
from freqtrade.main import main, set_loggers
|
||||
|
||||
set_loggers()
|
||||
|
||||
warnings.warn(
|
||||
"Deprecated - To continue to run the bot like this, please run `pip install -e .` again.",
|
||||
DeprecationWarning)
|
||||
main(sys.argv[1:])
|
||||
|
|
|
@ -6,10 +6,7 @@ To launch Freqtrade as a module
|
|||
> python -m freqtrade (with Python >= 3.6)
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
from freqtrade import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
main.set_loggers()
|
||||
main.main(sys.argv[1:])
|
||||
main.main()
|
||||
|
|
|
@ -27,7 +27,7 @@ class Arguments(object):
|
|||
Arguments Class. Manage the arguments received by the cli
|
||||
"""
|
||||
|
||||
def __init__(self, args: List[str], description: str) -> None:
|
||||
def __init__(self, args: Optional[List[str]], description: str) -> None:
|
||||
self.args = args
|
||||
self.parsed_arg: Optional[argparse.Namespace] = None
|
||||
self.parser = argparse.ArgumentParser(description=description)
|
||||
|
|
|
@ -23,12 +23,15 @@ from freqtrade.worker import Worker
|
|||
logger = logging.getLogger('freqtrade')
|
||||
|
||||
|
||||
def main(sysargv: List[str]) -> None:
|
||||
def main(sysargv: List[str] = None) -> None:
|
||||
"""
|
||||
This function will initiate the bot and start the trading loop.
|
||||
:return: None
|
||||
"""
|
||||
|
||||
try:
|
||||
set_loggers()
|
||||
|
||||
worker = None
|
||||
return_code = 1
|
||||
|
||||
|
@ -64,5 +67,4 @@ def main(sysargv: List[str]) -> None:
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
set_loggers()
|
||||
main(sys.argv[1:])
|
||||
main()
|
||||
|
|
6
setup.py
6
setup.py
|
@ -17,7 +17,6 @@ setup(name='freqtrade',
|
|||
author_email='michael.egger@tsn.at',
|
||||
license='GPLv3',
|
||||
packages=['freqtrade'],
|
||||
scripts=['bin/freqtrade'],
|
||||
setup_requires=['pytest-runner', 'numpy'],
|
||||
tests_require=['pytest', 'pytest-mock', 'pytest-cov'],
|
||||
install_requires=[
|
||||
|
@ -43,6 +42,11 @@ setup(name='freqtrade',
|
|||
],
|
||||
include_package_data=True,
|
||||
zip_safe=False,
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'freqtrade = freqtrade.main:main',
|
||||
],
|
||||
},
|
||||
classifiers=[
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
|
||||
|
|
Loading…
Reference in New Issue
Block a user