Helper library for CoinAlpha projects
The library is published to pypi as birdfeeder-coinalpha
pip install birdfeeder-coinalpha
poetry add 'birdfeeder-coinalpha@^1'
In pyproject.toml:
birdfeeder-coinalpha = { git = "https://github.com/coinalpha/birdfeeder.git", branch = "master" } birdfeeder-coinalpha = { git = "https://github.com/coinalpha/birdfeeder.git", rev = "29cdd7229d0d35a989322f5026382400d1332da4" } birdfeeder-coinalpha = { git = "https://github.com/coinalpha/birdfeeder.git", tag = "0.1.0" }
pip:
git+https://github.com/coinalpha/birdfeeder.git@master#egg=birdfeeder git+https://github.com/coinalpha/birdfeeder.git@29cdd7229d0d35a989322f5026382400d1332da4#egg=birdfeeder git+https://github.com/coinalpha/[email protected]#egg=birdfeeder
To install library for development in conda environment, run
./install
Alternativelly (preferred), you can use poetry env:
poetry install poetry shell
- If you're running in conda, you need to install required package first.
- Then, see installed version in
conda env export
- Take this version and add into pyproject.toml, into
[tool.poetry.dependencies]
(or dev section, if the package is needed for development only). Specify version (or range) according to Dependency Specification
If using poetry:
- Run
poetry add <package>
Idea: we're keeping own version and dependencies info in pyproject.toml
, and then generating setup.py
so that the library could be installed via tools like pip. We're also generating environment.yml
file because we're mostly using conda to manage development environments at CoinAlpha.
- Change version in
pyproject.toml
andbirdfeeder/__init__.py
- Generate
setup.py
:dephell deps convert
- Generate
environment.yml
:poetry2conda --dev pyproject.toml environment.yml
- Commit updates
git add -u && git commit
- Create git tag
x.y.z
:git tag -s x.y.z
- Run
git push && git push --tags
- Publish to pypi:
poetry publish --build