Skip to content

Commit cb2e4ff

Browse files
authored
♻️ techr 패키지 이름 체계 정리 (#14)
PyPI 배포 이름과 Python import 이름을 techr로 통일하고 Rust 코어 crate 이름을 techr_core로 정리해 패키지 구조를 더 일관되게 만든다. Made-with: Cursor
1 parent b1506f4 commit cb2e4ff

12 files changed

Lines changed: 49 additions & 49 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ export CARGO_TERM_COLOR=$(shell (test -t 0 && echo "always") || echo "auto")
66

77
.PHONY: build-dev-polars
88
build-dev-polars:
9-
@rm -f polars/polars_techr/*.so polars/polars_techr/*.pyd
9+
@rm -f polars/techr/*.so polars/techr/*.pyd
1010
cd polars && uv run maturin develop --uv
1111

1212

1313
.PHONY: build-prod-polars
1414
build-prod-polars:
15-
@rm -f polars/polars_techr/*.so polars/polars_techr/*.pyd
15+
@rm -f polars/techr/*.so polars/techr/*.pyd
1616
@rm -rf polars/dist
1717
cd polars && uv run maturin build --release --sdist --out dist
1818

core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ homepage = "https://github.com/alphaprime-dev/techr"
99
repository = "https://github.com/alphaprime-dev/techr"
1010

1111
[lib]
12-
name = "techr"
12+
name = "techr_core"
1313
crate-type = ["cdylib", "rlib"]
1414

1515
[dev-dependencies]

polars/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# polars-techr
1+
# techr
22

3-
`polars-techr` exposes `techr` indicators as Polars expression plugins.
3+
`techr` exposes technical indicators as Polars expression plugins.
44

55
## Installation
66

77
```bash
8-
uv add polars-techr
8+
uv add techr
99
```
1010

1111
## Supported indicators
@@ -22,7 +22,7 @@ uv add polars-techr
2222

2323
```python
2424
import polars as pl
25-
import polars_techr as ta
25+
import techr as ta
2626

2727
df = pl.DataFrame(
2828
{

polars/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
name = "polars-techr"
2+
name = "techr"
33
dynamic = ["version"]
44
description = "Polars expression plugins for techr indicators"
55
authors = [{ name = "alphaprime-dev" }]
@@ -36,14 +36,14 @@ dev = [
3636
default-groups = "all"
3737

3838
[tool.maturin]
39-
module-name = "polars_techr._polars_techr"
40-
python-packages = ["polars_techr"]
39+
module-name = "techr._techr"
40+
python-packages = ["techr"]
4141
strip = true
4242
exclude = [
4343
".pytest_cache/**",
4444
".ruff_cache/**",
4545
".venv/**",
46-
"polars_techr/__pycache__/**",
46+
"techr/__pycache__/**",
4747
"tests/__pycache__/**",
4848
]
4949

polars/scripts/check_artifacts.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
}
1515
BANNED_SUFFIXES = {".pyc", ".pyo"}
1616
REQUIRED_WHEEL_FILES = {
17-
PurePosixPath("polars_techr/__init__.py"),
18-
PurePosixPath("polars_techr/types.py"),
17+
PurePosixPath("techr/__init__.py"),
18+
PurePosixPath("techr/types.py"),
1919
}
2020
REQUIRED_SDIST_FILES = {
2121
PurePosixPath("pyproject.toml"),
2222
PurePosixPath("Cargo.toml"),
2323
PurePosixPath("README.md"),
24-
PurePosixPath("polars_techr/__init__.py"),
24+
PurePosixPath("techr/__init__.py"),
2525
}
2626

2727

@@ -66,8 +66,8 @@ def validate_wheel(path: Path, members: list[PurePosixPath]) -> None:
6666
native_extensions = [
6767
member
6868
for member in members
69-
if member.parent == PurePosixPath("polars_techr")
70-
and member.name.startswith("_polars_techr.")
69+
if member.parent == PurePosixPath("techr")
70+
and member.name.startswith("_techr.")
7171
and member.suffix in {".so", ".pyd"}
7272
]
7373
if len(native_extensions) != 1:
@@ -86,10 +86,10 @@ def validate_sdist(path: Path, members: list[PurePosixPath]) -> None:
8686
raise ValueError(f"{path.name} is missing files: {', '.join(missing_files)}")
8787

8888
required_patterns = {
89-
"polars_techr/*.py": any(
89+
"techr/*.py": any(
9090
member.suffix == ".py"
9191
and len(member.parts) >= 2
92-
and member.parts[-2] == "polars_techr"
92+
and member.parts[-2] == "techr"
9393
for member in normalized
9494
),
9595
"src/*.rs": any(

polars/scripts/smoke_import.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
from pathlib import Path
44

55
import polars as pl
6-
import polars_techr as ta
6+
import techr as ta
77

88

99
def main() -> int:
1010
expr = ta.sma(pl.col("x"), period=2)
1111
if not isinstance(expr, pl.Expr):
12-
raise TypeError("polars-techr did not return a Polars expression")
12+
raise TypeError("techr did not return a Polars expression")
1313

1414
print(f"loaded {Path(ta.__file__).resolve()}")
1515
print(expr)

polars/src/expressions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use polars::prelude::*;
22
use pyo3_polars::derive::polars_expr;
33
use serde::Deserialize;
4-
use techr::{
4+
use techr_core::{
55
bband_lower as techr_bband_lower, bband_middle as techr_bband_middle,
66
bband_upper as techr_bband_upper, disparity as techr_disparity, ema as techr_ema,
77
ichimoku_base_line as techr_ichimoku_base_line,

polars/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use pyo3::{pymodule, Bound, PyResult};
44
use pyo3_polars::PolarsAllocator;
55

66
#[pymodule]
7-
fn _polars_techr(_m: &Bound<'_, PyModule>) -> PyResult<()> {
7+
fn _techr(_m: &Bound<'_, PyModule>) -> PyResult<()> {
88
Ok(())
99
}
1010

0 commit comments

Comments
 (0)