Skip to content

Commit fa7f846

Browse files
committed
Cleanup up python requirements installation in CI, remove some dangling azure references, refresh python README, add conda badge
1 parent 91323df commit fa7f846

File tree

8 files changed

+81
-158
lines changed

8 files changed

+81
-158
lines changed

.artifactignore

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

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ jobs:
304304
################
305305
# Python
306306
- name: Install python dependencies
307-
run: python -m pip install --upgrade "jupyterlab==3.4.3" "tornado==6.1"
307+
run: yarn _requires_python
308308

309309
################
310310
# Linux
@@ -490,7 +490,7 @@ jobs:
490490
################
491491
# Python
492492
- name: Install python dependencies
493-
run: python -m pip install --upgrade "black==20.8b1" flake8-black
493+
run: yarn _requires_python
494494

495495
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
496496
#~~~~~~~~~ Build Pipelines ~~~~~~~~~#
@@ -618,7 +618,7 @@ jobs:
618618
################
619619
# Python
620620
- name: Install python dependencies
621-
run: python -m pip install --upgrade "jupyterlab==3.4.3" "tornado==6.1"
621+
run: yarn _requires_python
622622

623623
################
624624
# Wasm
@@ -910,7 +910,7 @@ jobs:
910910
################
911911
# Python
912912
- name: Install python dependencies
913-
run: python -m pip install --upgrade pip wheel setuptools "jupyterlab==3.4.3" numpy "pyarrow>=5" "tornado==6.1"
913+
run: yarn _requires_python
914914
if: ${{ runner.os != 'Linux' }} # skip on manylinux2014
915915

916916
################
@@ -1161,7 +1161,7 @@ jobs:
11611161
################
11621162
# Python
11631163
- name: Install python dependencies
1164-
run: python -m pip install --upgrade "jupyterlab==3.4.3" ipywidgets ipykernel "tornado==6.1"
1164+
run: yarn _requires_python
11651165

11661166
# Download artifact
11671167
- uses: actions/download-artifact@v3
@@ -1330,7 +1330,7 @@ jobs:
13301330
################
13311331
# Python
13321332
- name: Install python dependencies
1333-
run: python -m pip install --upgrade aiohttp Faker fastapi "jupyterlab==3.4.3" mock numpy pip psutil "pyarrow>=5" pytest pytest-cov pytest-aiohttp pytest-asyncio pytest-tornado pytz setuptools wheel "tornado==6.1"
1333+
run: yarn _requires_python
13341334

13351335
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
13361336
#~~~~~~~~~ Build Pipelines ~~~~~~~~~#
@@ -1466,7 +1466,7 @@ jobs:
14661466
################
14671467
# Python
14681468
- name: Install python dependencies
1469-
run: python -m pip install --upgrade pip wheel setuptools "jupyterlab==3.4.3" numpy "pyarrow>=5" pytest pytest-cov mock aiohttp fastapi Faker psutil pytest-aiohttp pytest-asyncio pytest-tornado pytz "tornado==6.1"
1469+
run: yarn _requires_python
14701470

14711471
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
14721472
#~~~~~~~~~ Build Pipelines ~~~~~~~~~#
@@ -1482,7 +1482,7 @@ jobs:
14821482

14831483
# Test sdist
14841484
- name: Run tests against from-scratch sdist build
1485-
run: python -m pytest -vvv --asyncio-mode=strict `python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))"`/perspective/tests --ignore=`python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))"`/perspective/tests/client_mode
1485+
run: python -m pytest -vvv --rootdir=python/perspective `python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))"`/perspective/tests --ignore=`python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))"`/perspective/tests/client_mode
14861486

14871487
##########################################################################################################################
14881488
##########################################################################################################################

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
[![npm](https://img.shields.io/npm/v/@finos/perspective.svg?style=flat)](https://www.npmjs.com/package/@finos/perspective)
55
[![PyPI](https://img.shields.io/pypi/v/perspective-python.svg?style=flat)](https://pypi.python.org/pypi/perspective-python)
6+
![Conda](https://img.shields.io/conda/v/conda-forge/perspective)
67
[![Build Status](https://github.com/finos/perspective/actions/workflows/build.yml/badge.svg?branch=master&event=push)](https://github.com/finos/perspective/actions/workflows/build.yml)
78

89
Perspective is an <i>interactive</i> analytics and data visualization component,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
"build_js": "node scripts/build_js.js",
118118
"build": "node scripts/build.js",
119119
"build_python": "node scripts/build_python.js",
120-
"build_python_azure": "node scripts/build_python_azure.js",
121120
"bench": "node scripts/bench.js",
122121
"bench_python": "python3 python/perspective/bench/perspective_benchmark.py",
123122
"ci:full": "git commit --allow-empty -m \"[ci-full]\"",
@@ -126,6 +125,7 @@
126125
"ci:skip-cache": "git commit --allow-empty -m \"[ci-skip-cache]\"",
127126
"stresstest_python": "python3 python/perspective/bench/stresstest/main.py",
128127
"_wheel_python": "node scripts/_wheel_python.js",
128+
"_requires_python": "node scripts/_requires_python.js",
129129
"setup": "node scripts/setup.js",
130130
"docs": "node scripts/docs.js",
131131
"test": "node scripts/test.js",

python/perspective/README.md

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,50 @@
22

33
Python APIs for [perspective](https://github.com/finos/perspective) front end
44

5-
[![npm](https://img.shields.io/npm/v/@finos/perspective.svg?style=flat-square)](https://www.npmjs.com/package/@finos/perspective)
6-
[![PyPI](https://img.shields.io/pypi/v/perspective-python.svg?style=flat-square)](https://pypi.python.org/pypi/perspective-python)
7-
[![Build Status](https://dev.azure.com/finosfoundation/perspective/_apis/build/status/finos.perspective?branchName=master)](https://dev.azure.com/finosfoundation/perspective/_build/latest?definitionId=1&branchName=master)
8-
[![FINOS - Active](https://cdn.jsdelivr.net/gh/finos/contrib-toolbox@master/images/badge-active.svg)](https://finosfoundation.atlassian.net/wiki/display/FINOS/Active)
5+
[![npm](https://img.shields.io/npm/v/@finos/perspective.svg?style=flat)](https://www.npmjs.com/package/@finos/perspective)
6+
[![PyPI](https://img.shields.io/pypi/v/perspective-python.svg?style=flat)](https://pypi.python.org/pypi/perspective-python)
7+
![Conda](https://img.shields.io/conda/v/conda-forge/perspective)
8+
[![Build Status](https://github.com/finos/perspective/actions/workflows/build.yml/badge.svg?branch=master&event=push)](https://github.com/finos/perspective/actions/workflows/build.yml)
99
[![Binder](http://mybinder.org/badge_logo.svg)](http://beta.mybinder.org/v2/gh/finos/perspective/master?urlpath=lab/tree/examples/jupyter-notebooks)
1010

11-
Perspective is an <i>interactive</i> visualization component for <i>large</i>, <i>real-time</i>
12-
datasets. Originally developed for J.P. Morgan's trading business, Perspective
13-
makes it simple to build real-time & user configurable analytics entirely in the
14-
browser, or in concert with Python and/or
15-
[Jupyterlab](https://jupyterlab.readthedocs.io/en/stable/).
16-
Use it to create reports, dashboards, notebooks and applications, with static
17-
data or streaming updates via [Apache Arrow](https://arrow.apache.org/).
18-
19-
<img src="https://perspective.finos.org/img/demo_small.gif">
11+
Perspective is an <i>interactive</i> analytics and data visualization component,
12+
which is especially well-suited for <i>large</i> and/or <i>streaming</i>
13+
datasets. Use it to create user-configurable reports, dashboards, notebooks and
14+
applications, then deploy stand-alone in the browser, or in concert with Python
15+
and/or [Jupyterlab](https://jupyterlab.readthedocs.io/en/stable/).
2016

2117
## Features
2218

23-
- A fast, memory efficient streaming query engine, written in C++ and compiled to [WebAssembly](https://webassembly.org/), with read/write/stream support for [Apache Arrow](https://arrow.apache.org/).
24-
25-
- A framework-agnostic query configuration UI component, based on [Web Components](https://www.webcomponents.org/), and a WebWorker and/or WebSocket data engine host for stable interactivity at high frequency.
26-
27-
- A customizable HTML Data Grid plugin, and a Chart plugin built on [D3FC](https://d3fc.io/).
19+
- A fast, memory efficient streaming query engine, written in
20+
C++ and compiled for both [WebAssembly](https://webassembly.org/) and
21+
[Python](https://www.python.org/), with read/write/streaming for
22+
[Apache Arrow](https://arrow.apache.org/), and a high-performance columnar
23+
expression language based on [ExprTK](https://github.com/ArashPartow/exprtk).
2824

29-
- Integration with [Jupyterlab](https://jupyterlab.readthedocs.io/en/stable/), both natively in a Python kernel, and as a notebook Widget.
25+
- A framework-agnostic User Interface packaged as a
26+
[Custom Element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements),
27+
powered either in-browser via WebAssembly or virtually via
28+
WebSocket server (Python/Node).
3029

31-
- Cross-language streaming and/or virtualization to the browser via [Apache Arrow](https://arrow.apache.org/).
32-
33-
- Runtimes for the browser, Python, and Node.js.
30+
- A [JupyterLab](https://jupyter.org/) widget and Python client library, for
31+
interactive data analysis in a notebook, as well as _scalable_ production
32+
[Voila](https://github.com/voila-dashboards/voila) applications.
3433

3534
## Documentation
3635

3736
* [Project Site](https://perspective.finos.org/)
38-
* [Python Installation and User Guide](https://perspective.finos.org/docs/md/python.html)
39-
* [Table (Conceptual Overview)](https://perspective.finos.org/docs/md/table.html)
40-
* [View (Conceptual Overview)](https://perspective.finos.org/docs/md/view.html)
37+
* [Table](https://perspective.finos.org/docs/md/table.html)
38+
* [View](https://perspective.finos.org/docs/md/view.html)
39+
* [Javascript User Guide](https://perspective.finos.org/docs/md/js.html)
40+
* [Python User Guide](https://perspective.finos.org/docs/md/python.html)
4141
* [Data Binding](https://perspective.finos.org/docs/md/table.html)
42-
* [Developer's Guide](https://perspective.finos.org/docs/md/development.html)
43-
* [Perspective Python API](https://perspective.finos.org/docs/obj/perspective-python.html)
42+
* [Developer Guide](https://perspective.finos.org/docs/md/development.html)
43+
* [Perspective API](https://github.com/finos/perspective/blob/master/packages/perspective/README.md)
44+
* [Perspective Viewer API](https://github.com/finos/perspective/blob/master/packages/perspective-viewer/README.md)
45+
* [Perspective Python API](https://perspective.finos.org/docs/obj/perspective-python.html)
46+
47+
## Community
48+
49+
* [`perspective-viewer-maps` OpenLayers/OpenStreetMap plugin](https://github.com/DevAndyLee/perspective-viewer-maps)
50+
* [Scott Logic / Perspective Plugin API - How to build a new plugin](https://blog.scottlogic.com/2019/04/23/perspective-plugin-api-how-to-build-a-new-plugin.html)
51+
* [Streaming, cross-sectional data visualization in Jupyterlab | Junyuan Tan, JupyterCon 2020](http://www.youtube.com/watch?v=IO-HJsGdleE)

python/perspective/setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ def get_version(file, name="__version__"):
6262

6363
requires_aiohttp = ["aiohttp"]
6464

65+
requires_jupyter = ["jupyterlab>=3.2,<4"]
66+
6567
requires_starlette = ["fastapi", "starlette"]
6668

67-
requires_tornado = ["tornado>=4.5.3"]
69+
requires_tornado = ["tornado>=4.5.3,<6.2"]
6870

6971
requires_dev = (
7072
[
@@ -89,6 +91,7 @@ def get_version(file, name="__version__"):
8991
]
9092
+ requires
9193
+ requires_aiohttp
94+
+ requires_jupyter
9295
+ requires_starlette
9396
+ requires_tornado
9497
)
@@ -278,6 +281,7 @@ def run_check(self):
278281
"Programming Language :: Python :: 3.7",
279282
"Programming Language :: Python :: 3.8",
280283
"Programming Language :: Python :: 3.9",
284+
"Programming Language :: Python :: 3.10",
281285
],
282286
keywords="analytics tools plotting",
283287
packages=find_packages(exclude=["bench", "bench.*"]),
@@ -288,7 +292,9 @@ def run_check(self):
288292
extras_require={
289293
"aiohttp": requires_aiohttp,
290294
"dev": requires_dev,
295+
"develop": requires_dev,
291296
"fastapi": requires_starlette,
297+
"jupyter": requires_jupyter,
292298
"starlette": requires_starlette,
293299
"tornado": requires_tornado,
294300
},

scripts/_requires_python.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/******************************************************************************
2+
*
3+
* Copyright (c) 2017, the Perspective Authors.
4+
*
5+
* This file is part of the Perspective library, distributed under the terms of
6+
* the Apache License 2.0. The full license can be found in the LICENSE file.
7+
*
8+
*/
9+
const {execute, execute_return, python_version} = require("./script_utils.js");
10+
11+
let PYTHON = python_version();
12+
const requires_script = `'import distutils.core; setup = distutils.core.run_setup("python/perspective/setup.py"); print(" ".join(["\\"" + requirement + "\\"" for requirement in setup.extras_require["dev"]]))'`;
13+
14+
(async () => {
15+
try {
16+
const {stdout: requirements} =
17+
await execute_return`${PYTHON} -c ${requires_script}`;
18+
19+
console.log(`Installing: ${requirements}`);
20+
21+
const cmd = `${PYTHON} -m pip install ${requirements}`;
22+
console.log(cmd);
23+
24+
execute`${cmd}`;
25+
} catch (e) {
26+
console.log(e.message);
27+
process.exit(1);
28+
}
29+
})();

scripts/build_python_azure.js

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

0 commit comments

Comments
 (0)