Developer Guide
Documentation for developers who want to understand NIRS4ALL internals or contribute to the project.
- Architecture Overview
- Audit de récupération R2 — backend natif
- Pipeline Architecture Overview
- Native source stacking with upstream preprocessing
- Controller System
- Controllers Introduction
- Controller Philosophy
- Why Not Just Execute Directly?
- Controller Registration Model
- Controller Base Contract
- Controller Families
- Controller Family Map
- Controller Interaction Patterns
- Controller Priority Strategy
- Controller Extension Pattern
- Controller Extension Examples
- Extension Quality Guidelines
- Advanced Topics
- Next Steps
- Caching and Memory Optimization
- Artifacts & Storage
- Artifacts Developer Guide
- Metadata Usage Guide
- Outputs vs Artifacts: Serialization Architecture
- Synthetic Data Generator
- Architecture Overview
- Physical Model
- Core Components
- Extending the Generator
- Wavenumber Utilities (Phase 1)
- Procedural Component Generator (Phase 1)
- Application Domains (Phase 1)
- Extended Component Library (Phase 1)
- Instrument Simulation (Phase 2)
- Environmental Effects (Phase 3)
- Scattering Effects (Phase 3)
- Metadata System
- Classification Generation
- Non-Linear Target Complexity
- Multi-Source Generation
- Exporter System
- Real Data Fitting
- Validation System
- Integration with Test Fixtures
- Performance Considerations
- Predefined Spectral Components
- References
- See Also
- Testing Guide
- Documentation Style: Writing Pipelines
- Explicit DuckDB workspace conversion
- Storage Migration Guide – Webapp Developers
Overview
This section is for developers who want to:
Understand the internal architecture of NIRS4ALL
Extend the library with custom controllers and operators
Contribute to the project
High-level overview of the pipeline execution engine, data flow, and component interactions.
Detailed pipeline execution flow and internal mechanics.
The controller registry system that dispatches pipeline steps to appropriate handlers.
User guide for the artifact storage system.
Block-based storage, copy-on-write branches, step caching, and memory observability.
Additional Developer Topics
Internal implementation details and extension points for the artifacts system.
Pipeline and dataset metadata handling.
Understanding the difference between outputs and artifacts.
Synthetic data generator internals and extension.
Running tests, markers, fixtures, and writing new tests.
Quick Start: Custom Controller
Here’s a minimal example of creating a custom controller:
from nirs4all.controllers import register_controller, OperatorController
@register_controller
class MyController(OperatorController):
priority = 50 # Lower = higher priority
@classmethod
def matches(cls, step, operator, keyword) -> bool:
return keyword == "my_custom_keyword"
@classmethod
def use_multi_source(cls) -> bool:
return False
def execute(self, step_info, dataset, context, runtime_context, **kwargs):
# Your implementation here
return context, output
See Controller System for the complete guide.
See Also
Writing a Pipeline in nirs4all - Pipeline syntax reference
Interactive Example Browser - Working examples including developer examples
GitHub Repository - Source code and issues