py4project 0.3.0__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {py4project-0.3.0 → py4project-0.3.2}/.github/workflows/publish.yml +19 -0
- {py4project-0.3.0 → py4project-0.3.2}/CHANGES.md +45 -0
- {py4project-0.3.0 → py4project-0.3.2}/PKG-INFO +4 -2
- {py4project-0.3.0 → py4project-0.3.2}/README.md +3 -1
- {py4project-0.3.0 → py4project-0.3.2}/examples/example.ipynb +207 -197
- {py4project-0.3.0 → py4project-0.3.2}/pyproject.toml +1 -1
- {py4project-0.3.0 → py4project-0.3.2}/src/py4project/__init__.py +1 -1
- {py4project-0.3.0 → py4project-0.3.2}/src/py4project/core.py +179 -39
- {py4project-0.3.0 → py4project-0.3.2}/tests/test_basic.py +268 -0
- {py4project-0.3.0 → py4project-0.3.2}/.github/workflows/test.yml +0 -0
- {py4project-0.3.0 → py4project-0.3.2}/.gitignore +0 -0
- {py4project-0.3.0 → py4project-0.3.2}/LICENSE +0 -0
- {py4project-0.3.0 → py4project-0.3.2}/examples/data_project.csv +0 -0
|
@@ -31,6 +31,25 @@ jobs:
|
|
|
31
31
|
- name: メタデータを検査
|
|
32
32
|
run: python -m twine check dist/*
|
|
33
33
|
|
|
34
|
+
# タグが古いコミットを指していると、意図しないバージョンが
|
|
35
|
+
# ビルドされたまま PyPI に送られ、原因の分かりにくい
|
|
36
|
+
# 「400 File already exists」で失敗する。ここで先に止める。
|
|
37
|
+
- name: タグとバージョンが一致するか確認
|
|
38
|
+
if: github.event_name == 'release'
|
|
39
|
+
run: |
|
|
40
|
+
TAG="${{ github.event.release.tag_name }}"
|
|
41
|
+
VERSION="${TAG#v}"
|
|
42
|
+
echo "タグ: $TAG / 期待するバージョン: $VERSION"
|
|
43
|
+
echo "ビルドされた配布物:"
|
|
44
|
+
ls -1 dist/
|
|
45
|
+
if [ ! -f "dist/py4project-${VERSION}.tar.gz" ]; then
|
|
46
|
+
echo "::error::タグ $TAG とビルドされたバージョンが一致しません。"
|
|
47
|
+
echo "::error::タグが古いコミットを指している可能性があります。"
|
|
48
|
+
echo "::error::pyproject.toml のバージョンを上げてから、タグを付け直してください。"
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
echo "一致を確認しました。"
|
|
52
|
+
|
|
34
53
|
- name: 配布物を成果物として保存
|
|
35
54
|
uses: actions/upload-artifact@v5
|
|
36
55
|
with:
|
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# 変更履歴
|
|
2
2
|
|
|
3
|
+
## 0.3.2(2026-11-23)
|
|
4
|
+
|
|
5
|
+
### 追加
|
|
6
|
+
|
|
7
|
+
- 作図関数6つ(`regression_plot`、`scatter_plot`、`bar_plot`、`box_plot`、
|
|
8
|
+
`line_plot`、`pie_plot`)に `figsize` を追加した。図の大きさを
|
|
9
|
+
(幅, 高さ) のインチで指定する。例: `figsize=(8, 5)`
|
|
10
|
+
キーワード指定のみなので、これまでの呼び出し方はそのまま使える。
|
|
11
|
+
- `figsize` の間違い(`figsize=8`、`figsize=(0, 5)`、`figsize=('8', '5')` など)を
|
|
12
|
+
日本語のエラーで知らせるようにした。単位付きの指定 `(8, 5, 'cm')` は
|
|
13
|
+
matplotlib のバージョンによって使えたり使えなかったりするため受け付けず、
|
|
14
|
+
インチへの換算方法を案内する。
|
|
15
|
+
|
|
16
|
+
### 変更
|
|
17
|
+
|
|
18
|
+
- `bar_plot` の標準の高さを、棒の数に合わせて自動で決めるようにした
|
|
19
|
+
(1本あたり0.3インチ+余白1インチ、最低3インチ)。17産業では約6.1インチで
|
|
20
|
+
これまでとほぼ同じ。47都道府県では約15インチになり、名前が重ならない。
|
|
21
|
+
以前は (9, 6) に固定で、47都道府県では縦軸の名前が重なっていた。
|
|
22
|
+
- `box_plot` も他の作図関数と同じく余白を詰めて描くようにした(`tight_layout`)。
|
|
23
|
+
描画領域が少し広くなる。
|
|
24
|
+
|
|
25
|
+
## 0.3.1(2026-09-16)
|
|
26
|
+
|
|
27
|
+
### 追加
|
|
28
|
+
|
|
29
|
+
- `bar_plot` に `legend` を追加した。`line_plot` と同じように、
|
|
30
|
+
凡例に表示する名前を `x` と同じ順番・同じ数のリストで指定できる。
|
|
31
|
+
省略すると列名がそのまま使われる。
|
|
32
|
+
例: `bar_plot(['w2016', 'w2021'], df, legend=['2016年', '2021年'])`
|
|
33
|
+
|
|
34
|
+
### 修正
|
|
35
|
+
|
|
36
|
+
- `regression_plot` のタイトルに表示する推定式で、傾きが負のときに
|
|
37
|
+
「+ -1.4984」と符号が重なっていた問題を修正した。
|
|
38
|
+
|
|
39
|
+
### その他
|
|
40
|
+
|
|
41
|
+
- `bar_plot` と `line_plot` の凡例の処理を共通化した。
|
|
42
|
+
数が合わないときや `True` / `False` を渡したときのエラーが
|
|
43
|
+
両方の関数で同じになる。
|
|
44
|
+
|
|
3
45
|
## 0.3.0(2026-09-09)
|
|
4
46
|
|
|
5
47
|
### 破壊的変更
|
|
@@ -59,6 +101,9 @@
|
|
|
59
101
|
PyPI の説明欄では相対リンクが機能しないため。
|
|
60
102
|
- GitHub Actions を最新版に更新した(checkout@v6、setup-python@v6、
|
|
61
103
|
upload-artifact@v5、download-artifact@v6)。Node.js 20 の非推奨警告が出なくなる。
|
|
104
|
+
- 公開ワークフローに、タグとビルドされたバージョンが一致するかを
|
|
105
|
+
確かめる手順を加えた。タグが古いコミットを指していると、
|
|
106
|
+
PyPI で「400 File already exists」という分かりにくいエラーになるため。
|
|
62
107
|
|
|
63
108
|
## 0.2.2(2026-09-08)
|
|
64
109
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: py4project
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: 授業向けの回帰分析・散布図・折れ線グラフ・バープロット・ボックスプロット・円グラフのユーティリティ
|
|
5
5
|
Project-URL: Homepage, https://github.com/Py4Project/py4project
|
|
6
6
|
Project-URL: Repository, https://github.com/Py4Project/py4project
|
|
@@ -37,11 +37,13 @@ pip install py4project
|
|
|
37
37
|
- `regression(x, y, data, ...)` — 回帰分析(`x` にリストを渡すと重回帰)。決定係数・係数・p値・信頼区間を表にして表示し、結果オブジェクトを返します
|
|
38
38
|
- `regression_plot(x, y, data, ...)` — 散布図+回帰直線(`regression` の結果を渡すこともできます)
|
|
39
39
|
- `scatter_plot(x, y, data, ...)` — 散布図+トレンド線(対数軸オプションあり)
|
|
40
|
-
- `bar_plot(x, data, ...)` — 横バープロット(複数系列・シフトシェア分解の配色に対応。`label_col` で縦軸の名前、`sort_by`
|
|
40
|
+
- `bar_plot(x, data, ...)` — 横バープロット(複数系列・シフトシェア分解の配色に対応。`label_col` で縦軸の名前、`sort_by` で並び順、`legend` で凡例の名前を指定)
|
|
41
41
|
- `box_plot(x, data, ...)` — ボックスプロット(対数化オプションあり。`label_col` を指定すると外れ値に名前を表示)
|
|
42
42
|
- `line_plot(x, y, data, ...)` — 折れ線グラフ(`y` にリストを渡すと複数系列を重ねて表示)
|
|
43
43
|
- `pie_plot(x, data, label_col, ...)` — 円グラフ(パーセント表示。`top` や `other` で小さい項目をまとめられます)
|
|
44
44
|
|
|
45
|
+
作図関数はどれも `figsize=(幅, 高さ)` で図の大きさを指定できます(単位はインチ、1インチ=2.54cm)。
|
|
46
|
+
|
|
45
47
|
## 使用例
|
|
46
48
|
|
|
47
49
|
```python
|
|
@@ -13,11 +13,13 @@ pip install py4project
|
|
|
13
13
|
- `regression(x, y, data, ...)` — 回帰分析(`x` にリストを渡すと重回帰)。決定係数・係数・p値・信頼区間を表にして表示し、結果オブジェクトを返します
|
|
14
14
|
- `regression_plot(x, y, data, ...)` — 散布図+回帰直線(`regression` の結果を渡すこともできます)
|
|
15
15
|
- `scatter_plot(x, y, data, ...)` — 散布図+トレンド線(対数軸オプションあり)
|
|
16
|
-
- `bar_plot(x, data, ...)` — 横バープロット(複数系列・シフトシェア分解の配色に対応。`label_col` で縦軸の名前、`sort_by`
|
|
16
|
+
- `bar_plot(x, data, ...)` — 横バープロット(複数系列・シフトシェア分解の配色に対応。`label_col` で縦軸の名前、`sort_by` で並び順、`legend` で凡例の名前を指定)
|
|
17
17
|
- `box_plot(x, data, ...)` — ボックスプロット(対数化オプションあり。`label_col` を指定すると外れ値に名前を表示)
|
|
18
18
|
- `line_plot(x, y, data, ...)` — 折れ線グラフ(`y` にリストを渡すと複数系列を重ねて表示)
|
|
19
19
|
- `pie_plot(x, data, label_col, ...)` — 円グラフ(パーセント表示。`top` や `other` で小さい項目をまとめられます)
|
|
20
20
|
|
|
21
|
+
作図関数はどれも `figsize=(幅, 高さ)` で図の大きさを指定できます(単位はインチ、1インチ=2.54cm)。
|
|
22
|
+
|
|
21
23
|
## 使用例
|
|
22
24
|
|
|
23
25
|
```python
|