Skip to main content

Lightweight Snakemake wrapper and orchestrator for NIPACT workflows.

Project description

NIPACT

NIPACT is a Python package and CLI tool for orchestrating, executing, and auditing scientific workflows. Currently it is built around Snakemake and uses a SQLite registry for tracking steps and artifacts.

Public documentation lives in a separate repository, nipact-docs. See: https://liuforest.github.io/nipact-docs/.

Contents:

  • a nipact Python package under src/
  • deterministic packaged demo generators used by the tests

Features:

  • Workflow inspection commands (workflow list, workflow steps, workflow plan, workflow graph)
  • Workflow execution via Snakemake (workflow run)
  • Runtime artifact provenance auditing in a SQLite registry (trace)
  • Project-specific GUI viewer for browsing workflow runs, artifacts, and provenance (gui)
  • Fully runnable colors demo with synthetic data and no external dependencies

Work in Progress:

  • fMRI and dFC demos

Installation

Initial pre-release is 0.0.1a1. Install it from PyPI in a clean environment:

python -m pip install nipact==0.0.1a1
nipact --version

For development from this repo:

python -m pip install -e . pytest

Local Setup

Install the package and test runner from the repo root:

python -m pip install -e . pytest

Run the Python tests:

python -m pytest

Colors Demo via CLI

See more details in the documentation at https://liuforest.github.io/nipact-docs/

The current release supports three packaged demos:

nipact init \
  --demo colors \
  --project-dir demos/colors/project \
  --runtime-dir demos/colors/runtime

nipact validate --context colors
nipact init \
  --demo fmri \
  --project-dir demos/fmri/project \
  --runtime-dir demos/fmri/runtime

nipact validate --context fmri
nipact init \
  --demo dfc \
  --project-dir demos/dfc/project \
  --runtime-dir demos/dfc/runtime

nipact validate --context dfc

NOTES: --project-dir and --runtime-dir must be empty and must not contain each other.

init creates a generated demo project plus mutable runtime files. The project contains nipact.yaml, sources.yaml, manifests, step YAML, and workflow YAML.

The runtime contains demo source files under data/ and database/registry.db. It also writes nipact.contexts.yaml in the current workspace so later commands can resolve --context <demo> to the generated project root. The context index is workspace-local state; this repository ignores the root file so source-checkout testing does not add tutorial state to version control. validate is read-only.

Workflow inspection and execution:

nipact workflow list \
  --context colors

nipact workflow steps \
  --context colors \
  --workflow base

nipact workflow plan \
  --context colors \
  --workflow base \
  --step color_sector_analysis

nipact workflow graph \
  --context colors \
  --workflow base \
  --step color_sector_analysis

nipact workflow run \
  --context colors \
  --workflow base \
  --step color_sector_analysis \
  --dry-run

nipact workflow run \
  --context colors \
  --workflow base \
  --step color_sector_analysis \
  --cores 1

nipact trace \
  --context colors \
  --workflow base \
  --step color_sector_analysis \
  --output sector_counts \
  --address init

nipact gui \
  --context colors \
  --port 8765

trace and gui read runtime/database/registry.db. The GUI binds to 127.0.0.1 and serves a local browser view for current workflows, manifests, artifacts, workflow topology, and focused artifact lineage.

The gui is for viewing only, not to execute workflows, registry rows, etc.

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

nipact-0.0.1a1.tar.gz (366.5 kB view details)

Uploaded Source

Built Distribution

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

nipact-0.0.1a1-py3-none-any.whl (362.4 kB view details)

Uploaded Python 3

File details

Details for the file nipact-0.0.1a1.tar.gz.

File metadata

  • Download URL: nipact-0.0.1a1.tar.gz
  • Upload date:
  • Size: 366.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nipact-0.0.1a1.tar.gz
Algorithm Hash digest
SHA256 68a0d22507b450e7a80f428df0948bc7d4cf0380502d92cb9a5240f71d1d33f9
MD5 cfa537cdf84bfff6684dc78c3d1d1c43
BLAKE2b-256 c87442f5faec5352e3d591776b813828b92b7d93b63373dddefc69200065b65f

See more details on using hashes here.

Provenance

The following attestation bundles were made for nipact-0.0.1a1.tar.gz:

Publisher: publish.yml on liuforest/nipact

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nipact-0.0.1a1-py3-none-any.whl.

File metadata

  • Download URL: nipact-0.0.1a1-py3-none-any.whl
  • Upload date:
  • Size: 362.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nipact-0.0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 1b99eaf7262c66376e4fdd4b57ea7e2a6cacde22918a3ae8e83a7b9c8fbc8fc8
MD5 a5fb65aff495649e7f2cd702c1878a80
BLAKE2b-256 e68814b6129b4053d51e9a6688465b1c522b26313ce8406ed97c2dfc5d8abce2

See more details on using hashes here.

Provenance

The following attestation bundles were made for nipact-0.0.1a1-py3-none-any.whl:

Publisher: publish.yml on liuforest/nipact

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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