Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
233 commits
Select commit Hold shift + click to select a range
77922a5
Update README.md
eiennohito Oct 26, 2021
ad1f158
Update README.md
eiennohito Oct 26, 2021
1c147d3
Add sudachipy.pyi
Oct 26, 2021
7a3a61a
Update doc_string and signature
Oct 26, 2021
b0abc5c
Update setup.py to include pyi files
Oct 26, 2021
e15c38e
Restore default tokenize mode
Oct 27, 2021
c975793
Merge pull request #151 from mh-northlander/148-restore-splitmode
eiennohito Oct 27, 2021
733216b
Copy comments from rust src to pyi
Oct 27, 2021
0e34628
Merge pull request #149 from mh-northlander/147-add-type-hints
Oct 27, 2021
f64c90d
Build User and System Dictionary (#143)
eiennohito Nov 5, 2021
ca92895
remove bad binaries when building Linux wheels
eiennohito Nov 9, 2021
c9021ff
optimize WordParams access
eiennohito Nov 9, 2021
3c13c42
add Python binding for building user/system dictionaries
eiennohito Nov 8, 2021
dda03b2
Merge pull request #154 from eiennohito/sudachi.rs-150
eiennohito Nov 9, 2021
9b2400e
resolve inline split references without using trie
eiennohito Nov 9, 2021
0287e18
Merge pull request #158 from eiennohito/155-dic-not-in-trie
eiennohito Nov 10, 2021
464dd5c
add an option to remove sentence splitting from analysis (#159)
eiennohito Nov 10, 2021
88e273b
Update README.md for v0.6.0
Nov 11, 2021
6a76930
v0.6 release (#161)
eiennohito Nov 11, 2021
0d6f2b7
bump version to 0.7.0-a1
eiennohito Nov 11, 2021
0225a8d
update dependencies (#165)
eiennohito Nov 11, 2021
7556836
fix readme English
eiennohito Nov 11, 2021
7a598cf
next version will be 0.6.1
eiennohito Nov 12, 2021
9c555cc
precompute POS data for Python
eiennohito Nov 22, 2021
3fdfa91
Merge pull request #174 from eiennohito/173-precompute-pos
eiennohito Nov 22, 2021
1975d06
partially read WordInfo (#171)
eiennohito Nov 22, 2021
8014242
expose WordInfo subsetting to Python
eiennohito Nov 23, 2021
680f06d
make Trie use CowArray
eiennohito Nov 24, 2021
5e1965a
Merge pull request #176 from eiennohito/172-py-part-wordinfo
eiennohito Nov 24, 2021
01aeea7
Merge pull request #179 from eiennohito/178-startup
eiennohito Nov 24, 2021
53903a7
add pos matcher
eiennohito Nov 24, 2021
07d0f89
use built-in functionality to access pos_id
eiennohito Nov 24, 2021
18dbb1d
Merge pull request #180 from eiennohito/177-pos-matcher
eiennohito Nov 24, 2021
6a2d20d
Add HuggingFace-compatible PreTokenizer (#167)
eiennohito Nov 26, 2021
7bf1a43
Correctly resolve node boundaries wrt node splitting (#183)
eiennohito Nov 29, 2021
190bbdb
implement analysis memory reuse via output parameters (#185)
eiennohito Dec 2, 2021
afe1a1e
improve __str__ and __repr__ (#187)
eiennohito Dec 7, 2021
97862b7
Provide more context for errors (#189)
eiennohito Dec 7, 2021
c7d20b2
support unicode combining symbols (#190)
eiennohito Dec 7, 2021
3a0a6a8
use new capabilities of 0.6.1 in the Python command line (#188)
eiennohito Dec 7, 2021
6168fab
accept 0 chars and add tests for them (#193)
eiennohito Dec 8, 2021
ca3c7b4
0.6.1 documentation (#186)
eiennohito Dec 8, 2021
0cdee2a
Add fuzzing (#194)
eiennohito Dec 8, 2021
e13bf75
0.6.1 release (#195)
eiennohito Dec 8, 2021
71dcf49
update version to 0.6.2-a1
eiennohito Dec 8, 2021
2f9fcde
update dependencies
eiennohito Dec 8, 2021
74c5991
remove central dot from nooovnow definition
eiennohito Dec 9, 2021
5a55e58
consume OOVs before moving to the next OOV matcher
eiennohito Dec 9, 2021
cc982ac
Merge pull request #196 from eiennohito/cdot_noovbow
eiennohito Dec 9, 2021
db7de21
bump version to 0.6.2
eiennohito Dec 9, 2021
f783278
update readme
eiennohito Dec 9, 2021
0e15b4f
bump version to 0.6.3-a1
eiennohito Dec 9, 2021
fba2923
update cargo.lock
eiennohito Dec 9, 2021
521622f
fix repository URL on README.md
bignumorg Dec 16, 2021
df9997e
Merge pull request #198 from bignumorg/for-pullreq
eiennohito Dec 21, 2021
f86240b
Fix URL
eiennohito Jan 31, 2022
ccfcb3d
resolve paths in more smart fashion (#203)
eiennohito Feb 10, 2022
a0de21b
improve PosMatcher ergonomics
eiennohito Feb 8, 2022
87e2579
add assert message for set operations bindings
eiennohito Feb 8, 2022
4b402a6
add invert operation to PosMatcher
eiennohito Feb 10, 2022
4ab7a27
Merge pull request #204 from eiennohito/pos-matcher
eiennohito Feb 10, 2022
78f9dee
0.6.3 release
eiennohito Feb 10, 2022
2e61574
bump version to 0.6.4-a1
eiennohito Feb 10, 2022
93e847f
Update README.md
Mar 1, 2022
26a9f18
Update README.ja.md
Mar 1, 2022
2d73a9e
update project (#209)
eiennohito Jun 13, 2022
9b1876d
Port regex-based oov handler (#211)
eiennohito Jun 16, 2022
b26bb2c
version -> 0.6.4
eiennohito Jun 16, 2022
df1b04d
version -> 0.6.5-a1
eiennohito Jun 16, 2022
6a77652
fix user-defined POS in OOV handlers bug for user dictionaries (#214)
eiennohito Jun 17, 2022
f1c977e
version -> 0.6.5
eiennohito Jun 17, 2022
f0bf811
version -> 0.6.6-a1
eiennohito Jun 21, 2022
84cb72b
add boundary mode parameter to regex oov handler (#219)
eiennohito Jul 25, 2022
22ab148
use universal2 builds on macos
eiennohito Jun 22, 2022
206e426
install arm64 target for macOS package builds
eiennohito Jun 22, 2022
3a00942
remove python 3.6 from upload test build
eiennohito Jun 22, 2022
4f1566b
remove python 3.6 from upload test build
eiennohito Jun 22, 2022
7570fb3
add more pip logging
eiennohito Jun 22, 2022
94924c1
version -> 0.6.6
eiennohito Jun 22, 2022
8e5a387
upgrade pip
eiennohito Jun 22, 2022
4dc7dac
upgrade pip
eiennohito Jun 22, 2022
52667cc
add macos_deployment_target envvar
eiennohito Jun 22, 2022
f240246
run cargo update
eiennohito Jul 25, 2022
ae7769a
version -> 0.6.7-a1
eiennohito Jul 25, 2022
d9cd4c4
Create FUNDING.yml
Oct 7, 2022
26ce57f
freebsd support for building sudachi
KonstantinDjairo Oct 12, 2022
282be2b
add Dictionary.lookup method (#221)
eiennohito Nov 1, 2022
7f43a12
Build 3.11 wheels (#227)
eiennohito Feb 10, 2023
07ad881
Release 0.6.7 (#228)
eiennohito Feb 15, 2023
619db79
bump version -> 0.6.8-a1
eiennohito Feb 15, 2023
ece8bf7
Update dependencies (#232)
eiennohito Aug 9, 2023
02ba8dd
update pyo3 to 0.19 (#233)
eiennohito Aug 9, 2023
0ec7d1d
add Config to SudachiPy (#234)
eiennohito Aug 16, 2023
9e85845
fix: python doc sudachi.json link (#235)
yokomotod Aug 24, 2023
937bca8
update dependencies (#237)
eiennohito Dec 13, 2023
9cbaae0
use pip for building PGO wheels
eiennohito Dec 13, 2023
bfaefc5
bump version -> 0.6.8
eiennohito Dec 14, 2023
f10d9ab
add documentation for new features
eiennohito Dec 14, 2023
1e5ad9a
correct documentation strings
eiennohito Dec 14, 2023
68ca30f
make ubuild subcommand requires system-dict argument (-s)
Jan 18, 2024
3ce1202
update ubuild usage
Jan 18, 2024
54c9d40
download latest dictionary
Jan 22, 2024
0bd1469
use release mode for builds
eiennohito Jan 24, 2024
d09dd00
update dependencies (#241)
eiennohito Jan 24, 2024
0fa9580
use fixed dictionary explicitly
Jan 24, 2024
4be2781
Merge pull request #239 from mh-northlander/feature/ubuild-require-sy…
Feb 27, 2024
533c3ac
Merge pull request #240 from mh-northlander/fetch-latest-dictionary
Feb 27, 2024
64e1ee3
allow string literals as segmentation modes
eiennohito Feb 29, 2024
65bab9d
run cargo fmt
eiennohito Feb 29, 2024
0283406
make pretokenizer accept string literals as well
eiennohito Mar 26, 2024
e850158
slightly cleanup tokenizer.rs logic
eiennohito Mar 26, 2024
693a32c
Merge pull request #245 from WorksApplications/feature/arseny/mode-li…
Mar 26, 2024
2c765b1
update dependencies
eiennohito Mar 26, 2024
66742fe
Merge pull request #246 from WorksApplications/chore/arseny/update-deps
mh-northlander Mar 27, 2024
b5fa9c4
fix documentation of configuration API
May 8, 2024
d3ec9f1
Merge pull request #247 from t-yamamura/fix/yamamura_t/configuration_…
mh-northlander May 14, 2024
f1a962a
refactor: migrate to clap from structopt
tkhshtsh0917 May 24, 2024
7144356
Merge pull request #248 from tkhshtsh0917/refactor/move-to-clap
mh-northlander May 29, 2024
c0d27bb
update workflow actions (node 16 to 20)
May 29, 2024
88299a8
fix warning from `make html`
May 29, 2024
96ce49e
add doc lookup for lookup and format
May 29, 2024
8a38ef4
stop calling setup.py
May 30, 2024
100f206
Merge pull request #222 from KonstantinDjairo/patch-1
mh-northlander May 30, 2024
f5cdcd9
merge linux and freegsd support
May 30, 2024
6507deb
end python 3.7 support
mh-northlander Jun 3, 2024
5a92ccd
Merge pull request #249 from mh-northlander/feature/update-workflow
mh-northlander Jun 3, 2024
707e1bf
Merge pull request #250 from mh-northlander/fix/python-doc
mh-northlander Jun 3, 2024
7591817
Merge pull request #251 from mh-northlander/feature/merge-os-support
mh-northlander Jun 3, 2024
8edb3c2
use workspace.package to aggregaate package data
mh-northlander Jun 3, 2024
d75d43d
update version-update script
mh-northlander Jun 3, 2024
bd84908
add x86 target for macos
mh-northlander Jun 4, 2024
3338b6e
comment out action target for test
mh-northlander Jun 4, 2024
b14b273
Merge pull request #256 from mh-northlander/fix/macos-workflow
mh-northlander Jun 4, 2024
930a4a7
Merge pull request #252 from mh-northlander/feature/stop-using-setupp…
mh-northlander Jun 4, 2024
232d9ee
Merge pull request #255 from mh-northlander/feature/minimum-rust-support
mh-northlander Jun 4, 2024
a6720b8
pass string as split mode
mh-northlander Jun 6, 2024
fb0d661
add and hide imports
mh-northlander Jun 10, 2024
eaa0c9f
Add option for embedded config and fallback resources
Kuuuube Jun 13, 2024
89279f9
Merge pull request #260 from mh-northlander/feature/py-import
mh-northlander Jun 14, 2024
077c411
Remove irrelevant comment
Kuuuube Jun 26, 2024
8b5d20a
Add DEFAULT_CHAR_DEF_BYTES to LoadedDictionary
Kuuuube Jun 26, 2024
b4382bd
Rename from_embedded_storage to from_cfg_storage_with_embedded_chardef
Kuuuube Jun 26, 2024
e1e3e78
Add from_system_dictionary_and_chardef and reduce duplicate logic
Kuuuube Jun 26, 2024
81b4084
Add better comment for from_cfg_storage_with_embedded_chardef
Kuuuube Jun 26, 2024
ae095ab
Run cargo fmt
Kuuuube Jun 27, 2024
d78bf49
Merge pull request #262 from Kuuuube/embedded-config-resources
mh-northlander Jun 28, 2024
763943e
auto fix clippy warnings
mh-northlander Jun 28, 2024
0474201
read csv records using Reader::records instead of read_record
mh-northlander May 31, 2024
531a6be
type alias for complex types
mh-northlander May 31, 2024
402c178
fix clippy warnings
mh-northlander Jun 28, 2024
dd388b8
small fix
mh-northlander Jul 1, 2024
113ad4c
update pyo3 to v0.21
mh-northlander Jun 4, 2024
4d0d1c0
use Bound instead of PyCell
mh-northlander Jun 4, 2024
2787346
deactivate gil-ref feature and fix related deprecation warnings
mh-northlander Jun 6, 2024
73c8cd9
update dependencies
mh-northlander Jun 3, 2024
4345772
use pyo3::intern macro inside pretokenizer
mh-northlander Jun 7, 2024
8baaa7a
add missing docstrings
mh-northlander Jul 5, 2024
8b597e3
copy docstring from new to class
mh-northlander Jul 5, 2024
c1d37c7
update text_signature
mh-northlander Jul 8, 2024
dfc87ed
add import of PosMatcher
mh-northlander Jul 8, 2024
8c35516
sync pyi and rs
mh-northlander Jul 8, 2024
706a573
add type fields for rs
mh-northlander Jul 8, 2024
5d8620e
improve pyi
mh-northlander Jul 8, 2024
3fd3e52
use get_all for wordinfo
mh-northlander Jul 8, 2024
81ede26
reorder use statements
mh-northlander Jun 7, 2024
d1c3165
add deprecated directive and fix
mh-northlander Jul 8, 2024
4a3da5b
update Dictionary arg name
mh-northlander Sep 25, 2024
c943da8
use crate::errors to send err
mh-northlander Jun 10, 2024
a4a47e2
cargo fmt
mh-northlander Oct 25, 2024
a33bc6b
add new line for the matrix size
mh-northlander Oct 25, 2024
848e637
dump pos_id
mh-northlander Oct 28, 2024
ec9a0f4
dump winfo in lexicon format
mh-northlander Oct 28, 2024
d11cafc
dump user dict
mh-northlander Oct 29, 2024
ecddc0b
fix clippy warnings
mh-northlander Oct 29, 2024
75cda40
add note to the help of pycli -d option and warn on its use
mh-northlander Nov 7, 2024
1cad6c9
rename pos_list and fmt
mh-northlander Nov 7, 2024
c262ad2
Merge pull request #265 from mh-northlander/feature/update-pyo3
mh-northlander Nov 11, 2024
e759196
Merge pull request #278 from WorksApplications/feature/warn-pycli-deb…
mh-northlander Nov 11, 2024
ff2c2d2
Merge branch 'develop' into fix/267-python-document
mh-northlander Nov 11, 2024
b384a18
Merge pull request #268 from WorksApplications/fix/267-python-document
mh-northlander Nov 11, 2024
d2b53d8
Merge pull request #277 from WorksApplications/feature/dump-dict
mh-northlander Nov 11, 2024
a86c2ff
Merge branch 'develop' into refactor/258-py-consistent-error
mh-northlander Nov 11, 2024
4e72d54
Merge pull request #273 from WorksApplications/refactor/258-py-consis…
mh-northlander Nov 11, 2024
8676342
Merge branch 'develop' into fix/clippy-warnings-nobreaking
mh-northlander Nov 11, 2024
e158aeb
Merge pull request #263 from WorksApplications/fix/clippy-warnings-no…
mh-northlander Nov 11, 2024
807ba55
update pyo3 to v0.22
mh-northlander Nov 7, 2024
545e4f4
add signature for trailing optional args
mh-northlander Nov 7, 2024
aea1180
explicit opt-in for enum comparison
mh-northlander Nov 7, 2024
83516d1
clone requires pyo3:Python
mh-northlander Nov 7, 2024
387a582
update cargo.lock
mh-northlander Nov 7, 2024
ea794e3
Merge pull request #276 from WorksApplications/feature/update-pyo3-v022
mh-northlander Nov 19, 2024
2424b7f
format and sync changelog
mh-northlander Nov 19, 2024
a95e249
update readme and changelog
mh-northlander Nov 19, 2024
39fa8bd
fix python/testupload workflow for macos
mh-northlander Nov 19, 2024
26555cb
drop py3.8 and add py3.13 support
mh-northlander Nov 19, 2024
1ca3d33
bump version -> 0.6.9-a2
mh-northlander Nov 19, 2024
9e8c540
fix version pattern
mh-northlander Nov 19, 2024
972a1f4
add py3.13 to pybin list
mh-northlander Nov 19, 2024
7391708
fix not to use cp313t and add comment
mh-northlander Nov 20, 2024
55fcf54
allow hyphen in the version
mh-northlander Nov 20, 2024
4f990e6
update changelog
mh-northlander Nov 20, 2024
08f17a7
bump version -> 0.6.9
mh-northlander Nov 20, 2024
23cdcee
update version handling
mh-northlander Nov 20, 2024
aa72b20
bump version -> 0.6.10-a1
mh-northlander Nov 20, 2024
00c545b
Merge pull request #281 from WorksApplications/pre/v0.6.9
mh-northlander Nov 20, 2024
56f177c
fix dictionary.__repr__ for no user-dict case
mh-northlander Jul 9, 2024
cb9d957
mv pyprojector to projection mod, organize required_field constructio
mh-northlander Dec 3, 2024
287f3d7
Merge pull request #283 from mh-northlander/refactor/pyprojector
mh-northlander Dec 4, 2024
8a7ce73
update pyo3 to v0.23
mh-northlander Dec 3, 2024
0a9e198
rewrite deprecated pyo3 methods
mh-northlander Dec 3, 2024
97aec81
update manylinux-pgo for py3.13t
mh-northlander Dec 3, 2024
fc3ffa4
Merge pull request #284 from WorksApplications/feature/280-pyo3-23
mh-northlander Dec 4, 2024
17f2e40
slightly improve user-dict list display code
mh-northlander Dec 4, 2024
09af4eb
Merge pull request #282 from mh-northlander/fix/dictionary-repr
mh-northlander Dec 4, 2024
747d2ff
update python-support-version badge to py39
mh-northlander Jan 6, 2025
02298c1
include resource files to embed and resolve workspace info in Cargo.toml
mh-northlander Jan 8, 2025
7d44a41
use Quansight-Labs/setup-python@v5 for py313t support
mh-northlander Jan 6, 2025
b699ec3
introduce cibuildwheel to build workflow (#295)
mh-northlander Jan 10, 2025
a530ebb
update readme and changelog
mh-northlander Jan 10, 2025
4593f0a
update test workflow for py313t
mh-northlander Jan 10, 2025
e926513
add test for sdist
mh-northlander Jan 10, 2025
0698818
fix installation order
mh-northlander Jan 10, 2025
7e2f287
bump version -> 0.6.10
mh-northlander Jan 10, 2025
8e08724
bump version -> 0.6.11-a1
mh-northlander Jan 10, 2025
02939f8
add ubuntu-arm wheel
mh-northlander Jun 19, 2025
1a4447f
comment out trigger
mh-northlander Jun 19, 2025
4a4a7ca
update wheel status doc
mh-northlander Jun 19, 2025
04ac6da
update Cargo.lock
mh-northlander Jun 19, 2025
ed86b45
Merge pull request #302 from WorksApplications/feature/workflow-linux…
mh-northlander Jun 19, 2025
54e85e8
Merge pull request #303 from WorksApplications/feature/update-cargo-lock
mh-northlander Jun 20, 2025
74d2374
Merge branch 'develop' of https://github.com/WorksApplications/sudach…
hata6502 Nov 16, 2025
90de43f
.
hata6502 Nov 16, 2025
597ccc9
.
hata6502 Nov 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
github: [hata6502]
# These are supported funding model platforms

github: WorksApplications
8 changes: 4 additions & 4 deletions .github/data/expected-a.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ EOS
。 補助記号,句点,*,*,*,* 。
EOS
天福 名詞,固有名詞,一般,*,*,* 天福
( 補助記号,括弧開,*,*,*,*
( 補助記号,括弧開,*,*,*,* (
日本 名詞,固有名詞,地名,国,*,* 日本
) 補助記号,括弧閉,*,*,*,*
) 補助記号,括弧閉,*,*,*,* )
元年 名詞,普通名詞,副詞可能,*,*,* 元年
( 補助記号,括弧開,*,*,*,*
( 補助記号,括弧開,*,*,*,* (
1233 名詞,数詞,*,*,*,* 1233
年 名詞,普通名詞,助数詞可能,*,*,* 年
) 補助記号,括弧閉,*,*,*,*
) 補助記号,括弧閉,*,*,*,* )
京都 名詞,固有名詞,地名,一般,*,* 京都
深草 名詞,固有名詞,地名,一般,*,* 深草
に 助詞,格助詞,*,*,*,* に
Expand Down
8 changes: 4 additions & 4 deletions .github/data/expected-c.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ EOS
。 補助記号,句点,*,*,*,* 。
EOS
天福 名詞,固有名詞,一般,*,*,* 天福
( 補助記号,括弧開,*,*,*,*
( 補助記号,括弧開,*,*,*,* (
日本 名詞,固有名詞,地名,国,*,* 日本
) 補助記号,括弧閉,*,*,*,*
) 補助記号,括弧閉,*,*,*,* )
元年 名詞,普通名詞,副詞可能,*,*,* 元年
( 補助記号,括弧開,*,*,*,*
( 補助記号,括弧開,*,*,*,* (
1233 名詞,数詞,*,*,*,* 1233
年 名詞,普通名詞,助数詞可能,*,*,* 年
) 補助記号,括弧閉,*,*,*,*
) 補助記号,括弧閉,*,*,*,* )
京都 名詞,固有名詞,地名,一般,*,* 京都
深草 名詞,固有名詞,地名,一般,*,* 深草
に 助詞,格助詞,*,*,*,* に
Expand Down
5 changes: 5 additions & 0 deletions .github/data/expected-wakati-a.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
外国 人 参政 権 に 関し て の 議論 が 行わ れ て いる
道元(どうげん) は 、 鎌倉 時代 初期 の 禅僧 。
天福 ( 日本 ) 元年 ( 1233 年 ) 京都 深草 に 興聖 寺 を 開く 。
2003 年 8 月 10 日 久御山 JCT - 大山崎 JCT 開通 に より 、 全線 開通 。
これ は 五万千二百三十一 円 に なり ます 。
125 changes: 51 additions & 74 deletions .github/workflows/build-python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,28 @@ name: Python Packages

on:
push:
branches: [ develop ]
tags: [ "v*" ]
branches: [develop]
tags: ["v*"]
# following two lines must be commented out before merging, we don't want to run this on PRs
# but for testing this we run this on PRs
# pull_request:
# branches: [ develop ]
# pull_request:
# branches: [ develop ]

jobs:
build-sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools setuptools-rust

- name: Build
working-directory: ./python
run: bash build-sdist.sh

- uses: actions/upload-artifact@v2
with:
path: python/dist/*
build-wheels:
name: build wheels using cibuildwheel
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest]

build-linux-wheels:
name: Build Linux Python Wheels (+PGO)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Download dictionary
run: bash fetch_dictionary.sh

- uses: actions/cache@v2
- uses: actions/checkout@v4
- name: download dictionary for PGO
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm' }}
run: bash fetch_dictionary.sh "20220519" "core"
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -53,30 +33,34 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: eiennohito/gha-manylinux-build@master
- name: cibuildwheel ${{ matrix.os }}
uses: pypa/[email protected]
with:
script: python/build-wheels-manylinux-pgo.sh
package-dir: python
output-dir: python/dist
config-file: "{package}/pyproject.toml"

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
path: python/dist/*manylinux*

build-non-linux-wheels:
name: Build wheels on ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macOS-latest]
python-version: [ "3.6", "3.7", "3.8", "3.9" , "3.10" ]
name: artifact-${{ matrix.os }}
path: |
./python/dist/*.whl
./python/dist/*.tar.gz

build-sdist:
name: build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: setup python for sdist
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: actions/cache@v2
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools setuptools-rust build
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -85,38 +69,31 @@ jobs:
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools setuptools_rust wheel

- name: build wheel
run: |
cd python && python setup.py bdist_wheel
env:
MACOSX_DEPLOYMENT_TARGET: 10.12

- uses: actions/upload-artifact@v2
- name: build sdist
working-directory: ./python
run: bash build-sdist.sh
- uses: actions/upload-artifact@v4
with:
path: python/dist/*.whl
name: artifact-sdist
path: |
./python/dist/*.whl
./python/dist/*.tar.gz

upload-to-pypi: # run only if all have succeeded
needs: [ build-sdist, build-non-linux-wheels, build-linux-wheels ]
needs: [build-wheels, build-sdist]
# https://stackoverflow.com/questions/58475748/github-actions-how-to-check-if-current-push-has-new-tag-is-new-release
if: startsWith(github.ref, 'refs/tags/v') # only for tags
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: artifact # default artifact name
pattern: artifact-*
path: dist/

merge-multiple: true
- name: List files to upload
run: ls -R dist/

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Build rust document
# build document of lib only for now to avoid name collision.
Expand All @@ -19,15 +19,15 @@ jobs:
run: mv ./target/doc ./docs/rust

- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.11'
- name: Install dependencies
run: python3 -m pip install -U setuptools setuptools-rust sphinx sphinx-rtd-theme

- name: Build python binding
working-directory: ./python
run: python3 setup.py develop
run: python3 -m pip install .

- name: Build pyhton document
working-directory: ./python/docs
Expand All @@ -36,7 +36,7 @@ jobs:
run: mv ./python/docs/build/html ./docs/python

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
Loading
Loading