Skip to main content

Node-centric Async Runtime for Atomic Networked Hierarchical Infrastructure

Project description

Naranhi

Side-by-Side Orchestration

Naranhi (Korean for "Side-by-Side") is a lightweight, declarative framework designed to bridge the gap between local development and massive 2,500+ subject cluster execution. By maintaining a strict boundary between Infrastructure and Science, Naranhi ensures your pipelines are dataset-agnostic, reproducible, and "cluster-aware" without being "cluster-dependent."

🏛️ The Orchestral Philosophy

1. The Score (sinfonia.yaml)

The declarative blueprint defining sensitive information, tasks, and communication channels.

  • Decoupled metadata: Keep processing parameters via pipeline_metadata seprate from execution logic.
  • Integrated Communication: Built-in Slack notifications via communication to monitor swarms in real-time.

2. The Maestro (Conductor)

A sequential, signal-based controller that manages "Wave Barriers".

  • The Great Freeze: Automatically clones and anchors your configuration to every analysis session for perfect provenance.
  • Wave Synchronization: Ensures all parallel "Performers" in a wave finish successfully before proceeding to the next movement.

3. The Performer (src/task/*.py)

Pure, CLI-ready Python scripts. Using the TaskContext manager or Performer, your science logic remains clean while Naranhi handles the heavy lifting:

  • Atomic Logging: Flat-file logging (O(1) I/O) optimized for high-performance filesystems.
  • Automatic Signaling: Transparently emits task.finish or task.fatal signals to the Maestro.
  • Error Propagation: Immediate Slack alerts if a soloist fails in the middle of a swarm.

🚀 Quick Start(0.1.8)

1. Define your Score (config/the.yaml)

pipeline_metadata:
  name: "ANALYSIS"

communication:
  slack_webhook: "https://hooks.slack.com/..."

analysis_metadata:
  paths:
    root: "/data/project/the_project"

tasks:
  - id: "00"
    name: "load_data"
    script: "the.py"
    wave: 1

2. Write your Soloist (src/tasks/the.py)

option 1. using @nrh.Performer

import naranhi as nrh
@nrh.Performer()
def main(logger, config, log_dir):
    ...

option 2. using with nrh.TaskContext() as (logger, config, log_dir): statement

import naranhi as nrh

def main():
    # The TaskContext handles logging, signals, and Slack automatically
    with nrh.TaskContext() as (logger, config, log_dir):
        logger.info("Performing Science...")
        # Your neuroimaging logic here
        
if __name__ == "__main__":
    main()

3. Conduct the Symphony

import naranhi as nrh

# Initialize the Maestro with your score
Maestro = nrh.Conductor("config/the.yaml")
Maestro.setup()
Maestro.play()

🛠️ Installation

uv pip install naranhi

⚖️ License

Copyright (c) 2026 JiHoon Kim. All rights reserved. Proprietary and confidential.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

naranhi-0.1.8.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

naranhi-0.1.8-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file naranhi-0.1.8.tar.gz.

File metadata

  • Download URL: naranhi-0.1.8.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.15

File hashes

Hashes for naranhi-0.1.8.tar.gz
Algorithm Hash digest
SHA256 4c9498ce4545d9f49d24541d205e711dee9c86706481c9e5db4bbb255bb29aef
MD5 c2ee7eef2e6930ca0548aa393836555f
BLAKE2b-256 3a96b8d3597d4852424aa4a57a1b7b5177344fd437843800c9948e26c1f8423a

See more details on using hashes here.

File details

Details for the file naranhi-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: naranhi-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.15

File hashes

Hashes for naranhi-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 edcad6064f2e51d2175ea7dc912cc21ed54c329b576b59b3732c940600ccef44
MD5 e0198314e381806caf7895a37d8776f3
BLAKE2b-256 8166b9b0d91d80e339e733abee1c6bba0cbaf2a2a783d7b7a35b5eb899f8b379

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page