pyroid 0.2.5__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.
Files changed (94) hide show
  1. {pyroid-0.2.5 → pyroid-0.2.6}/Cargo.lock +1 -1
  2. {pyroid-0.2.5 → pyroid-0.2.6}/Cargo.toml +1 -1
  3. {pyroid-0.2.5 → pyroid-0.2.6}/PKG-INFO +1 -1
  4. {pyroid-0.2.5 → pyroid-0.2.6}/pyproject.toml +1 -1
  5. {pyroid-0.2.5 → pyroid-0.2.6}/python/pyroid/__init__.py +1 -1
  6. {pyroid-0.2.5 → pyroid-0.2.6}/src/core/config.rs +6 -2
  7. {pyroid-0.2.5 → pyroid-0.2.6}/src/core/error.rs +22 -21
  8. {pyroid-0.2.5 → pyroid-0.2.6}/src/core/types.rs +5 -1
  9. {pyroid-0.2.5 → pyroid-0.2.6}/.github/workflows/publish.yml +0 -0
  10. {pyroid-0.2.5 → pyroid-0.2.6}/.github/workflows/semantic-release.yml +0 -0
  11. {pyroid-0.2.5 → pyroid-0.2.6}/.gitignore +0 -0
  12. {pyroid-0.2.5 → pyroid-0.2.6}/README.md +0 -0
  13. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/README.md +0 -0
  14. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/README_update.md +0 -0
  15. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/__init__.py +0 -0
  16. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/benchmark_plan.md +0 -0
  17. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/core/__init__.py +0 -0
  18. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/core/benchmark.py +0 -0
  19. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/core/reporter.py +0 -0
  20. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/core/visualizer.py +0 -0
  21. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/demo.py +0 -0
  22. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/generate_notebook.py +0 -0
  23. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/pyroid_benchmarks.ipynb +0 -0
  24. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/run_benchmarks.py +0 -0
  25. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/suites/__init__.py +0 -0
  26. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/suites/async_benchmarks.py +0 -0
  27. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/suites/data_benchmarks.py +0 -0
  28. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/suites/math_benchmarks.py +0 -0
  29. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/suites/scenarios/__init__.py +0 -0
  30. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/suites/scenarios/data_pipeline.py +0 -0
  31. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/suites/scenarios/scientific_computing.py +0 -0
  32. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/suites/scenarios/text_processing.py +0 -0
  33. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/suites/scenarios/web_scraping.py +0 -0
  34. {pyroid-0.2.5 → pyroid-0.2.6}/benchmarks/suites/string_benchmarks.py +0 -0
  35. {pyroid-0.2.5 → pyroid-0.2.6}/build.rs +0 -0
  36. {pyroid-0.2.5 → pyroid-0.2.6}/docs/api/dataframe_ops.md +0 -0
  37. {pyroid-0.2.5 → pyroid-0.2.6}/docs/api/image_ops.md +0 -0
  38. {pyroid-0.2.5 → pyroid-0.2.6}/docs/api/index.md +0 -0
  39. {pyroid-0.2.5 → pyroid-0.2.6}/docs/api/io_ops.md +0 -0
  40. {pyroid-0.2.5 → pyroid-0.2.6}/docs/api/ml_ops.md +0 -0
  41. {pyroid-0.2.5 → pyroid-0.2.6}/docs/api/text_nlp_ops.md +0 -0
  42. {pyroid-0.2.5 → pyroid-0.2.6}/docs/guides/getting_started.md +0 -0
  43. {pyroid-0.2.5 → pyroid-0.2.6}/docs/guides/index.md +0 -0
  44. {pyroid-0.2.5 → pyroid-0.2.6}/docs/guides/performance.md +0 -0
  45. {pyroid-0.2.5 → pyroid-0.2.6}/docs/index.md +0 -0
  46. {pyroid-0.2.5 → pyroid-0.2.6}/examples/async_examples.py +0 -0
  47. {pyroid-0.2.5 → pyroid-0.2.6}/examples/data_examples.py +0 -0
  48. {pyroid-0.2.5 → pyroid-0.2.6}/examples/dataframe_examples.py +0 -0
  49. {pyroid-0.2.5 → pyroid-0.2.6}/examples/image_examples.py +0 -0
  50. {pyroid-0.2.5 → pyroid-0.2.6}/examples/io_examples.py +0 -0
  51. {pyroid-0.2.5 → pyroid-0.2.6}/examples/math_examples.py +0 -0
  52. {pyroid-0.2.5 → pyroid-0.2.6}/examples/ml_examples.py +0 -0
  53. {pyroid-0.2.5 → pyroid-0.2.6}/examples/requirements.txt +0 -0
  54. {pyroid-0.2.5 → pyroid-0.2.6}/examples/string_examples.py +0 -0
  55. {pyroid-0.2.5 → pyroid-0.2.6}/examples/test_async_file.txt +0 -0
  56. {pyroid-0.2.5 → pyroid-0.2.6}/examples/text_nlp_examples.py +0 -0
  57. {pyroid-0.2.5 → pyroid-0.2.6}/python/__init__.py +0 -0
  58. {pyroid-0.2.5 → pyroid-0.2.6}/python/pyroid/core/__init__.py +0 -0
  59. {pyroid-0.2.5 → pyroid-0.2.6}/python/pyroid/data/__init__.py +0 -0
  60. {pyroid-0.2.5 → pyroid-0.2.6}/python/pyroid/io/__init__.py +0 -0
  61. {pyroid-0.2.5 → pyroid-0.2.6}/python/pyroid/math/__init__.py +0 -0
  62. {pyroid-0.2.5 → pyroid-0.2.6}/python/tests/__init__.py +0 -0
  63. {pyroid-0.2.5 → pyroid-0.2.6}/python/tests/test_basic.py +0 -0
  64. {pyroid-0.2.5 → pyroid-0.2.6}/setup.py +0 -0
  65. {pyroid-0.2.5 → pyroid-0.2.6}/src/async_ops.rs +0 -0
  66. {pyroid-0.2.5 → pyroid-0.2.6}/src/core/conversion.rs +0 -0
  67. {pyroid-0.2.5 → pyroid-0.2.6}/src/core/mod.rs +0 -0
  68. {pyroid-0.2.5 → pyroid-0.2.6}/src/data/collections.rs +0 -0
  69. {pyroid-0.2.5 → pyroid-0.2.6}/src/data/dataframe.rs +0 -0
  70. {pyroid-0.2.5 → pyroid-0.2.6}/src/data/mod.rs +0 -0
  71. {pyroid-0.2.5 → pyroid-0.2.6}/src/data_ops.rs +0 -0
  72. {pyroid-0.2.5 → pyroid-0.2.6}/src/dataframe_ops.rs +0 -0
  73. {pyroid-0.2.5 → pyroid-0.2.6}/src/image/basic.rs +0 -0
  74. {pyroid-0.2.5 → pyroid-0.2.6}/src/image/mod.rs +0 -0
  75. {pyroid-0.2.5 → pyroid-0.2.6}/src/image_ops.rs +0 -0
  76. {pyroid-0.2.5 → pyroid-0.2.6}/src/io/async_io.rs +0 -0
  77. {pyroid-0.2.5 → pyroid-0.2.6}/src/io/file.rs +0 -0
  78. {pyroid-0.2.5 → pyroid-0.2.6}/src/io/mod.rs +0 -0
  79. {pyroid-0.2.5 → pyroid-0.2.6}/src/io/network.rs +0 -0
  80. {pyroid-0.2.5 → pyroid-0.2.6}/src/io_ops.rs +0 -0
  81. {pyroid-0.2.5 → pyroid-0.2.6}/src/lib.rs +0 -0
  82. {pyroid-0.2.5 → pyroid-0.2.6}/src/math/matrix.rs +0 -0
  83. {pyroid-0.2.5 → pyroid-0.2.6}/src/math/mod.rs +0 -0
  84. {pyroid-0.2.5 → pyroid-0.2.6}/src/math/stats.rs +0 -0
  85. {pyroid-0.2.5 → pyroid-0.2.6}/src/math/vector.rs +0 -0
  86. {pyroid-0.2.5 → pyroid-0.2.6}/src/math_ops.rs +0 -0
  87. {pyroid-0.2.5 → pyroid-0.2.6}/src/ml/basic.rs +0 -0
  88. {pyroid-0.2.5 → pyroid-0.2.6}/src/ml/mod.rs +0 -0
  89. {pyroid-0.2.5 → pyroid-0.2.6}/src/ml_ops.rs +0 -0
  90. {pyroid-0.2.5 → pyroid-0.2.6}/src/string_ops.rs +0 -0
  91. {pyroid-0.2.5 → pyroid-0.2.6}/src/text/mod.rs +0 -0
  92. {pyroid-0.2.5 → pyroid-0.2.6}/src/text_nlp_ops.rs +0 -0
  93. {pyroid-0.2.5 → pyroid-0.2.6}/src/utils/conversions.rs +0 -0
  94. {pyroid-0.2.5 → pyroid-0.2.6}/src/utils/mod.rs +0 -0
@@ -608,7 +608,7 @@ dependencies = [
608
608
 
609
609
  [[package]]
610
610
  name = "pyroid"
611
- version = "0.2.5"
611
+ version = "0.2.6"
612
612
  dependencies = [
613
613
  "criterion",
614
614
  "futures",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "pyroid"
3
- version = "0.2.5"
3
+ version = "0.2.6"
4
4
  edition = "2021"
5
5
  authors = ["Andrew O", "Pyroid Team"]
6
6
  description = "High-performance Rust functions for Python"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyroid
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.8
6
6
  Classifier: Programming Language :: Python :: 3.9
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "pyroid"
7
- version = "0.2.5"
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"}
@@ -64,7 +64,7 @@ def config(**kwargs):
64
64
  return ConfigContext(Config(kwargs))
65
65
 
66
66
  # Version information
67
- __version__ = "51"
67
+ __version__ = "0.2.6"
68
68
 
69
69
  __all__ = [
70
70
  # Core classes
@@ -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
- error_module.add("PyroidError", py.get_type::<PyException>())?;
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
- error_module.add("PyroidError", py.get_type::<PyException>())?;
78
- error_module.add("InputError", py.get_type::<PyValueError>())?;
79
- error_module.add("ComputationError", py.get_type::<PyRuntimeError>())?;
80
- error_module.add("MemoryError", py.get_type::<PyTypeError>())?;
81
- error_module.add("ConversionError", py.get_type::<PyTypeError>())?;
82
- error_module.add("IoError", py.get_type::<PyValueError>())?;
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