Skip to content

piappl/ea-idl

Repository files navigation

eaidl

This is replacement for idl4-enterprise-architect, but not as plugin, but rather something that can be run as part of CI against database. Similar in concepts in pyMDG, but we have some different assumptions on model structure.

For detailed code structure documentation, see STRUCTURE.md.

setup environment

Using uv (recommended)

# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Sync dependencies including dev tools (pytest, ruff, pre-commit)
uv sync --extra dev

# Install pre-commit hooks
uv run pre-commit install

# Run tests
uv run pytest

Alternative: Using pyenv

# This example uses pyenv
pyenv update
pyenv install 3.13
pyenv virtualenv 3.13 eaidl
pyenv activate eaidl

# Development mode install
pip install -e "."
# We use pre-commit hook
pre-commit install
pytest

Quick Start

Running Tests

uv run pytest                          # All tests
uv run pytest tests/test_diagram.py -v  # Specific test file
uv run pytest --cov=src/eaidl           # With coverage

Running the Tool

There are sample configuration files provided in config.

# Generate IDL from sample SQLite database:
eaidl run --config config/sqlite.yaml

# Generate IDL from PostgreSQL (needs custom configuration):
eaidl run --config config/postgres.yaml > res.idl

# Other commands available:
eaidl diagram --config config/sqlite.yaml --output diagram.puml  # Generate PlantUML diagram
eaidl packages --config config/sqlite.yaml                        # List packages
eaidl docs --config config/sqlite.yaml --output ./_docs           # Generate HTML docs

using uvx

uvx --with sqlite --from git+https://github.com/piappl/ea-idl/ eaidl run --config config/sqlite.yaml
uvx --with psycopg2 --from git+https://github.com/piappl/ea-idl/ eaidl run --config config/postgres.yaml

Generate Interactive HTML Documentation

The docs command generates a complete static website with interactive documentation from your EA model:

# Generate HTML documentation
eaidl docs --config config/sqlite.yaml --output ./docs

# With debug logging
eaidl docs --config config/sqlite.yaml --output ./docs --debug

Regenerate docs

cd scripts
./export_diagrams.sh --model /home/${USER}/git/4817/ea-idl/tests/data/nafv4.qea  --output /tmp
# rm -r ../docs/images/{data,message}
cp -r /tmp/Model/core/* ../docs/images

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •