Metadata-Version: 2.4
Name: sciplex-core
Version: 0.1.2
Summary: Core logic for Sciplex visual programming - models, controllers, and utilities
Author-email: Sciplex Team <info@sciplex.de>
License: MIT
Project-URL: Homepage, https://sciplex.de/en/
Project-URL: Documentation, https://sciplex.de/en/
Project-URL: Repository, https://github.com/sciplex-app/sciplex_core.git
Keywords: data-science,visual-programming,workflow,nodes,core
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=2.2.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: scikit-learn<2.0.0,>=1.6.0
Requires-Dist: xgboost>=3.0.0
Requires-Dist: networkx>=3.4.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: docstring_parser>=0.16
Requires-Dist: openpyxl>=3.1.0
Requires-Dist: numexpr>=2.11.0
Requires-Dist: plotly>=5.0.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: ruff>=0.8.4; extra == "dev"
Requires-Dist: mypy>=1.13.0; extra == "dev"
Dynamic: license-file

# sciplex-core

Core models, controllers, utilities, and default node libraries for Sciplex visual programming (desktop, server, and web variants). Packaged for reuse as a PyPI library.

## Installation

Python 3.11+ is required.

```bash
pip install sciplex-core
```

For local development:

```bash
pip install -e ".[dev]"
```

## Quick start

```python
from pathlib import Path
from importlib.resources import files

from sciplex_core.controller.scene_controller import SceneController
from sciplex_core.utils.library_loader import LibraryLoader

# Where user libraries and projects will be stored
base_dir = Path.home() / "Sciplex"
base_dir.mkdir(parents=True, exist_ok=True)

# Copy packaged default libraries into the user's workspace and load them
default_lib_source = files("sciplex_core.libraries.default")
loader = LibraryLoader(str(base_dir))
loader.setup_libraries_folder(str(default_lib_source))
loader.load_all_libraries()

# Create a scene controller and initialize a project
controller = SceneController(base_dir=str(base_dir))
controller.create_new_project(str(base_dir / "projects" / "example.sciplex"))
```

## Authoring nodes

Users can build custom node libraries with the public API exposed via `sciplex`:

```python
from sciplex import Attribute, nodify, workspace

@nodify(icon="function", scale=Attribute("doublespinbox", value=1.0))
def Scale(table, scale: float = 1.0):
    return table * scale

# Share data across nodes
workspace["my_df"] = ...
```

Functions decorated with `@nodify` gain inputs/outputs from type hints and register themselves with the runtime library model.

## Package structure

- `controller/` — Scene, node, edge controllers plus event/clipboard abstractions.
- `model/` — Graph, node, edge, socket, settings, and annotation data models.
- `utils/` — Shared utilities including `library_loader`, node factory helpers, graph export.
- `libraries/default/` — Packaged data, transform, math, visuals, and ML nodes (auto-copied into user workspaces).
- `assets/` — Application icons.
- `sciplex/` — Public API surface for library authors (`Attribute`, `nodify`, `workspace`).

## Development & testing

- Format/lint: `ruff check .`
- Tests: `pytest`
- Build wheel/sdist: `python -m build`

## Contributions

Issues and bug reports are welcome. We are not accepting pull requests at this time.

## License

MIT

