diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 29113af..31c2562 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,15 +7,13 @@ name: CI on: push: - branches: - - nop tags: - - '*' + - '[0-9]+.[0-9]+.[0-9]+' pull_request: workflow_dispatch: permissions: - contents: read + contents: write jobs: linux: diff --git a/Cargo.lock b/Cargo.lock index 43d497d..bcd8ed6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,6 +20,14 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "fastid" +version = "0.0.1" +dependencies = [ + "pyo3", + "ulid", +] + [[package]] name = "getrandom" version = "0.2.11" @@ -97,14 +105,6 @@ dependencies = [ "windows-targets", ] -[[package]] -name = "pkpy" -version = "0.0.1" -dependencies = [ - "pyo3", - "ulid", -] - [[package]] name = "ppv-lite86" version = "0.2.17" diff --git a/Cargo.toml b/Cargo.toml index df774a6..99661a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "pkpy" +name = "fastid" version = "0.0.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] -name = "pkpy" +name = "fastid" crate-type = ["cdylib"] diff --git a/pkpy.pyi b/fastid.pyi similarity index 100% rename from pkpy.pyi rename to fastid.pyi diff --git a/pyproject.toml b/pyproject.toml index bd68092..1380ee5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["maturin>=1.4,<2.0"] build-backend = "maturin" [project] -name = "pkpy" +name = "fastid" description = "This is a library for quickly generating unique IDs in Python." authors = [{ name = "Seungwoo Hong", email = "qksn1541@gmail.com" }] requires-python = ">=3.8" diff --git a/python/tests/test.py b/python/tests/test.py index 61a23e5..7b3a7a6 100644 --- a/python/tests/test.py +++ b/python/tests/test.py @@ -1,4 +1,4 @@ -import pkpy +import fastid from ulid import microsecond if __name__ == '__main__': @@ -15,7 +15,7 @@ t = time.time() for i in range(1000): - a = pkpy.ulid() + a = fastid.ulid() print(a) print(time.time() - t) diff --git a/src/lib.rs b/src/lib.rs index 017e58c..d50d217 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,7 @@ fn get_ulid() -> PyResult { } #[pymodule] -fn pkpy(_py: Python, m: &PyModule) -> PyResult<()> { +fn fastid(_py: Python, m: &PyModule) -> PyResult<()> { m.add_function(wrap_pyfunction!(get_ulid, m)?)?; Ok(()) }