Skip to content

Commit 928343a

Browse files
committed
feat: rename Python library
1 parent 3885ef3 commit 928343a

File tree

10 files changed

+45
-36
lines changed

10 files changed

+45
-36
lines changed

.github/workflows/python.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ on:
99
push:
1010
branches:
1111
- main
12-
paths:
13-
- 'python/**'
14-
- 'lib/**'
15-
- '**/tasks.toml'
16-
- 'tasks.toml'
17-
- 'examples/**'
12+
paths:
13+
- 'python/**'
14+
- 'lib/**'
15+
- '**/tasks.toml'
16+
- 'tasks.toml'
17+
- 'examples/**'
1818
tags:
1919
- 'python*'
2020
pull_request:
@@ -71,7 +71,7 @@ jobs:
7171
set -e
7272
python3 -m venv .venv
7373
source .venv/bin/activate
74-
pip install pyodict --find-links dist --force-reinstall
74+
pip install theopendictionary --find-links dist --force-reinstall
7575
pip install pytest
7676
pip install syrupy
7777
cd python && pytest
@@ -88,7 +88,7 @@ jobs:
8888
pip3 install -U pip pytest syrupy
8989
run: |
9090
set -e
91-
pip3 install pyodict --find-links dist --force-reinstall
91+
pip3 install theopendictionary --find-links dist --force-reinstall
9292
cd python && pytest
9393
9494
musllinux:
@@ -132,7 +132,7 @@ jobs:
132132
apk add py3-pip py3-virtualenv
133133
python3 -m virtualenv .venv
134134
source .venv/bin/activate
135-
pip install pyodict --no-index --find-links dist --force-reinstall
135+
pip install theopendictionary --no-index --find-links dist --force-reinstall
136136
pip install pytest
137137
pip install syrupy
138138
cd python && pytest
@@ -151,7 +151,7 @@ jobs:
151151
source .venv/bin/activate
152152
pip install pytest
153153
pip install syrupy
154-
pip install pyodict --find-links dist --force-reinstall
154+
pip install theopendictionary --find-links dist --force-reinstall
155155
cd python && pytest
156156
157157
windows:
@@ -187,7 +187,7 @@ jobs:
187187
set -e
188188
python3 -m venv .venv
189189
source .venv/Scripts/activate
190-
pip install pyodict --find-links dist --force-reinstall
190+
pip install theopendictionary --find-links dist --force-reinstall
191191
pip install pytest
192192
pip install syrupy
193193
cd python && pytest
@@ -222,7 +222,7 @@ jobs:
222222
set -e
223223
python3 -m venv .venv
224224
source .venv/bin/activate
225-
pip install pyodict --find-links dist --force-reinstall
225+
pip install theopendictionary --find-links dist --force-reinstall
226226
pip install pytest
227227
pip install syrupy
228228
cd python && pytest

Cargo.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/tasks.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1+
["setup:node"]
2+
run = "pnpm install"
3+
sources = ["${MISE_TASK_DIR}/package.json"]
4+
outputs = { auto = true }
5+
16
["build:node"]
7+
depends = ["setup:node"]
28
run = "pnpm --filter=\"@odict/node\" build"
39

410
["publish:node"]
11+
depends = ["setup:node"]
512
run = "pnpm --filter=\"@odict/node\" npm publish"
613

714
["test:node"]
8-
depends = ["build:node"]
15+
depends = ["setup:node", "build:node"]
916
run = "pnpm --filter=\"@odict/node\" test -- "
1017

1118
["ci:node"]
19+
depends = ["setup:node"]
1220
run = 'mise x act -- act napi --container-architecture linux/amd64 --bind --job {{arg(name="job_id")}}'
1321
hide = true
14-
15-
["clean:node"]
16-
run = "rm -f **/*.node"

python/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
2-
name = "pyodict"
2+
name = "odict_python"
33
version = "0.1.0"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77
[lib]
8-
name = "pyodict"
8+
name = "theopendictionary"
99
crate-type = ["cdylib"]
1010

1111
[dependencies]

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["maturin>=1.7,<2.0"]
33
build-backend = "maturin"
44

55
[project]
6-
name = "pyodict"
6+
name = "theopendictionary"
77
requires-python = ">=3.8"
88
classifiers = [
99
"Programming Language :: Rust",

python/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ mod dictionary;
55
mod types;
66
mod utils;
77

8-
/// A Python module implemented in Rust.
98
#[pymodule]
10-
fn pyodict(m: &Bound<'_, PyModule>) -> PyResult<()> {
9+
fn theopendictionary(m: &Bound<'_, PyModule>) -> PyResult<()> {
1110
m.add_class::<Dictionary>()?;
1211
Ok(())
1312
}

python/tasks.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
["dev:python"]
2+
depends = ["setup:python"]
23
run = ".venv/bin/maturin develop -m ${MISE_TASK_DIR}/Cargo.toml"
34
sources = ["python/src/**/*.rs", "python/Cargo.toml"]
45
outputs = { auto = true }
56

67
["build:python"]
8+
depends = ["setup:python"]
79
run = ".venv/bin/maturin build -m ${MISE_TASK_DIR}/Cargo.toml"
810
outputs = { auto = true }
911
sources = ["python/src/**/*.rs", "python/Cargo.toml"]
1012

1113
["format:python"]
14+
depends = ["setup:python"]
1215
run = ".venv/bin/black $MISE_TASK_DIR"
1316

1417
["lint:python"]
18+
depends = ["setup:python"]
1519
run = ".venv/bin/flake8 $MISE_TASK_DIR"
1620

1721
["snapshot:python"]
@@ -23,4 +27,6 @@ run = ".venv/bin/pytest -vv"
2327
depends = ["dev:python"]
2428

2529
["setup:python"]
30+
sources = ["${MISE_TASK_DIR}/requirements.txt"]
31+
outputs = { auto = true }
2632
run = "pip install -r ${MISE_TASK_DIR}/requirements.txt"

python/tests/test_lookup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44

55
from pathlib import Path
6-
from pyodict import Dictionary
6+
from theopendictionary import Dictionary
77

88

99
@pytest.fixture(scope="module")

release-please-config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
"release-type": "node",
2626
"component": "node"
2727
},
28-
"java": {
29-
"release-type": "java",
30-
"component": "java"
28+
"python": {
29+
"release-type": "python",
30+
"component": "python"
3131
}
3232
}
3333
}

tasks.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ run = "cargo clean"
55
description = "Removes all Rust build artifacts via Cargo"
66

77
["clean:all"]
8-
depends = ["clean:*"]
9-
run = "rm -rf **/*.odict"
8+
run = "git clean -xdf"
109
description = "Recursively cleans all packages in the project"
1110

1211
[test]

0 commit comments

Comments
 (0)