Skip to content

Commit

Permalink
Replace Pipenv with Poetry (#148)
Browse files Browse the repository at this point in the history
* replaced pipenv with poetry

* Updated requirements.txt

* updated travis configuration

* removed use of m2r in documentation
  • Loading branch information
ilcardella committed Jun 27, 2020
1 parent 4362925 commit 294d37d
Show file tree
Hide file tree
Showing 12 changed files with 1,147 additions and 93 deletions.
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ python:
- "3.6"
- "3.7"
- "3.8"
- "3.8-dev"

install:
- export PIPENV_IGNORE_VIRTUALENVS=1
- pipenv install
- pip install --upgrade pip
- pip install poetry
- poetry install -v

script:
- pipenv run test
- pipenv run docs
- python setup.py install
- poetry run pytest
- poetry run sphinx-build -b html doc doc/_build/html
- python setup.py install # Ideally replace with poetry install
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.2.0] 2020-03-14
## []
## Changed
- Replaced Pipenv with Poetry

## [2.2.0] - 2020-03-14
### Fixed
- Bug preventing to add a trade with fee equal to zero

Expand Down
23 changes: 0 additions & 23 deletions Pipfile

This file was deleted.

20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ your assets and the overall profit (or loss!)
## Dependencies

- Python 3.6+
- Pipenv (only for development)
- Poetry (only for development)
- PyGObject: https://pygobject.readthedocs.io/en/latest/index.html
- AlphaVantage: https://www.alphavantage.co/
- YFinance: https://github.com/ranaroussi/yfinance

View `Pipfile` or `setup.py` for the full list of python dependencies.
View `pyproject.toml` for the full list of python dependencies.

## Install

Expand Down Expand Up @@ -104,25 +104,19 @@ sudo pip3 uninstall TradingMate

## Development

The `Pipfile` helps you to setup a development virtual environmnet installing the required dependencies.
Install `pip` and `pipenv`
```
sudo apt-get update
sudo apt-get install python3-pip
sudo -H pip3 install -U pipenv
```
Install `poetry` on your system: https://python-poetry.org/

Create the virtual environment
Create the virtual environment with poetry
```
cd /path/to/repository
pipenv install
poetry install
```

### Test

You can run the test from the workspace with:
```
pipenv run test
poetry run pytest
```

### Documentation
Expand All @@ -134,7 +128,7 @@ https://tradingmate.readthedocs.io

You can build it locally from the repo root folder:
```
pipenv run docs
poetry run sphinx-build -b html doc doc/_build/html
```

The generated html files will be under `doc/_build/html`.
Expand Down
3 changes: 1 addition & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# -- Project information -----------------------------------------------------

project = 'TradingMate'
copyright = '2019, Alberto Cardellini'
copyright = '2020, Alberto Cardellini'
author = 'Alberto Cardellini'

# The short X.Y version
Expand All @@ -42,7 +42,6 @@
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'm2r'
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 0 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ Explore the next sections for a detailed documentation of each module too.

source/system.rst
source/modules.rst
source/changelog.rst

1 change: 0 additions & 1 deletion doc/source/changelog.rst

This file was deleted.

0 comments on commit 294d37d

Please sign in to comment.