diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..404bc6a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,56 @@ +name: Release Artifacts + +on: + push: + tags: + - "v*.*.*" + release: + types: [published] + workflow_dispatch: + +permissions: + contents: write + +jobs: + build-and-release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install build and test dependencies + run: | + python -m pip install --upgrade pip + pip install build wheel pytest pytest-cov click + + - name: Install package + run: | + pip install -e .[dev] + + - name: Run tests + run: | + pytest + + - name: Build package artifacts (sdist and wheel) + run: | + python -m build + + - name: Verify build artifacts + run: | + ls -la dist/ + pip install dist/*.whl --force-reinstall + python -m rege --version + python -m rege status + + - name: Publish Release Assets + if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release' + uses: softprops/action-gh-release@v2 + with: + files: dist/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 6546640..04800d4 100644 --- a/README.md +++ b/README.md @@ -166,8 +166,39 @@ pip install -e . # Install development dependencies (pytest, coverage) pip install -e ".[dev]" -# Verify installation +# Verify installation using CLI or direct python module entrypoint rege status +# OR +python -m rege status +``` + +### Smoke Check Verification + +To run a immediate smoke-check verification of the runtime system and dispatch pipeline: + +```bash +# 1. System Status Verification +python -m rege status + +# Expected Output: +# ::RE:GE SYSTEM STATUS:: +# [QUEUE] +# Size: 0/1000 +# [ORGANS] +# Registered: 22 + +# 2. Ritual Invocation Verification +python -m rege invoke '::CALL_ORGAN HEART_OF_CANON +::WITH "threshold crossing" +::MODE mythic +::DEPTH standard +::CHARGE 75' + +# Expected Output: +# ::INVOCATION RESULT:: +# Organ: HEART_OF_CANON +# Status: success +# Output Type: narrative ``` ### Runtime Dependencies diff --git a/pyproject.toml b/pyproject.toml index d2a008c..f25b75c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "rege" version = "1.0.0" description = "RE:GE - Recursive Engine: Generative Entity - A symbolic operating system for myth, identity, ritual, and recursive systems" readme = "README.md" -license = {text = "MIT"} +license = "MIT" authors = [ {name = "RE:GE System"} ] @@ -15,7 +15,6 @@ requires-python = ">=3.8" classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", diff --git a/rege/__main__.py b/rege/__main__.py new file mode 100644 index 0000000..5261889 --- /dev/null +++ b/rege/__main__.py @@ -0,0 +1,11 @@ +""" +RE:GE Main Entrypoint. + +Allows running the CLI as a python module: +python -m rege [command] +""" + +from rege.cli import main + +if __name__ == "__main__": + main() diff --git a/rege/tests/test_cli.py b/rege/tests/test_cli.py index 604c6c9..3d8c2d1 100644 --- a/rege/tests/test_cli.py +++ b/rege/tests/test_cli.py @@ -337,6 +337,17 @@ def test_help_option(self, runner): assert "status" in result.output +class TestMainModuleEntrypoint: + """Tests for python -m rege main entrypoint.""" + + def test_main_import_and_execution(self): + """Test rege.__main__ module import and main execution.""" + import runpy + with patch('rege.cli.main') as mock_main: + runpy.run_module('rege', run_name='__main__') + assert mock_main.called + + class TestInitSystem: """Tests for init_system function.""" diff --git a/seed.yaml b/seed.yaml index df62854..2c3ecf8 100644 --- a/seed.yaml +++ b/seed.yaml @@ -12,16 +12,22 @@ metadata: implementation_status: ACTIVE tier: flagship promotion_status: PUBLIC_PROCESS - last_validated: "2026-02-11" + last_validated: "2026-04-14" generated: "2026-02-17" sprint: "SENSORIA" language: python + entrypoint: "rege.cli:main" + module_entrypoint: "python -m rege" agents: - name: ci trigger: on_push - workflow: .github/workflows/ci-python.yml + workflow: .github/workflows/ci.yml description: "Continuous integration pipeline" + - name: release + trigger: on_tag + workflow: .github/workflows/release.yml + description: "Builds and publishes versioned release artifacts (sdist and wheel)" produces: - type: theory