This guide explains how to install and set up the GMOO SDK with the new project structure.
- Python 3.8 or higher
- Access to the VSME.dll file and a valid license
- Windows or Linux operating system
For development work, install the package in editable mode:
# Clone the repository
git clone https://github.com/yourusername/python-wrapper-sidefork.git
cd python-wrapper-sidefork
# Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in editable mode without development dependencies for straightforward application
pip install -e .
# Install in editable mode with development dependencies
pip install -e ".[dev]"
# Or install everything (dev + examples)
pip install -e ".[dev,examples]"For regular users who just want to use the SDK:
# Install from the repository
pip install .
# Or with example dependencies
pip install ".[examples]"If you have a wheel or tarball:
pip install gmoo-sdk-2.0.0-py3-none-any.whlCreate a .env file in your project root (copy from .env.example):
cp .env.example .envEdit .env to set your paths:
# Path to the VSME.dll file (including filename)
MOOLIB=/path/to/your/VSME.dll
# Path to the license file
MOOLIC=/path/to/your/license.licYou can also set these as system environment variables:
Windows:
set MOOLIB=C:\path\to\VSME.dll
set MOOLIC=C:\path\to\license.licLinux/Mac:
export MOOLIB=/path/to/VSME.dll
export MOOLIC=/path/to/license.licAfter installation, you can run the examples:
# Change to examples directory
cd examples
# Run a simple example
python simple_example.py
# Run the full test suite
python example_suite_stateful.pyTo run the test suite:
# Run all tests
pytest
# Run with coverage
pytest --cov=gmoo_sdk
# Run specific test file
pytest tests/test_dll_loading.py
# Run tests with specific marker
pytest -m "not requires_dll" # Skip tests that need the DLLThe new structure follows Python packaging best practices:
python-wrapper-sidefork/
├── src/
│ └── gmoo_sdk/ # Core package code
├── examples/ # Example scripts and configurations
│ ├── functions/ # Example model functions
│ └── configs/ # Test configurations
├── tests/ # Test suite
├── docs/ # Documentation
├── requirements/ # Dependency specifications
│ ├── base.txt # Core dependencies
│ ├── dev.txt # Development dependencies
│ └── examples.txt # Example dependencies
├── pyproject.toml # Modern Python packaging configuration
├── setup.py # Backward compatibility
└── MANIFEST.in # File inclusion rules
If you encounter import errors when running examples directly:
- Make sure you've installed the package:
pip install -e . - Or run examples as modules:
python -m examples.simple_example
If the DLL fails to load:
- Verify the MOOLIB path is correct and includes the filename
- Check that all DLL dependencies are available (Intel MPI runtime)
- Ensure the license file path (MOOLIC) is set correctly
If you get errors about missing packages:
# Install base requirements
pip install -r requirements.txt
# Or install with extras
pip install -e ".[dev,examples]"To create a distributable package:
# Install build tools
pip install build
# Build the package
python -m build
# This creates:
# - dist/gmoo_sdk-2.0.0-py3-none-any.whl
# - dist/gmoo-sdk-2.0.0.tar.gz- Create a virtual environment
- Install in editable mode with dev dependencies
- Make your changes
- Run tests to ensure nothing is broken
- Format code with black:
black src/gmoo_sdk - Check code with flake8:
flake8 src/gmoo_sdk - Commit your changes
If you encounter issues:
- Check the examples in the
examples/directory - Read the API documentation in
docs/ - Check existing issues on GitHub
- Create a new issue with a minimal reproducible example