Skip to content

Commit 2c6bbca

Browse files
Merge pull request #9 from VisActor/refactor/pyvchart-2.0.0
Refactor to new py-vchart
2 parents eae7a44 + 061dada commit 2c6bbca

File tree

123 files changed

+24100
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+24100
-222
lines changed

.coveragerc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[run]
2+
omit =
3+
pyvchart/render/templates/*
4+
setup.py
5+
install.py
6+
test.py
7+
test/*
8+
9+
[report]
10+
show_missing = True
11+
omit =
12+
pyvchart/render/templates/*
13+
setup.py
14+
install.py

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=crlf

.github/ISSUE_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
### 提 issue 注意事项
3+
0. 先仔细阅读文档中是否有关于您需要解决的问题的解决方法
4+
1. 提 issue 前请先搜搜看以往的 issue 有没有解决了您的问题
5+
2. 如若是不能正常使用的问题,请贴上详细的 pyvchart 版本,使用系统以及 Python 版本
6+
3. 最好详细描述问题,必要时加上**代码+贴图**
7+
-->
8+
9+
**问题**
10+
11+
12+
13+
**运行环境(系统环境及 pyvchart 版本)**
14+
15+
16+
17+
**代码及截图**
18+
19+

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!--
2+
3+
### 提 PR 注意事项
4+
0. 同步到 dev 分支的最新版本
5+
1. 代码尽量保持与项目统一风格,尽量按照 PEP8 规范写代码,必要时附上注释
6+
2. 如需要时请添加单元测试,也请确保所有测试能够通过
7+
3. 将 PR 推送至远程的 dev 分支,main 分支只负责发布新版本。请在提交信息中描述关于该 PR 的详细信息,需要时加上截图。
8+
4. 若是对文档进行修改,请确保数字,字母与中文之间两边均有一空格,如你所看到的所有文档一样
9+
10+
-->
11+
12+
本次 PR 内容,
13+
14+

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
updates:
3+
# GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
commit-message:
9+
prefix:
10+
# Python
11+
- package-ecosystem: "pip"
12+
directory: "/"
13+
schedule:
14+
interval: "monthly"
15+
commit-message:
16+
prefix:

.github/workflows/python-app.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: pyvchart CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
# Allows for matrix sub-jobs to fail without canceling the rest
9+
fail-fast: false
10+
matrix:
11+
os: [ ubuntu-latest, macos-latest, windows-latest ]
12+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
13+
14+
runs-on: ${{ matrix.os }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip setuptools
24+
pip install -r requirements.txt
25+
pip install -r test/requirements.txt
26+
- name: Run unit test
27+
run: |
28+
python setup.py install
29+
python test.py
30+
- name: Upload coverage reports to Codecov
31+
uses: codecov/codecov-action@v5
32+
with:
33+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ ipython_config.py
9494
# install all needed dependencies.
9595
#Pipfile.lock
9696

97+
# UV
98+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
#uv.lock
102+
97103
# poetry
98104
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99105
# This is especially recommended for binary packages to ensure reproducibility, and is more
@@ -106,8 +112,10 @@ ipython_config.py
106112
#pdm.lock
107113
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108114
# in version control.
109-
# https://pdm.fming.dev/#use-with-ide
115+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110116
.pdm.toml
117+
.pdm-python
118+
.pdm-build/
111119

112120
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113121
__pypackages__/
@@ -158,3 +166,6 @@ cython_debug/
158166
# and can be added to the global gitignore or merged into this file. For a more nuclear
159167
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160168
#.idea/
169+
170+
# PyPI configuration file
171+
.pypirc

MANIFEST.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include pyvchart/datasets/*.json
2+
include pyvchart/render/templates/*
3+
include README.md
4+
include README.en.md

README.en.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<p align="center">
2+
<img src="https://github.com/VisActor/.github/raw/main/profile/logo_500_200_dark.svg" alt="pyvchart logo" width=200 height=200 />
3+
</p>
4+
<h1 align="center">pyvchart</h1>
5+
<p align="center">
6+
<em>Python ❤️ VChart = pyvchart</em>
7+
</p>
8+
<p align="center">
9+
<a href="https://github.com/pyvchart/pyvchart/actions">
10+
<img src="https://github.com/pyvchart/pyvchart/actions/workflows/python-app.yml/badge.svg" alt="Github Actions Status">
11+
</a>
12+
<a href="https://codecov.io/gh/pyvchart/pyvchart" >
13+
<img src="https://codecov.io/gh/pyvchart/pyvchart/branch/main/graph/badge.svg?token=q4Op7n64fK" alt="Codecov"/>
14+
</a>
15+
</p>
16+
<p align="center">
17+
<a href="https://github.com/pyvchart/pyvchart/pulls">
18+
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="Contributions welcome">
19+
</a>
20+
<a href="https://opensource.org/licenses/MIT">
21+
<img src="https://img.shields.io/badge/License-MIT-brightgreen.svg" alt="License">
22+
</a>
23+
</p>
24+
25+
[中文 README](README.md) | [English README](README.en.md) | [日本語(にほんご)README](README.jp.md)
26+
27+
## 📣 Introduction
28+
29+
[VisActor/VChart](https://github.com/VisActor/VChart) is a core chart component library of the open-source visualization solution VisActor by ByteDance. It is based on the visualization grammar library VGrammar and the rendering engine VRender, providing not only data presentation but also support for animation orchestration for narrative scenarios, rich interaction capabilities, and customizable chart styles. The simple and easy-to-use configuration greatly reduces the learning cost for users. Python, with its expressive syntax, is well-suited for data processing and AI scenarios. When data analysis and modeling meet data visualization, [pyecharts](https://github.com/pyecharts/pyecharts) and [pyvchart](https://github.com/pyvchart/pyvchart) were born.
30+
31+
## ✨ Features
32+
33+
* API design similar to [pyecharts](https://github.com/pyecharts/pyecharts), smooth and fluent usage, supports method chaining
34+
* Includes all charts from VChart, everything you need
35+
* Supports mainstream Notebook environments, Jupyter Notebook, JupyterLab (**Coming soon...**)
36+
* Can be easily integrated into mainstream Web frameworks such as Flask, Sanic, Django (**Coming soon...**)
37+
* Highly flexible configuration options, allowing for the creation of beautiful charts with ease
38+
* Detailed documentation and examples to help developers get started quickly
39+
40+
## 🔰 Installation
41+
42+
**pip installation**
43+
```shell
44+
# Install
45+
# 【❕Note❕】Currently, it cannot be used because there is an old, unmaintained project with a similar name on PyPI, and it is temporarily unable to upload the wheel to PyPI.
46+
$ pip install pyvchart -U
47+
48+
# Temporary Solution
49+
$ pip install git+https://github.com/pyvchart/pyvchart@v0.1.0
50+
```
51+
52+
53+
**Source code installation**
54+
```shell
55+
# Install version v1 and above
56+
$ git clone https://github.com/pyvchart/pyvchart.git
57+
$ cd pyvchart
58+
$ pip install -r requirements.txt
59+
$ python setup.py install
60+
```
61+
62+
63+
## 📝 Usage
64+
65+
Usage examples are here:[Examples](https://github.com/pyvchart/chart-examples)
66+
67+
## ⛏ Code Quality
68+
69+
### Unit Testing
70+
71+
```shell
72+
$ pip install -r test/requirements.txt
73+
$ make
74+
```
75+
76+
77+
### Integration Testing
78+
79+
Using GitHub Actions for continuous integration.
80+
81+
### Code Style
82+
83+
Using [flake8](http://flake8.pycqa.org/en/latest/index.html), [Codecov](https://codecov.io/), and [pylint](https://www.pylint.org/) to improve code quality.
84+
85+
## 😉 Author
86+
87+
pyvchart is mainly developed and maintained by the following developers
88+
89+
* [@sunhailin-Leo](https://github.com/sunhailin-Leo)
90+
91+
More contributor information can be found at [pyvchart/graphs/contributors](https://github.com/pyvchart/pyvchart/graphs/contributors)
92+
93+
## 💡 Contribution
94+
95+
We look forward to more developers participating in the development of pyvchart. We will ensure timely review of PRs and prompt responses. However, when submitting a PR, please ensure:
96+
97+
1. All unit tests pass, and add unit tests for new features if necessary
98+
2. Adhere to the development guidelines, format the code using black and isort (run `$ pip install -r requirements-dev.txt`)
99+
3. Update relevant documentation if necessary
100+
101+
We also welcome developers to provide more examples for pyvchart to help improve the documentation. The documentation project is located at [pyvchart/website](https://github.com/pyvchart/website)
102+
103+
## 📃 License
104+
105+
MIT [©sunhailin-Leo](https://github.com/sunhailin-Leo)

README.jp.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<p align="center">
2+
<img src="https://github.com/VisActor/.github/raw/main/profile/logo_500_200_dark.svg" alt="pyvchart logo" width=200 height=200 />
3+
</p>
4+
<h1 align="center">pyvchart</h1>
5+
<p align="center">
6+
<em>Python ❤️ VChart = pyvchart</em>
7+
</p>
8+
<p align="center">
9+
<a href="https://github.com/pyvchart/pyvchart/actions">
10+
<img src="https://github.com/pyvchart/pyvchart/actions/workflows/python-app.yml/badge.svg" alt="Github Actions Status">
11+
</a>
12+
<a href="https://codecov.io/gh/pyvchart/pyvchart" >
13+
<img src="https://codecov.io/gh/pyvchart/pyvchart/branch/main/graph/badge.svg?token=q4Op7n64fK" alt="Codecov"/>
14+
</a>
15+
</p>
16+
<p align="center">
17+
<a href="https://github.com/pyvchart/pyvchart/pulls">
18+
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="Contributions welcome">
19+
</a>
20+
<a href="https://opensource.org/licenses/MIT">
21+
<img src="https://img.shields.io/badge/License-MIT-brightgreen.svg" alt="License">
22+
</a>
23+
</p>
24+
25+
[日本語 README](README.md) | [英語 README](README.en.md) | [日本語(にほんご)README](README.jp.md)
26+
27+
## 📣 はじめに
28+
29+
[VisActor/VChart](https://github.com/VisActor/VChart) は、字節ジャンプトがオープンソース化したビジュアル化ソリューション VisActor のコアチャートコンポーネントライブラリです。これはビジュアル化文法ライブラリ VGrammar とレンダリングエンジン VRender を基に構築されており、データの表示だけでなく、ナレーシナリオ向けのアニメーション編成、豊富なインタラクティブ機能、カスタマイズ可能なチャートスタイルもサポートしています。シンプルで使いやすい設定により、ユーザーの学習コストが大幅に削減されます。一方、Python は表現力豊かな言語であり、データ処理やAIなどの分野で非常に適しています。データ分析やモデリングがデータビジュアライゼーションと組み合わさったときに、[pyecharts](https://github.com/pyecharts/pyecharts) と [pyvchart](https://github.com/pyvchart/pyvchart) が生まれました。
30+
31+
## ✨ 特徴
32+
33+
* [pyecharts](https://github.com/pyecharts/pyecharts) に似た API 設計、スムーズでフローリングした使用感、メソッドチェーンのサポート
34+
* VChart のすべてのチャートを含む、必要なものが揃っている
35+
* Jupyter Notebook、JupyterLab (**近日公開予定**) などの主流の Notebook 環境をサポート
36+
* Flask、Sanic、Django (**近日公開予定**) などの主流の Web フレームワークへの容易な統合
37+
* 高度に柔軟な設定オプション、美しいチャートを簡単に作成できる
38+
* 開発者を手助けするための詳細なドキュメントと例
39+
40+
## 🔰 インストール
41+
42+
**pip インストール**
43+
```shell
44+
# インストール
45+
# 【❕注意❕】現在、PyPI に長期間メンテナンスされていない同名のプロジェクトが存在するため、wheel を PyPI にアップロードすることができません。
46+
$ pip install pyvchart -U
47+
48+
# 一時的な解決策
49+
$ pip install git+https://github.com/pyvchart/pyvchart@v0.1.0
50+
```
51+
52+
53+
**ソースコードインストール**
54+
```shell
55+
# バージョン v1 以上をインストール
56+
$ git clone https://github.com/pyvchart/pyvchart.git
57+
$ cd pyvchart
58+
$ pip install -r requirements.txt
59+
$ python setup.py install
60+
```
61+
62+
63+
## 📝 使用方法
64+
65+
使用例はここにあります:[Examples](https://github.com/pyvchart/chart-examples)
66+
67+
## ⛏ コード品質
68+
69+
### ユニットテスト
70+
71+
```shell
72+
$ pip install -r test/requirements.txt
73+
$ make
74+
```
75+
76+
77+
### 統合テスト
78+
79+
GitHub Actions を使用して継続的インテグレーション環境を構築しています。
80+
81+
### コードスタイル
82+
83+
[flake8](http://flake8.pycqa.org/en/latest/index.html), [Codecov](https://codecov.io/), [pylint](https://www.pylint.org/) を使用してコード品質を向上させています。
84+
85+
## 😉 作者
86+
87+
pyvchart は以下の開発者が開発およびメンテナンスを行っています
88+
89+
* [@sunhailin-Leo](https://github.com/sunhailin-Leo)
90+
91+
他の貢献者の情報は [pyvchart/graphs/contributors](https://github.com/pyvchart/pyvchart/graphs/contributors) で確認できます
92+
93+
## 💡 貢献
94+
95+
より多くの開発者が pyvchart の開発に参加することを期待しています。PR のレビューを迅速に行い、タイムリーな返信を提供しますが、PR を送信する際には以下の点に注意してください
96+
97+
1. すべてのユニットテストがパスし、新しい機能の場合はユニットテストを追加してください
98+
2. 開発ガイドラインに従い、コードを black および isort でフォーマットしてください(`$ pip install -r requirements-dev.txt` を実行してください)
99+
3. 必要に応じて関連ドキュメントを更新してください
100+
101+
また、pyvchart に多くの例を提供してドキュメントを充実させることも歓迎します。ドキュメントプロジェクトは [pyvchart/website](https://github.com/pyvchart/website) にあります
102+
103+
## 📃 ライセンス
104+
105+
MIT [©sunhailin-Leo](https://github.com/sunhailin-Leo)

0 commit comments

Comments
 (0)