pyroid 0.2.1__tar.gz → 0.2.6__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.
- {pyroid-0.2.1 → pyroid-0.2.6}/Cargo.lock +1 -1
- {pyroid-0.2.1 → pyroid-0.2.6}/Cargo.toml +1 -1
- {pyroid-0.2.1 → pyroid-0.2.6}/PKG-INFO +1 -1
- {pyroid-0.2.1 → pyroid-0.2.6}/pyproject.toml +18 -6
- {pyroid-0.2.1 → pyroid-0.2.6}/python/pyroid/__init__.py +1 -1
- {pyroid-0.2.1 → pyroid-0.2.6}/src/core/config.rs +6 -2
- {pyroid-0.2.1 → pyroid-0.2.6}/src/core/error.rs +22 -21
- {pyroid-0.2.1 → pyroid-0.2.6}/src/core/types.rs +5 -1
- {pyroid-0.2.1 → pyroid-0.2.6}/.github/workflows/publish.yml +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/.github/workflows/semantic-release.yml +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/.gitignore +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/README.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/README.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/README_update.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/__init__.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/benchmark_plan.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/core/__init__.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/core/benchmark.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/core/reporter.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/core/visualizer.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/demo.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/generate_notebook.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/pyroid_benchmarks.ipynb +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/run_benchmarks.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/suites/__init__.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/suites/async_benchmarks.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/suites/data_benchmarks.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/suites/math_benchmarks.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/suites/scenarios/__init__.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/suites/scenarios/data_pipeline.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/suites/scenarios/scientific_computing.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/suites/scenarios/text_processing.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/suites/scenarios/web_scraping.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/benchmarks/suites/string_benchmarks.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/build.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/docs/api/dataframe_ops.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/docs/api/image_ops.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/docs/api/index.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/docs/api/io_ops.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/docs/api/ml_ops.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/docs/api/text_nlp_ops.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/docs/guides/getting_started.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/docs/guides/index.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/docs/guides/performance.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/docs/index.md +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/examples/async_examples.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/examples/data_examples.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/examples/dataframe_examples.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/examples/image_examples.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/examples/io_examples.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/examples/math_examples.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/examples/ml_examples.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/examples/requirements.txt +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/examples/string_examples.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/examples/test_async_file.txt +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/examples/text_nlp_examples.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/python/__init__.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/python/pyroid/core/__init__.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/python/pyroid/data/__init__.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/python/pyroid/io/__init__.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/python/pyroid/math/__init__.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/python/tests/__init__.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/python/tests/test_basic.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/setup.py +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/async_ops.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/core/conversion.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/core/mod.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/data/collections.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/data/dataframe.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/data/mod.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/data_ops.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/dataframe_ops.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/image/basic.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/image/mod.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/image_ops.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/io/async_io.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/io/file.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/io/mod.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/io/network.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/io_ops.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/lib.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/math/matrix.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/math/mod.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/math/stats.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/math/vector.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/math_ops.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/ml/basic.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/ml/mod.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/ml_ops.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/string_ops.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/text/mod.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/text_nlp_ops.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/utils/conversions.rs +0 -0
- {pyroid-0.2.1 → pyroid-0.2.6}/src/utils/mod.rs +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pyroid"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.6"
|
|
8
8
|
description = "High-performance Rust functions for Python with a simplified architecture"
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "Pyroid Team", email = "support@ataiva.com"}
|
|
@@ -35,10 +35,12 @@ python-source = "python"
|
|
|
35
35
|
features = ["pyo3/extension-module", "math", "text", "data", "io", "image", "ml"]
|
|
36
36
|
|
|
37
37
|
[tool.semantic_release]
|
|
38
|
-
|
|
39
|
-
"pyproject.toml:version",
|
|
40
|
-
"Cargo.toml:version"
|
|
41
|
-
|
|
38
|
+
version_toml = [
|
|
39
|
+
"pyproject.toml:project.version",
|
|
40
|
+
"Cargo.toml:package.version"
|
|
41
|
+
]
|
|
42
|
+
version_pattern = [
|
|
43
|
+
"python/pyroid/__init__.py:__version__ = \"$version\""
|
|
42
44
|
]
|
|
43
45
|
branch = "main"
|
|
44
46
|
upload_to_pypi = false # We use the publish.yml workflow for this
|
|
@@ -61,4 +63,14 @@ major_on_zero = false # Treat 0.x versions as major releases
|
|
|
61
63
|
version_source = "commit" # Use commit messages to determine version
|
|
62
64
|
commit_version_number = true # Include version number in commit message
|
|
63
65
|
commit_subject = "chore(release): {version} [skip ci]" # Commit message format
|
|
64
|
-
commit_author = "github-actions <actions@github.com>" # Commit author
|
|
66
|
+
commit_author = "github-actions <actions@github.com>" # Commit author
|
|
67
|
+
|
|
68
|
+
[tool.semantic_release.branches.main]
|
|
69
|
+
match = "main"
|
|
70
|
+
prerelease = false
|
|
71
|
+
|
|
72
|
+
[tool.semantic_release.remote]
|
|
73
|
+
type = "github"
|
|
74
|
+
|
|
75
|
+
[tool.semantic_release.parser]
|
|
76
|
+
parse_version_from_commit = true
|
|
@@ -195,7 +195,7 @@ pub fn clear_thread_config() {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
/// Python Config class
|
|
198
|
-
#[pyclass]
|
|
198
|
+
#[pyclass(name = "Config")]
|
|
199
199
|
#[derive(Clone)]
|
|
200
200
|
pub struct PyConfig {
|
|
201
201
|
config: Arc<Config>,
|
|
@@ -280,7 +280,7 @@ impl PyConfig {
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
/// Python context manager for configuration
|
|
283
|
-
#[pyclass]
|
|
283
|
+
#[pyclass(name = "ConfigContext")]
|
|
284
284
|
pub struct ConfigContext {
|
|
285
285
|
previous_config: Option<Arc<Config>>,
|
|
286
286
|
new_config: Arc<Config>,
|
|
@@ -327,6 +327,10 @@ impl ConfigContext {
|
|
|
327
327
|
pub fn register(py: Python, module: &PyModule) -> PyResult<()> {
|
|
328
328
|
let config_module = PyModule::new(py, "config")?;
|
|
329
329
|
|
|
330
|
+
// Add the PyConfig class as "Config" to the module
|
|
331
|
+
module.add_class::<PyConfig>()?;
|
|
332
|
+
|
|
333
|
+
// Also add it to the config submodule
|
|
330
334
|
config_module.add_class::<PyConfig>()?;
|
|
331
335
|
config_module.add_class::<ConfigContext>()?;
|
|
332
336
|
|
|
@@ -51,35 +51,36 @@ impl From<PyroidError> for PyErr {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
// Define custom Python exception types
|
|
55
|
-
#[pyclass]
|
|
56
|
-
struct PyroidErrorType {}
|
|
57
|
-
|
|
58
|
-
#[pymethods]
|
|
59
|
-
impl PyroidErrorType {
|
|
60
|
-
#[new]
|
|
61
|
-
fn new() -> Self {
|
|
62
|
-
Self {}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
54
|
/// Register the error module
|
|
67
55
|
pub fn register(py: Python, module: &PyModule) -> PyResult<()> {
|
|
68
|
-
module.add_class::<PyroidErrorType>()?;
|
|
69
|
-
|
|
70
56
|
// Create the error hierarchy in Python
|
|
71
57
|
let error_module = PyModule::new(py, "error")?;
|
|
72
58
|
|
|
73
59
|
// Define the base exception class
|
|
74
|
-
|
|
60
|
+
let pyroid_error = py.get_type::<PyException>();
|
|
61
|
+
module.add("PyroidError", pyroid_error)?;
|
|
62
|
+
error_module.add("PyroidError", pyroid_error)?;
|
|
75
63
|
|
|
76
64
|
// Define specific exception classes using standard Python exceptions
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
error_module.add("
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
65
|
+
let input_error = py.get_type::<PyValueError>();
|
|
66
|
+
module.add("InputError", input_error)?;
|
|
67
|
+
error_module.add("InputError", input_error)?;
|
|
68
|
+
|
|
69
|
+
let computation_error = py.get_type::<PyRuntimeError>();
|
|
70
|
+
module.add("ComputationError", computation_error)?;
|
|
71
|
+
error_module.add("ComputationError", computation_error)?;
|
|
72
|
+
|
|
73
|
+
let memory_error = py.get_type::<PyTypeError>();
|
|
74
|
+
module.add("MemoryError", memory_error)?;
|
|
75
|
+
error_module.add("MemoryError", memory_error)?;
|
|
76
|
+
|
|
77
|
+
let conversion_error = py.get_type::<PyTypeError>();
|
|
78
|
+
module.add("ConversionError", conversion_error)?;
|
|
79
|
+
error_module.add("ConversionError", conversion_error)?;
|
|
80
|
+
|
|
81
|
+
let io_error = py.get_type::<PyValueError>();
|
|
82
|
+
module.add("IoError", io_error)?;
|
|
83
|
+
error_module.add("IoError", io_error)?;
|
|
83
84
|
|
|
84
85
|
// Add the error module to the parent module
|
|
85
86
|
module.add_submodule(error_module)?;
|
|
@@ -83,7 +83,7 @@ impl<T> std::ops::Deref for SharedData<T> {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/// A Python wrapper for SharedData
|
|
86
|
-
#[pyclass]
|
|
86
|
+
#[pyclass(name = "SharedData")]
|
|
87
87
|
#[derive(Clone)]
|
|
88
88
|
pub struct PySharedData {
|
|
89
89
|
data: PyObject,
|
|
@@ -106,6 +106,10 @@ impl PySharedData {
|
|
|
106
106
|
pub fn register(py: Python, module: &PyModule) -> PyResult<()> {
|
|
107
107
|
let types_module = PyModule::new(py, "types")?;
|
|
108
108
|
|
|
109
|
+
// Add the PySharedData class as "SharedData" to the module
|
|
110
|
+
module.add_class::<PySharedData>()?;
|
|
111
|
+
|
|
112
|
+
// Also add it to the types submodule
|
|
109
113
|
types_module.add_class::<PySharedData>()?;
|
|
110
114
|
|
|
111
115
|
// Add the types module to the parent module
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|