Skip to content

Commit 1d978d4

Browse files
Merge branch 'master' of github.com:matplotlib/mplfinance
2 parents 220b693 + 18fbd17 commit 1d978d4

27 files changed

+1766
-78
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: mplfinance Checks
2+
on: [ workflow_dispatch, pull_request ]
3+
jobs:
4+
Regression_Tests:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
python-version: [3.6, 3.7, 3.8, 3.9]
9+
steps:
10+
- name: Preliminary Information
11+
run: |
12+
echo "The job was automatically triggered by a ${{ github.event_name }} event."
13+
echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!"
14+
echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
15+
echo " "
16+
echo "github.ref = ${{ github.ref }}"
17+
echo "github.sha = ${{ github.sha }}"
18+
echo "github.event.pull_request.head.ref = ${{ github.event.pull_request.head.ref }}"
19+
echo "github.event.pull_request.head.sha = ${{ github.event.pull_request.head.sha }}"
20+
echo "github.event.pull_request.base.ref = ${{ github.event.pull_request.base.ref }}"
21+
echo "github.event.pull_request.base.sha = ${{ github.event.pull_request.base.sha }}"
22+
echo " "
23+
24+
- name: Check out repository code
25+
uses: actions/checkout@v2
26+
27+
- run: echo "The ${{ github.repository }} repository has been cloned to the runner."
28+
29+
- name: Set up Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v2
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install pytest
38+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
39+
40+
- name: Install My Package
41+
run: pip install .
42+
43+
- name: Run Pytest
44+
run: python -m pytest
45+
46+
- run: echo "This job's status is ${{ job.status }}."
47+
48+
Pull_Request_Updates_Version:
49+
runs-on: ubuntu-latest
50+
if: github.event_name == 'pull_request'
51+
steps:
52+
- name: Check out repository code
53+
uses: actions/checkout@v2
54+
55+
- name: Set up Python ${{ matrix.python-version }}
56+
uses: actions/setup-python@v2
57+
with:
58+
python-version: '3.10'
59+
60+
- name: Install dependencies
61+
run: |
62+
python -m pip install --upgrade pip
63+
pip install packaging
64+
65+
- name: Fetch base and head on PR
66+
if: ${{ github.event.pull_request.base.sha }}
67+
run: |
68+
git fetch origin master ${{ github.event.pull_request.base.sha }}
69+
git fetch origin master ${{ github.event.pull_request.head.sha }}
70+
71+
- name: Check that Pull Request includes updating the Version
72+
run: |
73+
git show ${{ github.event.pull_request.base.sha }}:src/mplfinance/_version.py > scripts/tv0.py
74+
git show ${{ github.sha }}:src/mplfinance/_version.py > scripts/tv1.py
75+
python scripts/version_update_check.py tv0 tv1
76+

.github/workflows/pubPyPI.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Upload Mplfinance to PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'version tag to deploy'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
build_and_deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v2
17+
with:
18+
ref: ${{ github.event.inputs.tag }}
19+
20+
- name: Display Coded Version
21+
#run: git show ${{ github.sha }}:src/mplfinance/_version.py
22+
run: egrep 'version_info .*=' src/mplfinance/_version.py
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: '3.x'
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install setuptools wheel twine
33+
34+
- name: Build
35+
run: |
36+
python setup.py sdist bdist_wheel
37+
ls -l dist/*
38+
39+
- name: Publish distribution to PyPI
40+
env:
41+
TWINE_USERNAME: __token__
42+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
43+
run: twine upload dist/*

.github/workflows/pubTestPyPI.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Upload Mplfinance to TestPyPI
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'version tag to deploy'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
build_and_deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v2
17+
with:
18+
ref: ${{ github.event.inputs.tag }}
19+
20+
- name: Display Coded Version
21+
#run: git show ${{ github.sha }}:src/mplfinance/_version.py
22+
run: egrep 'version_info .*=' src/mplfinance/_version.py
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: '3.x'
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install setuptools wheel twine
33+
34+
- name: Build
35+
run: |
36+
python setup.py sdist bdist_wheel
37+
ls -l dist/*
38+
39+
- name: Publish distribution to Test PyPI
40+
env:
41+
TWINE_USERNAME: __token__
42+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
43+
run: twine upload --repository-url https://test.pypi.org/legacy/ dist/*

.github/workflows/pythonpublish.yml

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

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/matplotlib/mplfinance.svg?branch=master)](https://travis-ci.org/matplotlib/mplfinance)
1+
[![mplfinance Checks](https://github.com/matplotlib/mplfinance/actions/workflows/mplfinance_checks.yml/badge.svg?branch=master)](https://github.com/matplotlib/mplfinance/actions/workflows/mplfinance_checks.yml)
22

33
# mplfinance
44
matplotlib utilities for the visualization, and visual analysis, of financial data
@@ -11,22 +11,25 @@ pip install --upgrade mplfinance
1111

1212
---
1313

14-
## <a name="announcements"></a>**&roarr; [Latest Release Information](https://github.com/matplotlib/mplfinance/blob/master/RELEASE_NOTES.md) &loarr;**
14+
## <a name="announcements"></a>**&roarr; [Latest Release Information](https://github.com/matplotlib/mplfinance/releases) &loarr;**
15+
#### <a name="announcements"></a> &roarr; **[Older Release Information](https://github.com/matplotlib/mplfinance/blob/master/RELEASE_NOTES.md)**
1516
---
1617

1718
## <a name="tutorials"></a>Contents and Tutorials
1819

1920
- **[The New API](https://github.com/matplotlib/mplfinance#newapi)**
2021
- **[Tutorials](https://github.com/matplotlib/mplfinance#tutorials)**
2122
- **[Basic Usage](https://github.com/matplotlib/mplfinance#usage)**
22-
- **[Customizing the Appearance of Plots](https://github.com/matplotlib/mplfinance/blob/master/markdown/customization_and_styles.md)** (New features: June 2020)
23+
- **[Customizing the Appearance of Plots](https://github.com/matplotlib/mplfinance/blob/master/markdown/customization_and_styles.md)**
2324
- **[Adding Your Own Technical Studies to Plots](https://github.com/matplotlib/mplfinance/blob/master/examples/addplot.ipynb)**
24-
- **[Subplots: Multiple Plots on a Single Figure](https://github.com/matplotlib/mplfinance/blob/master/markdown/subplots.md)** (**New features: August 2020**)
25+
- **[Subplots: Multiple Plots on a Single Figure](https://github.com/matplotlib/mplfinance/blob/master/markdown/subplots.md)**
2526
- **[Price-Movement Plots (Renko, P&F, etc)](https://github.com/matplotlib/mplfinance/blob/master/examples/price-movement_plots.ipynb)**
2627
- **[Trends, Support, Resistance, and Trading Lines](https://github.com/matplotlib/mplfinance/blob/master/examples/using_lines.ipynb)**
28+
- **[Coloring Individual Candlesticks](https://github.com/matplotlib/mplfinance/blob/master/examples/marketcolor_overrides.ipynb)** (New: December 2021)
2729
- **[Saving the Plot to a File](https://github.com/matplotlib/mplfinance/blob/master/examples/savefig.ipynb)**
28-
- **[Animation/Updating your plots in realtime](https://github.com/matplotlib/mplfinance/blob/master/markdown/animation.md)** (**New: August 2020**)
29-
- **&roarr; [Latest Release Info](https://github.com/matplotlib/mplfinance/blob/master/RELEASE_NOTES.md) &loarr;**
30+
- **[Animation/Updating your plots in realtime](https://github.com/matplotlib/mplfinance/blob/master/markdown/animation.md)**
31+
- **&roarr; [Latest Release Info](https://github.com/matplotlib/mplfinance/releases) &loarr;**
32+
- **[Older Release Info](https://github.com/matplotlib/mplfinance/blob/master/RELEASE_NOTES.md)**
3033
- **[Some Background History About This Package](https://github.com/matplotlib/mplfinance#history)**
3134
- **[Old API Availability](https://github.com/matplotlib/mplfinance#oldapi)**
3235

@@ -264,7 +267,10 @@ Notice, in the above chart, there are no gaps along the x-coordinate, even thoug
264267

265268
- However, sometimes people like to see these gaps, so that they can tell, with a quick glance, where the weekends and holidays fall.
266269

267-
- Non-trading days can be displayed with the `show_nontrading` keyword.
270+
- Non-trading days can be displayed with the **`show_nontrading`** keyword.
271+
- Note that for these purposes **non-trading** intervals are those that ***are not represented in the data at all***. (There are simply no rows for those dates or datetimes). This is because, when data is retrieved from an exchange or other market data source, that data typically will *not* include rows for non-trading days (weekends and holidays for example). Thus ...
272+
- **`show_nontrading=True`** will display all dates (all time intervals) between the first time stamp and the last time stamp in the data (regardless of whether rows exist for those dates or datetimes).
273+
- **`show_nontrading=False`** (the default value) will show ***only*** dates (or datetimes) that have actual rows in the data. (This means that if there are rows in your DataFrame that exist but contain only **`NaN`** values, these rows *will still appear* on the plot even if **`show_nontrading=False`**)
268274
- For example, in the chart below, you can easily see weekends, as well as a gap at Thursday, November 28th for the U.S. Thanksgiving holiday.
269275

270276

@@ -584,7 +590,7 @@ It is my intention to archive the `matplotlib/mpl-finance` repository soon, and
584590

585591
**With this new ` mplfinance ` package installed, in addition to the new API, users can still access the old API**.<br> The old API may be removed someday, but for the foreseeable future we will keep it ... at least until we are very confident that users of the old API can accomplish the same things with the new API.
586592

587-
To access the old API with the new ` mplfinance ` package installed, change the old import statments
593+
To access the old API with the new ` mplfinance ` package installed, change the old import statements
588594

589595
**from:**
590596

tox.ini renamed to archive.tox.ini

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)