Skip to content

Commit e39493b

Browse files
Replacing Travis-CI with GitHub Actions (fmilthaler#82)
Co-authored-by: Pietropaolo Frisoni <[email protected]>
1 parent e21ad6d commit e39493b

File tree

12 files changed

+89
-60
lines changed

12 files changed

+89
-60
lines changed

.github/workflows/pytest.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Python CI
2+
3+
env:
4+
QUANDLAPIKEY: ${{ secrets.QUANDLAPIKEY }}
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
- develop
11+
pull_request:
12+
branches:
13+
- master
14+
- develop
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
python-version: [ '3.10', '3.11' ]
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v3
26+
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v3
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
32+
- name: Install dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
python -m pip install .[test]
36+
37+
- name: Run tests
38+
run: make test

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ To keep everything consistent, please use [Black](https://github.com/psf/black)
3636
### Create a Pull Request
3737
Create a new [Pull Request](https://github.com/fmilthaler/FinQuant/pulls). Describe what your changes are in the Pull Request. If your contribution fixes a bug, or adds a features listed under [issues](https://github.com/fmilthaler/FinQuant/issues) as "#12", please add "fixes #12" or "closes #12".
3838

39-
If you do not have a [Quandl API key](https://docs.quandl.com/docs#section-authentication) set on your Travis account, some of the tests are most likely going to fail. There are two ways forward:
40-
1. you get a [Quandl API key](https://docs.quandl.com/docs#section-authentication), and set it as an environment variable under your Travis account settings.
41-
2. Or you set the target of your Pull Request to either `feature/new-feature` or `bugfix/new-bugfix`, if your contribution is a new feature of bugfix respectively. That way your changes can be merged into a branch of FinQuant, and all the tests can be ran with my [Quandl API key](https://docs.quandl.com/docs#section-authentication).
39+
If you do not have a [Quandl API key](https://docs.quandl.com/docs#section-authentication) set as a secret in your fork, some of the tests are going to fail.
40+
While you are working on your fork, you can ignore the Quandl specific tests that are failing. Once you are happy with your work,
41+
open a PR and use `master` as the target branch. GitHub Actions is set up to run the tests automatically for PRs, and the
42+
Quandl tests are then run with my secret API key.

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<a href="https://pypi.org/project/FinQuant">
1010
<img src="https://img.shields.io/badge/pypi-v0.2.2-brightgreen.svg?style=popout" alt='pypi'>
1111
</a>
12-
<a href="https://travis-ci.org/fmilthaler/FinQuant">
13-
<img src="https://travis-ci.org/fmilthaler/FinQuant.svg?style=popout?branch=master" alt='travis'>
12+
<a href="https://github.com/fmilthaler/FinQuant">
13+
<img src="https://github.com/fmilthaler/finquant/actions/workflows/pytest.yml/badge.svg?branch=master" alt='GitHub Actions'>
1414
</a>
1515
<a href="http://finquant.readthedocs.io/">
1616
<img src="https://img.shields.io/readthedocs/finquant.svg?style=popout" alt="docs">
@@ -162,14 +162,13 @@ As it is common for open-source projects, there are several ways to get hold of
162162

163163
### Dependencies
164164
*FinQuant* depends on the following Python packages:
165-
- python>=3.5.0
165+
- python>=3.10
166166
- numpy>=1.15
167-
- pandas>=0.24
168-
- matplotlib>=1.5.1
167+
- pandas>=2.0
168+
- matplotlib>=3.0
169169
- quandl>=3.4.5
170170
- yfinance>=0.1.43
171171
- scipy>=1.2.0
172-
- pytest>=2.8.7
173172

174173
### From PyPI
175174
*FinQuant* can be obtained from PyPI

README.tex.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<a href="https://pypi.org/project/FinQuant">
1010
<img src="https://img.shields.io/badge/pypi-v0.2.2-brightgreen.svg?style=popout" alt='pypi'>
1111
</a>
12-
<a href="https://travis-ci.org/fmilthaler/FinQuant">
13-
<img src="https://travis-ci.org/fmilthaler/FinQuant.svg?style=popout?branch=master" alt='travis'>
12+
<a href="https://github.com/fmilthaler/FinQuant">
13+
<img src="https://github.com/fmilthaler/finquant/actions/workflows/pytest.yml/badge.svg?branch=master" alt='GitHub Actions'>
1414
</a>
1515
<a href="http://finquant.readthedocs.io/">
1616
<img src="https://img.shields.io/readthedocs/finquant.svg?style=popout" alt="docs">
@@ -129,7 +129,7 @@ yields
129129

130130
### Bollinger Band
131131
```
132-
from finquant.moving_average import plot_bollinger_band
132+
from finquant.moving_average import plot_bollinger_band, sma
133133
# get stock data for disney
134134
dis = pf.get_stock("DIS").data.copy(deep=True)
135135
span=20
@@ -162,14 +162,13 @@ As it is common for open-source projects, there are several ways to get hold of
162162

163163
### Dependencies
164164
*FinQuant* depends on the following Python packages:
165-
- python>=3.5.0
165+
- python>=3.10
166166
- numpy>=1.15
167-
- pandas>=0.24
168-
- matplotlib>=1.5.1
167+
- pandas>=2.0
168+
- matplotlib>=3.0
169169
- quandl>=3.4.5
170170
- yfinance>=0.1.43
171171
- scipy>=1.2.0
172-
- pytest>=2.8.7
173172

174173
### From PyPI
175174
*FinQuant* can be obtained from PyPI

docs/index.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
:width: 30
99
:align: middle
1010

11-
.. _Travis Ci: https://travis-ci.org/fmilthaler/FinQuant
11+
.. _GitHub Actions: https://github.com/fmilthaler/finquant/actions/workflows/pytest.yml/badge.svg?branch=master
1212

1313
.. _GitHub: https://github.com/fmilthaler/FinQuant/
1414

@@ -22,7 +22,7 @@ Welcome to FinQuant's documentation
2222

2323
*FinQuant* is made to be easily extended. I hope it proves itself useful for hobby investors, students, geeks, and the intellectual curious.
2424

25-
.. caution:: While *FinQuant* has tests in place that are run automatically by `Travis CI`_, it cannot guarantee to be bug free, nor that the analysis or optimised portfolio yield to wealth. Please use at your own discretion and refer to the :ref:`license`.
25+
.. caution:: While *FinQuant* has tests in place that are run automatically by `GitHub Actions`_, it cannot guarantee to be bug free, nor that the analysis or optimised portfolio yield to wealth. Please use at your own discretion and refer to the :ref:`license`.
2626

2727

2828
Installation
@@ -34,14 +34,13 @@ Dependencies
3434

3535
*FinQuant* depends on the following Python packages:
3636

37-
- ``python>=3.5.0``
37+
- ``python>=3.10.0``
3838
- ``numpy>=1.15``
39-
- ``pandas>=0.24``
40-
- ``matplotlib>=1.5.1``
39+
- ``scipy>=1.2.0``
40+
- ``pandas>=2.0``
41+
- ``matplotlib>=3.0``
4142
- ``quandl>=3.4.5``
4243
- ``yfinance>=0.1.43``
43-
- ``scipy>=1.2.0``
44-
- ``pytest>=2.8.7``
4544

4645
From PyPI
4746
---------

requirements.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
numpy>=1.15
2-
pandas>=0.24
3-
matplotlib>=1.5.1
4-
quandl>=3.4.5
5-
yfinance>=0.1.43
62
scipy>=1.2.0
7-
pytest>=2.8.7
3+
pandas>=2.0
4+
matplotlib>=3.0
5+
quandl>=3.4.5
6+
yfinance>=0.1.43

requirements_dev.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
black==23.1.0
2+
jupyter
3+
notebook

requirements_docs.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sphinx
2+
sphinx_rtd_theme

requirements_test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pytest>=7.3.2

0 commit comments

Comments
 (0)