Skip to content

Latest commit

 

History

History
73 lines (54 loc) · 2.09 KB

File metadata and controls

73 lines (54 loc) · 2.09 KB

Installing opensysml

From PyPI

pip install opensysml

Published to PyPI from CircleCI by the core v* release tag, at the core's version: v0.9.0 publishes opensysml 0.9.0. The package downloads the sysml-grpc service it needs at runtime from the release OPENSYSML_GRPC_VERSION (or version=) names, so pinning both to one version gives the pairing that release tested:

pip install opensysml==0.9.0
export OPENSYSML_GRPC_VERSION=v0.9.0

See docs/project/releasing.md.

From source

From the repository root:

# Install in development mode (editable)
pip install -e client/python/

# Or install with dev dependencies
pip install -e "client/python/[dev]"

Running tests

Install with [dev]: the lifecycle tests inspect processes through psutil, which the package itself does not need.

From the repository root:

# Run all tests
pytest client/python/tests/

# Run with verbose output
pytest -v client/python/tests/

# Run specific test file
pytest client/python/tests/test_connection.py

# Run integration tests (requires the sysml-grpc binary)
pytest -m integration client/python/tests/

A test that connects without naming a service starts a private sysml-grpc child from ~/.opensysml/bin, so put a built binary there (make build-grpc && cp bin/sysml-grpc ~/.opensysml/bin/). To run against a service you started yourself, set OPENSYSML_SERVICE=host:port.

Package structure

client/python/
├── opensysml/          # Package source
│   ├── *.py          # Core modules (connection, model, symbol, etc.)
│   ├── proto/        # Generated protobuf stubs
│   └── release-digests.json  # Pinned service digests, synced from client/
├── tests/            # Test suite
├── scripts/          # Release helpers (version check, latency measurement)
├── pyproject.toml    # Package metadata and build configuration
├── README.md         # Package documentation
└── INSTALL.md        # This file