Repository navigation
M0: Bootstrap onex-change-control Poetry package + repo structure + baseline CI #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
11389ea
b0d065a
aa25dae
7740ad3
c240c01
2366e5f
b627913
4aa954a
b68392f
1daaa05
7a50b3f
1a402f6
c021940
8725077
6e90e6a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.12" | ||
| - name: Install Poetry | ||
| uses: snok/install-poetry@v1 | ||
| with: | ||
| version: latest | ||
| virtualenvs-create: true | ||
| virtualenvs-in-project: true | ||
| - name: Install dependencies | ||
| run: poetry install --no-interaction | ||
| - name: Run ruff format check | ||
| run: poetry run ruff format --check . | ||
| - name: Run ruff lint | ||
| run: poetry run ruff check . | ||
|
|
||
| type-check: | ||
| name: Type Check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.12" | ||
| - name: Install Poetry | ||
| uses: snok/install-poetry@v1 | ||
| with: | ||
| version: latest | ||
| virtualenvs-create: true | ||
| virtualenvs-in-project: true | ||
| - name: Install dependencies | ||
| run: poetry install --no-interaction | ||
| - name: Run mypy | ||
| run: poetry run mypy src/ | ||
|
|
||
| test: | ||
| name: Test | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.12" | ||
| - name: Install Poetry | ||
| uses: snok/install-poetry@v1 | ||
| with: | ||
| version: latest | ||
| virtualenvs-create: true | ||
| virtualenvs-in-project: true | ||
| - name: Install dependencies | ||
| run: poetry install --no-interaction | ||
| - name: Run tests | ||
| run: poetry run pytest | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Python | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
| *.so | ||
| .Python | ||
| build/ | ||
| develop-eggs/ | ||
| dist/ | ||
| downloads/ | ||
| eggs/ | ||
| .eggs/ | ||
| lib/ | ||
| lib64/ | ||
| parts/ | ||
| sdist/ | ||
| var/ | ||
| wheels/ | ||
| *.egg-info/ | ||
| .installed.cfg | ||
| *.egg | ||
|
|
||
| # Virtual environments | ||
| venv/ | ||
| env/ | ||
| ENV/ | ||
| .venv/ | ||
|
|
||
| # Poetry | ||
| # poetry.lock - committed to ensure reproducible builds | ||
|
|
||
| # IDE | ||
| .vscode/ | ||
| .idea/ | ||
| *.swp | ||
| *.swo | ||
| *~ | ||
|
|
||
| # Testing | ||
| .pytest_cache/ | ||
| .coverage | ||
| htmlcov/ | ||
| .tox/ | ||
|
|
||
| # OS | ||
| .DS_Store | ||
| Thumbs.db | ||
|
|
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| [build-system] | ||
| requires = ["poetry-core"] | ||
| build-backend = "poetry.core.masonry.api" | ||
|
|
||
| [tool.poetry] | ||
| name = "onex-change-control" | ||
| version = "0.1.0" | ||
| description = "ONEX Change Control - Canonical governance + schema distribution + enforcement tooling to prevent cross-repo drift" | ||
| authors = ["OmniNode Team <team@omninode.ai>"] | ||
| license = "MIT" | ||
| readme = "README.md" | ||
| packages = [{include = "onex_change_control", from = "src"}] | ||
|
|
||
| [tool.poetry.dependencies] | ||
| python = "^3.12" | ||
| pydantic = "^2.11.7" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update pydantic to ^2.12.x for access to latest stable releases. The latest stable Pydantic 2.x version is 2.12.5. The current constraint 🤖 Prompt for AI Agents |
||
|
|
||
| [tool.poetry.group.dev.dependencies] | ||
| pytest = "^8.4.0" | ||
| pytest-cov = "^6.0.0" | ||
| mypy = "^1.13.0" | ||
| ruff = "^0.14.7" | ||
| types-pyyaml = "^6.0.12.20250822" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check for yaml imports and verify dependencies
echo "=== Checking for yaml/pyyaml imports in source code ==="
rg -i "import yaml|from yaml" 2>/dev/null || echo "No yaml imports found"
echo -e "\n=== Examining pyproject.toml for dependencies ==="
cat pyproject.toml 2>/dev/null | head -50Repository: OmniNode-ai/onex_change_control Length of output: 1652 🏁 Script executed: find . -name "pyproject.toml" -type f | head -1 | xargs catRepository: OmniNode-ai/onex_change_control Length of output: 1962 🏁 Script executed: rg -l "import yaml|from yaml" . 2>/dev/null || echo "No yaml imports found in codebase"Repository: OmniNode-ai/onex_change_control Length of output: 108 🏁 Script executed: cat pyproject.toml | grep -A 20 "dependencies\|tool.poetry.dependencies" || echo "Could not find dependencies section"Repository: OmniNode-ai/onex_change_control Length of output: 528 Remove unnecessary types-pyyaml dependency. The types-pyyaml package is a type stub for PyYAML used by type checkers, and should only be installed when the corresponding runtime library is needed. Since the codebase does not import or use yaml/pyyaml anywhere, this dev dependency is unnecessary and should be removed. 🤖 Prompt for AI Agents |
||
|
|
||
| [tool.ruff] | ||
| target-version = "py312" | ||
| line-length = 88 | ||
| exclude = [ | ||
| "**/__pycache__/**", | ||
| "**/site-packages/**", | ||
| ] | ||
|
|
||
| [tool.ruff.format] | ||
| quote-style = "double" | ||
| indent-style = "space" | ||
| skip-magic-trailing-comma = false | ||
| line-ending = "auto" | ||
|
|
||
| [tool.ruff.lint] | ||
| select = ["E", "F", "W", "C90", "I", "N", "UP", "YTT", "S", "BLE", "FBT", "B", "A", "COM", "C4", "DTZ", "T10", "EM", "EXE", "ISC", "ICN", "G", "INP", "PIE", "T20", "PT", "Q", "RSE", "RET", "SLF", "SIM", "TID", "TCH", "ARG", "PTH", "ERA", "PD", "PGH", "PL", "TRY", "NPY", "RUF"] | ||
| ignore = [ | ||
| "S101", # Allow assert statements in tests | ||
| "COM812", # Trailing comma rule conflicts with formatter | ||
| ] | ||
|
|
||
| [tool.pytest.ini_options] | ||
| testpaths = ["tests"] | ||
| python_files = ["test_*.py", "*_test.py"] | ||
| python_classes = ["Test*"] | ||
| python_functions = ["test_*"] | ||
| addopts = [ | ||
| "--strict-markers", | ||
| "--strict-config", | ||
| "-ra", | ||
| "--tb=short", | ||
| ] | ||
|
|
||
| [tool.mypy] | ||
| plugins = ["pydantic.mypy"] | ||
| python_version = "3.12" | ||
| warn_return_any = true | ||
| warn_unused_configs = true | ||
| disallow_untyped_defs = true | ||
| mypy_path = "src" | ||
| namespace_packages = true | ||
| explicit_package_bases = true | ||
|
|
||
| [tool.pydantic-mypy] | ||
| init_forbid_extra = true | ||
| init_typed = false | ||
| warn_required_dynamic_aliases = true | ||
| warn_untyped_fields = true | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| """ONEX Change Control - Canonical governance + schema distribution. | ||
|
|
||
| This package provides: | ||
| - Versioned Pydantic schema models for drift-control artifacts | ||
| - Deterministic JSON Schema exports for CI consumption | ||
| - Local, no-network validation tooling | ||
| """ | ||
|
|
||
| __version__ = "0.1.0" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| """Tests for onex_change_control package.""" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| """Test that the package imports cleanly.""" | ||
|
|
||
| import onex_change_control | ||
|
|
||
|
|
||
| def test_package_imports() -> None: | ||
| """Test that the package can be imported.""" | ||
| assert onex_change_control.__version__ == "0.1.0" |
Uh oh!
There was an error while loading. Please reload this page.