ronaldlam / Autotrageur

Automated arbitrageur
2 stars 1 forks source link

Proposal: Backwards-compatible Checkpoint impl #208

Closed jaonewguy closed 5 years ago

jaonewguy commented 5 years ago

For #186

If the comments don't make sense, you can also read the Effective Python chapter "Item 44: Make pickle Reliable with copyreg"

Tested on scratch and dry run, resume still works as before. Haven't tested with different "versioning" will likely need to do some unit/integration testing for that.

jaonewguy commented 5 years ago

Regarding versioning and package version:

We don't have a setup.py structure like in firstpartylibs right now. If we were to use one of the solutions other than reading in an external file (number 4 in https://packaging.python.org/guides/single-sourcing-package-version/), should we create that structure in a separate task first?

I think the simplest solution for our purposes would be to put that version number in a config or txt file right now.

Some more helpful links for visibility: https://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package https://milkr.io/kfei/5-common-patterns-to-version-your-Python-package/4 https://stackoverflow.com/questions/17583443/what-is-the-correct-way-to-share-package-version-with-setup-py-and-the-package

Found this from enigma-catalyst project: https://github.com/warner/python-versioneer

ronaldlam commented 5 years ago

Yeah we can separate the versioning and this task. There are too many options... So with the simple solution, we need to remember to tag and update versions when deploying. I quite like the setuptools_scm way too. Although if we do go with that I think we need to be careful with the tagging. Regardless, we will need to update how the deployment works.