Repository: liampauling/flumine (python)

Issue:
Allow order stream to be disabled
Often a user will want to only record data therefore it should be possible to disable the order stream from starting (reduces the number of threads)

Ideally this is done on the Client object

```python
client.enable_order_stream: bool = False
```

Pull request description:
closes #178
allow order stream to be disabled (enabled by default)
remove incorrect add_simulated, this is for paper trading only

Patch:
diff --git a/HISTORY.rst b/HISTORY.rst
index 7f7b70a..860a60f 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -3,18 +3,6 @@
 Release History
 ---------------
 
-1.6.3 (2020-06-03)
-+++++++++++++++++++
-
-**Improvements**
-
-- #178 Client order stream disable/enable
-- #179 Info properties
-
-**Bug Fixes**
-
-- #191 missing git config
-
 1.6.2 (2020-06-03)
 +++++++++++++++++++
 
diff --git a/flumine/__version__.py b/flumine/__version__.py
index 709bed4..a0c94e1 100644
--- a/flumine/__version__.py
+++ b/flumine/__version__.py
@@ -1,6 +1,6 @@
 __title__ = "flumine"
 __description__ = "Betfair trading framework"
 __url__ = "https://github.com/liampauling/flumine"
-__version__ = "1.6.3"
+__version__ = "1.6.2"
 __author__ = "Liam Pauling"
 __license__ = "MIT"
diff --git a/flumine/clients/baseclient.py b/flumine/clients/baseclient.py
index 8a1aec1..a7b814e 100644
--- a/flumine/clients/baseclient.py
+++ b/flumine/clients/baseclient.py
@@ -22,6 +22,7 @@ class BaseClient:
         commission_base: float = DEFAULT_COMMISSION_BASE,
         interactive_login: bool = False,
         id_: str = None,
+        order_stream: bool = True,
     ):
         self.id = id_ or create_short_uuid()
         self.betting_client = betting_client
@@ -29,6 +30,7 @@ class BaseClient:
         self.capital_base = capital_base
         self.commission_base = commission_base
         self.interactive_login = interactive_login
+        self.order_stream = order_stream
 
         self.account_details = None
         self.account_funds = None
diff --git a/flumine/streams/streams.py b/flumine/streams/streams.py
index c453a59..98214d4 100644
--- a/flumine/streams/streams.py
+++ b/flumine/streams/streams.py
@@ -31,10 +31,10 @@ class Streams:
             strategy.streams.append(stream)
 
     def add_client(self, client: BaseClient) -> None:
-        if client.EXCHANGE == ExchangeType.SIMULATED:
-            self.add_simulated_order_stream()
-        elif client.EXCHANGE == ExchangeType.BETFAIR:
-            self.add_order_stream(client)
+        if client.order_stream:
+            # todo if paper_trade: add_simulated_order_stream()
+            if client.EXCHANGE == ExchangeType.BETFAIR:
+                self.add_order_stream(client)
 
     """ market data """
 


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 79d1968..1c30c22 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -65,8 +65,6 @@ jobs:
 
     - name: Publish
       run: |
-        git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
-        git config --local user.name "GitHub Action"
         twine upload dist/*
         mkdocs gh-deploy --force
       env:
diff --git a/tests/test_clients.py b/tests/test_clients.py
index aaaa593..954b1a4 100644
--- a/tests/test_clients.py
+++ b/tests/test_clients.py
@@ -27,6 +27,7 @@ class BaseClientTest(unittest.TestCase):
         self.assertEqual(self.base_client.chargeable_transaction_count, 0)
         self.assertIsNone(self.base_client.execution)
         self.assertEqual(self.base_client.trading_controls, [])
+        self.assertTrue(self.base_client.order_stream)
 
     def test_login(self):
         with self.assertRaises(NotImplementedError):
diff --git a/tests/test_streams.py b/tests/test_streams.py
index 3da6bd7..6bd467c 100644
--- a/tests/test_streams.py
+++ b/tests/test_streams.py
@@ -58,20 +58,20 @@ class StreamsTest(unittest.TestCase):
         self.streams(mock_strategy)
         self.assertEqual(len(mock_strategy.streams), 0)
 
-    @mock.patch("flumine.streams.streams.Streams.add_simulated_order_stream")
-    def test_add_client_simulated(self, mock_add_simulated_order_stream):
-        mock_client = mock.Mock()
-        mock_client.EXCHANGE = streams.ExchangeType.SIMULATED
-        self.streams.add_client(mock_client)
-        mock_add_simulated_order_stream.assert_called_with()
-
     @mock.patch("flumine.streams.streams.Streams.add_order_stream")
     def test_add_client_betfair(self, mock_add_order_stream):
-        mock_client = mock.Mock()
+        mock_client = mock.Mock(order_stream=True)
         mock_client.EXCHANGE = streams.ExchangeType.BETFAIR
         self.streams.add_client(mock_client)
         mock_add_order_stream.assert_called_with(mock_client)
 
+    @mock.patch("flumine.streams.streams.Streams.add_order_stream")
+    def test_add_client_no_order_stream(self, mock_add_order_stream):
+        mock_client = mock.Mock(order_stream=False)
+        mock_client.EXCHANGE = streams.ExchangeType.BETFAIR
+        self.streams.add_client(mock_client)
+        mock_add_order_stream.assert_not_called()
+
     @mock.patch("flumine.streams.streams.Streams._increment_stream_id")
     def test_add_stream_new(self, mock_increment):
         mock_strategy = mock.Mock()