Skip to content

Commit

Permalink
1.3.4rc5-1 fix #65
Browse files Browse the repository at this point in the history
  • Loading branch information
DogsTailFarmer committed Aug 24, 2023
1 parent 41090f5 commit daa5e43
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.3.4rc5-1 2023-08-24
### Update
* `relaunch.py`: update deprecation method for `libtmux==0.22.1`

### Fix
* [ Windows path can't contain ':' symbol #65 ](https://github.com/DogsTailFarmer/martin-binance/issues/65)

## 1.3.4rc5 2023-08-20
### Fix
* Up requirements for exchanges-wrapper to 1.3.6b7
Expand Down
4 changes: 2 additions & 2 deletions martin_binance/margin_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ def session_data_handler(cls):
#
copy(ms.PARAMS, Path(session_root, Path(ms.PARAMS).name))

shutil.make_archive(str(Path(BACKTEST_PATH, f"{session_root}_{datetime.now().strftime('%m%d-%H:%M')}")),
shutil.make_archive(str(Path(BACKTEST_PATH, f"{session_root}_{datetime.now().strftime('%m%d-%H-%M')}")),
'zip',
session_root)

Expand Down Expand Up @@ -1468,7 +1468,7 @@ def back_test_handler(cls):
def _back_test_handler_ext(cls):
# Save test data
session_path = Path(BACKTEST_PATH,
f"{cls.exchange}_{cls.symbol}_{datetime.now().strftime('%m%d-%H:%M:%S')}")
f"{cls.exchange}_{cls.symbol}_{datetime.now().strftime('%m%d-%H-%M-%S')}")
session_path.mkdir(parents=True)
ds_ticker = pd.Series(cls.strategy.account.ticker).astype(float)
ds_ticker.index = pd.to_datetime(ds_ticker.index, unit='ms')
Expand Down
19 changes: 8 additions & 11 deletions martin_binance/service/relaunch.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__author__ = "Jerry Fedorenko"
__copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM"
__license__ = "MIT"
__version__ = "1.3.1"
__version__ = "1.3.4"
__maintainer__ = "Jerry Fedorenko"
__contact__ = 'https://github.com/DogsTailFarmer'
##################################################################
Expand All @@ -18,18 +18,15 @@
time.sleep(10)

server = libtmux.Server()

session = server.find_where({"session_name": "Trade"})
session = [s for s in server.sessions if s.name == "Trade"][0]

if session:
for window in session.list_windows():
window_name = window.get('window_name')
pane = window.attached_pane
if window_name == 'srv':
pane.send_keys('exchanges-wrapper-srv', enter=True)
for window in session.windows:
if window.name == 'srv':
window.attached_pane.send_keys('exchanges-wrapper-srv', enter=True)
else:
last_state = Path(LAST_STATE_PATH, f"{window_name.replace('-', '_').replace('/', '')}.json")
pair = Path(WORK_PATH, f"cli_{window_name.replace('-', '_').replace('/', '')}.py")
last_state = Path(LAST_STATE_PATH, f"{window.name.replace('-', '_').replace('/', '')}.json")
pair = Path(WORK_PATH, f"cli_{window.name.replace('-', '_').replace('/', '')}.py")
if pair.exists() and last_state.exists():
pane.send_keys(f"{pair} 1", enter=True)
window.attached_pane.send_keys(f"{pair} 1", enter=True)
time.sleep(4)

0 comments on commit daa5e43

Please sign in to comment.