Skip to content

Commit e919d2b

Browse files
committed
[EN-1290] Merge conflict resolved
# Conflicts: # README.md # docs/installation.rst # pyproject.toml
2 parents 8e42abb + 1251c49 commit e919d2b

File tree

9 files changed

+108
-39
lines changed

9 files changed

+108
-39
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# This workflow will check package installation and runs tests
2+
# On Ubuntu, Windows and MacOS
3+
# Triggered by push to master
4+
5+
name: Test package
6+
7+
on:
8+
push:
9+
branches:
10+
- master
11+
12+
jobs:
13+
installation:
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, windows-latest, macos-latest]
17+
python-version: [3.6, 3.7, 3.8]
18+
19+
runs-on: ${{ matrix.os }}
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
submodules: true
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v1
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install poetry
30+
run: |
31+
pip install poetry
32+
shell: bash
33+
- name: Set poetry env
34+
run: |
35+
poetry config virtualenvs.create false
36+
poetry install --no-root --no-dev
37+
pip install taskipy cython
38+
task build -f sdist
39+
pip uninstall --yes taskipy cython
40+
shell: bash
41+
- name: Install package artifact
42+
run: |
43+
pip install dist/dxfeed*
44+
pip uninstall dxfeed
45+
shell: bash
46+
build:
47+
needs: installation
48+
strategy:
49+
matrix:
50+
os: [ubuntu-latest, windows-latest, macos-latest]
51+
python-version: [3.6, 3.7, 3.8]
52+
53+
runs-on: ${{ matrix.os }}
54+
55+
steps:
56+
- uses: actions/checkout@v2
57+
with:
58+
submodules: true
59+
- name: Set up Python ${{ matrix.python-version }}
60+
uses: actions/setup-python@v1
61+
with:
62+
python-version: ${{ matrix.python-version }}
63+
- name: Install poetry
64+
run: |
65+
pip install poetry
66+
shell: bash
67+
- name: Set poetry env
68+
run: |
69+
poetry config virtualenvs.create false
70+
poetry install --no-root
71+
shell: bash
72+
- name: Run tests
73+
run: |
74+
task test
75+
shell: bash
76+
- name: Generate doc
77+
run: |
78+
task html_docs
79+
shell: bash
80+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.7

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "dxfeed/dxfeed-c-api"]
2-
path = dxfeed/dxfeed-c-api
3-
url = https://github.com/dxFeed/dxfeed-c-api.git
2+
path = dxfeed/dxfeed-c-api
3+
url = https://github.com/dxFeed/dxfeed-c-api.git

README.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,16 @@ write his own custom listener in Cython
1111

1212
## Installation
1313

14-
**Requirements:** python >3.6, cython, pandas
14+
**Requirements:** python >3.6, pandas
1515

1616
```python
17-
pip3 install cython pandas
17+
pip3 install pandas
1818
```
1919

20-
Install package itself with PyPI
20+
Install package via PyPI
2121

2222
```python
2323
pip3 install dxfeed
24-
```
25-
26-
or with tar.gz artifact
27-
28-
```python
29-
pip3 install dxfeed-x.x.x.tar.gz
3024
```
3125

3226
## Basic usage
@@ -54,18 +48,18 @@ sub2 = dx.dxf_create_subscription(con, 'Quote')
5448
'Trade', 'Quote', 'Summary', 'Profile', 'Order', 'TimeAndSale', 'Candle', 'TradeETH', 'SpreadOrder',
5549
'Greeks', 'TheoPrice', 'Underlying', 'Series', 'Configuration' event types are supported.
5650

57-
**Add tickers you want to get data for**:
58-
```python
59-
dx.dxf_add_symbols(sub1, ['AAPL', 'MSFT'])
60-
dx.dxf_add_symbols(sub2, ['AAPL', 'C'])
61-
```
62-
6351
**Attach listeners**:
6452
```python
6553
dx.dxf_attach_listener(sub1)
6654
dx.dxf_attach_listener(sub2)
6755
```
6856

57+
**Add tickers you want to get data for**:
58+
```python
59+
dx.dxf_add_symbols(sub1, ['AAPL', 'MSFT'])
60+
dx.dxf_add_symbols(sub2, ['AAPL', 'C'])
61+
```
62+
6963
`dxfeed` has default listeners for each event type, but you are able to write
7064
your custom one. You can find how to do it at `example/Custom listener example.ipynb`.
7165

docs/basic_usage.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ create. One connection may have several subscriptions.
3131
'Trade', 'Quote', 'Summary', 'Profile', 'Order', 'TimeAndSale', 'Candle', 'TradeETH', 'SpreadOrder',
3232
'Greeks', 'TheoPrice', 'Underlying', 'Series', 'Configuration' event types are supported.
3333

34-
Each subscription should be provided with tickers to get events for:
35-
36-
.. code-block:: python
37-
38-
dx.dxf_add_symbols(sub1, ['AAPL', 'MSFT'])
39-
dx.dxf_add_symbols(sub2, ['AAPL', 'C'])
40-
4134
Special function called listener should be attached to the subscription to start receiving
4235
events. There are default listeners already implemented in dxpyfeed, but you
4336
can write your own with cython: :ref:`custom_listener`. To attach
@@ -48,6 +41,13 @@ default listener just call `dxf_attach_listener`
4841
dx.dxf_attach_listener(sub1)
4942
dx.dxf_attach_listener(sub2)
5043
44+
Each subscription should be provided with tickers to get events for:
45+
46+
.. code-block:: python
47+
48+
dx.dxf_add_symbols(sub1, ['AAPL', 'MSFT'])
49+
dx.dxf_add_symbols(sub2, ['AAPL', 'C'])
50+
5151
The data can be extracted with `get_data()` method. It is stored as dict with list of columns and list
5252
of events. Note that `get_data` extracts the data and then clean the field. To look at data call this property:
5353

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
pyproject = toml.load(Path(__file__).parents[1].joinpath('pyproject.toml'))
1010
# -- Path setup --------------------------------------------------------------
1111

12-
sys.path.append(Path(__file__).parents[1])
12+
sys.path.append(str(Path(__file__).parents[1]))
1313
# -- Project information -----------------------------------------------------
1414

1515
project = pyproject['tool']['poetry']['name']

docs/custom_listener.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,19 @@ You can either import extension built on previous step or install your extension
127127
128128
con = dx.dxf_create_connection()
129129
sub = dx.dxf_create_subscription(con, 'Trade')
130-
dx.dxf_add_symbols(sub, ['AAPL', 'MSFT'])
131130
132131
Attach custom listener, specifying the columns
133132

134133
.. code:: ipython3
135134
136135
dx.dxf_attach_custom_listener(sub, cust.tc, ['Symbol', 'Price'])
136+
dx.dxf_add_symbols(sub, ['AAPL', 'MSFT'])
137137
138138
After some time you will get the data.
139139

140140
.. code:: ipython3
141141
142-
sub.gat_data()
142+
sub.get_data()
143143
144144
.. code:: ipython3
145145

docs/installation.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,3 @@ Install package itself with PyPI
1616
1717
pip3 install dxfeed
1818
19-
or with tar.gz artifact
20-
21-
.. code-block:: bash
22-
23-
pip3 install dxfeed-x.x.x.tar.gz
24-

examples/CustomListenerExample.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@
191191
"outputs": [],
192192
"source": [
193193
"con = dx.dxf_create_connection()\n",
194-
"sub = dx.dxf_create_subscription(con, 'Trade')\n",
195-
"dx.dxf_add_symbols(sub, ['AAPL', 'MSFT'])"
194+
"sub = dx.dxf_create_subscription(con, 'Trade')"
196195
]
197196
},
198197
{
@@ -208,7 +207,8 @@
208207
"metadata": {},
209208
"outputs": [],
210209
"source": [
211-
"dx.dxf_attach_custom_listener(sub, cust.tc, ['Symbol', 'Price'])"
210+
"dx.dxf_attach_custom_listener(sub, cust.tc, ['Symbol', 'Price'])\n",
211+
"dx.dxf_add_symbols(sub, ['AAPL', 'MSFT'])"
212212
]
213213
},
214214
{

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[tool.poetry]
22
name = "dxfeed"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
description = "DXFeed Python API via C API"
5-
authors = ["Index Management Team dxFeed <im@devexperts.com>"]
5+
authors = ["Index Management Team <im@dxfeed.com>"]
66
build = "build.py"
77
license = "MPL-2.0"
88
readme = "README.md"
@@ -25,7 +25,8 @@ exclude = ["dxfeed/dxfeed-c-api/wrappers*",
2525
"dxfeed/dxfeed-c-api/.github*"]
2626

2727
[tool.poetry.urls]
28-
repository = "https://github.com/dxFeed/dxfeed-python-api"
28+
"Source code" = "https://github.com/dxFeed/dxfeed-python-api"
29+
"Documentation" = "https://docs.dxfeed.com/python/index.html"
2930

3031
[tool.poetry.dependencies]
3132
python = "^3.6"

0 commit comments

Comments
 (0)