Skip to content

Commit aa73229

Browse files
committed
modify setup to include td.app
1 parent 67b9ff2 commit aa73229

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

samples/instructions/installation_notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ pip install --upgrade twine
156156
Now that we have everything installed, we can build or distribution package. To build our distribution pacakge run the following command:
157157

158158
```console
159-
setup.py sdist bdist_wheel
159+
python setup.py sdist bdist_wheel
160160
```
161161

162162
This will generate a distrubtion archives in the _dist_ folder. In fact, if you look in your directory you should see a few new folders one called _dist_ and one called _build_. These were generated when we ran the command.

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# I'm in alpha development still, so a compliant version number is a1.
1919
# read this as MAJOR VERSION 0, MINOR VERSION 1, MAINTENANCE VERSION 0
20-
version='0.2.6',
20+
version='0.2.8',
2121

2222
# here is a simple description of the library, this will appear when
2323
# someone searches for the library on https://pypi.org/search
@@ -46,7 +46,13 @@
4646
keywords='finance, td ameritrade, api',
4747

4848
# here are the packages I want "build."
49-
packages=find_packages(include=['td', 'samples']),
49+
packages=find_packages(include=['td', 'samples', 'td.app','td.templates']),
50+
51+
# here we specify any package data.
52+
package_data={
53+
# And include any files found subdirectory of the "td" package.
54+
"td": ["app/*", "templates/*"],
55+
},
5056

5157
# I also have some package data, like photos and JSON files, so I want to
5258
# include those too.

td/stream.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,10 @@ async def _connect(self, pipeline_start: bool = True) -> websockets.WebSocketCli
630630
return self.connection
631631

632632
else:
633+
633634
# Login to the stream.
634635
await self._send_message(login_request)
636+
await self._receive_message(return_value=False)
635637
return self.connection
636638

637639

@@ -703,7 +705,6 @@ async def _receive_message(self, return_value: bool = False) -> dict:
703705
await self._write_to_csv(data = message_decoded)
704706
except:
705707
print('Could not write content to CSV file, closing stream')
706-
# await asyncio.get_running_loop().stop()
707708
await self.close_stream()
708709
break
709710

0 commit comments

Comments
 (0)