Metadata-Version: 2.4
Name: pynaxs
Version: 0.1.0
Summary: Python validator for the Neural Architecture Exchange Specification (NAXS)
Author-email: jaminxmchen <jaminxmchen@tencent.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/neuroarchitectures/naxs
Project-URL: Repository, https://github.com/neuroarchitectures/naxs
Project-URL: Issues, https://github.com/neuroarchitectures/naxs/issues
Project-URL: Specification, https://github.com/neuroarchitectures/naxs/blob/main/specification.md
Keywords: naxs,neural-architecture,validator,json-schema,deep-learning
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: jsonschema>=4.18
Dynamic: license-file

# pynaxs — NAXS Validator

Python validator for the **Neural Architecture Exchange Specification (NAXS)** v0.1.

## Install

```bash
pip install pynaxs
```

Or from source (this repository is a monorepo):

```bash
pip install git+https://github.com/neuroarchitectures/naxs#subdirectory=pynaxs
```

## CLI Usage

```bash
# Validate a single file
pynaxs validate path/to/architecture.json

# Validate all JSON files in a directory
pynaxs validate path/to/architectures/

# Show only errors (suppress warnings)
pynaxs validate --strict path/to/architecture.json

# JSON output for CI integration
pynaxs validate --format json path/to/architecture.json
```

## Python API

```python
from pynaxs import NaxsValidator

validator = NaxsValidator()
result = validator.validate_file("architecture.json")

if result.is_valid():
    print(f"Valid! ({len(result.warnings)} warnings)")
else:
    for err in result.errors:
        print(f"ERROR: {err.path}: {err.message}")
    for warn in result.warnings:
        print(f"WARN:  {warn.path}: {warn.message}")
```

## Validation Coverage

Implements all rules from the NAXS specification:

| Section | Rules |
|---------|-------|
| §13.1 Structural Integrity | Required fields, component ID uniqueness, reference integrity, connection integrity |
| §13.2 Consistency | inputs/outputs bidirectional consistency, connections consistency |
| §13.3 Parameter Validity | Type checking, null/nested-object rejection |
| §13.4 Soft Validation | Warnings for custom ops with empty params, missing scope, non-standard param names, missing description |
| §25.11 Block Templates | Unique template IDs, block_ref resolution, node uniqueness, edge references, repeat directives, $paramName resolution, $expr syntax, circular reference detection |

## License

Apache-2.0
