Conversation
requirements.txt
Outdated
| pytz==2017.2 | ||
| requests==2.18.4 | ||
| six==1.11.0 | ||
| SQLAlchemy==1.1.14 |
There was a problem hiding this comment.
I'm trying to keep the requirements minimal so I made SQLAlchemy an optional extra in the setup.py file.
Do you know which packages require autobahn and txaio?
There was a problem hiding this comment.
You can ignore autobahn (that was picked up by mistake). Autobahn is the WAMP implementation for Python. WAMP is in turn a weird WS protocol that Poloniex used in their v1 version (which does not work anymore) of their WS feed.
There was a problem hiding this comment.
However, SQLAchemy is needed. If I don't install it, and try run it inside the container, it complains!
There was a problem hiding this comment.
Yes, but it's an optional dependency. You install it with:
pip install numismatic[SQL]
It's already specified in the setup.py file in the extras_require directive.
I want to change the SQL to sql actually. There's a visualisation piece I want to add which will require pandas and I'll put that change in at the same time.
There was a problem hiding this comment.
Two things:
- I am not familiar with optional dependencies, but if it is optional, then it should work without it needing to be installed. This is not the case now. So it's not optional (in my mind)
- Installing pandas will require the container be much more complex than it already is. I am against the visualization for two reasons: (a) It will complicate the container (b) I think visualization should be an "add-on" module, and not part of numismatic cli
There was a problem hiding this comment.
It is optional in that the FileCollector works without sqlalchemy or Pandas. If you want to use the SqlCollector then you have to install the sql dependencies. If you want to use the DataframeCollector you'll have to install pandas.
There was a problem hiding this comment.
With regards to the container, you can have a minimal one to run the collector in the background. You could provide another one with more optional extras installed or leave that for people to do themselves.
I do think that visualisations make a big difference, especially when it comes to selling stuff.
Dockerfile
Outdated
| COPY ./ /usr/src/app | ||
| RUN pip install -e . | ||
| WORKDIR numismatic | ||
| CMD coin listen -f poloniex -a btc collect run |
There was a problem hiding this comment.
Very happy to have a minimal Dockerfile.
I think the CMD will need to be something more generic though.
There was a problem hiding this comment.
Yes, I put that command there for a demo. The minimalism is all due to you removing Pandas... Pandas needed some very hectic dependencies in order for it to work...
There was a problem hiding this comment.
I don't think the Dockerfile is the place to have a demo. I'll submit a commit with a suggestion once I can try it on a Linux box.
There was a problem hiding this comment.
Yes, I agree. When I get back home, on the 28th, I will change it to work better...
|
Do we need to remove the |
|
Regarding the Devops folder, we can keep some things, but it will take a bit of work. In fact, using packer is such a huge overkill, that I deemed it not really worth it... |
The Dockerfile works, and demonstrates how a command will be run.
CMDis justcoin list, however theCMDdocker command (unlikeEntrrypoint) is meant to be overridden. So it can therefore run whatever is wanted