Skip to content

Commit 1c30700

Browse files
author
DevForge Engineer
committed
cowork-bot: restore full tree clobbered by empty-index commit; keep .gitattributes normalization
Previous commit 2fcb7a5 was created from a fresh GIT_INDEX_FILE containing only .gitattributes, which rewrote master's tree down to a single file. This commit rebuilds the complete tree from 194f1f4 plus the intended .gitattributes.
1 parent 2fcb7a5 commit 1c30700

81 files changed

Lines changed: 13591 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @Coding-Dev-Tools

‎.github/dependabot.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 5
8+
- package-ecosystem: github-actions
9+
directory: "/"
10+
schedule:
11+
interval: weekly
12+
open-pull-requests-limit: 3
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Automated Code Review — caller workflow
2+
#
3+
# Drop this file into any Coding-Dev-Tools repo at
4+
# .github/workflows/auto-code-review.yml to enable
5+
# automated PR code review (lint, format, secret detection,
6+
# TODO/FIXME check, large file check, and PR comment summary).
7+
#
8+
# The reusable workflow is defined in the org .github repo:
9+
# Coding-Dev-Tools/.github/.github/workflows/auto-code-review.yml@main
10+
11+
name: Auto Code Review
12+
13+
on:
14+
pull_request:
15+
branches: [main, master]
16+
types: [opened, synchronize, reopened]
17+
push:
18+
branches: [main, master]
19+
workflow_dispatch:
20+
21+
permissions:
22+
contents: read
23+
pull-requests: write
24+
security-events: write
25+
26+
jobs:
27+
code-review:
28+
uses: Coding-Dev-Tools/.github/.github/workflows/auto-code-review.yml@main

‎.github/workflows/ci.yml‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: ["3.10", "3.11", "3.12", "3.13"]
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
23+
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -e ".[dev]"
33+
34+
- name: Lint with ruff
35+
run: pip install ruff && ruff check src/ tests/ --target-version py310
36+
- name: Run tests
37+
run: |
38+
python -m pytest tests/ -v --cov=schemaforge --cov-report=term-missing
39+
40+
- name: Check import works
41+
run: |
42+
python -c "from schemaforge import __version__; print(f'schemaforge {__version__}')"
43+
44+
schema-consistency:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
with:
49+
persist-credentials: false
50+
51+
- name: Set up Python
52+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
53+
with:
54+
python-version: "3.12"
55+
56+
- name: Install dependencies
57+
run: |
58+
python -m pip install --upgrade pip
59+
pip install -e ".[dev]"
60+
61+
- name: Check schema consistency
62+
run: |
63+
python scripts/check_consistency.py
64+
65+
- name: Run schemaforge check on fixtures
66+
run: |
67+
schemaforge check --dir /tmp --canonical sql || true
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Seeded by the repo-improver-rotation Cowork job into cowork/improve-* branches.
2+
# Opens a PR automatically when such a branch is pushed (sandbox cannot reach
3+
# the GitHub API directly; this runs server-side with the repo's GITHUB_TOKEN).
4+
name: cowork-auto-pr
5+
on:
6+
push:
7+
branches: ['cowork/improve-**']
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
jobs:
12+
ensure-pr:
13+
runs-on: ubuntu-latest
14+
steps:
15+
# gh pr create requires a local git checkout to diff head against base;
16+
# without this step every run failed with "not a git repository" and no
17+
# PR was ever opened (fleet-wide defect: 11/11 seeded copies lacked it).
18+
- name: Check out the pushed branch
19+
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.ref_name }}
22+
fetch-depth: 0
23+
- name: Open PR for this branch if none exists
24+
env:
25+
GH_TOKEN: ${{ github.token }}
26+
run: |
27+
set -eu
28+
existing=$(gh pr list --repo "$GITHUB_REPOSITORY" --head "$GITHUB_REF_NAME" --state open --json number --jq 'length')
29+
if [ "$existing" = "0" ]; then
30+
gh pr create --repo "$GITHUB_REPOSITORY" \
31+
--head "$GITHUB_REF_NAME" \
32+
--title "cowork-bot: automated improvements ($GITHUB_REF_NAME)" \
33+
--body "Automated improvement PR from the Cowork repo-improver rotation (one coherent senior-dev improvement per run; see individual commit messages). Subsequent runs push additional commits to this PR rather than opening new ones."
34+
else
35+
echo "Open PR already exists for $GITHUB_REF_NAME — nothing to do."
36+
fi

‎.github/workflows/pages.yml‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
persist-credentials: false
24+
- name: Setup Pages
25+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b
26+
- name: Build with Jekyll
27+
uses: actions/jekyll-build-pages@44a6e6beabd48582f863aeeb6cb2151cc1716697
28+
with:
29+
source: .
30+
destination: ./_site
31+
- name: Upload artifact
32+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa
33+
34+
deploy:
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
runs-on: ubuntu-latest
39+
needs: build
40+
steps:
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e

‎.github/workflows/publish.yml‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
pypi_target:
9+
description: 'PyPI target (pypi or testpypi)'
10+
default: 'pypi'
11+
type: choice
12+
options:
13+
- pypi
14+
- testpypi
15+
16+
permissions:
17+
contents: read
18+
id-token: write
19+
20+
jobs:
21+
publish:
22+
runs-on: ubuntu-latest
23+
environment: pypi
24+
25+
steps:
26+
- uses: actions/checkout@v4 # v4.2.2 (pinned)
27+
with:
28+
persist-credentials: false
29+
30+
- name: Set up Python 3.12
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: "3.12"
34+
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install build twine ruff
39+
40+
- name: Lint with ruff
41+
run: ruff check src/ --target-version py310
42+
43+
- name: Build package
44+
run: python -m build
45+
46+
- name: Check package
47+
run: twine check dist/*
48+
49+
- name: Publish to TestPyPI
50+
if: ${{ inputs.pypi_target == 'testpypi' }}
51+
uses: pypa/gh-action-pypi-publish@release/v1
52+
with:
53+
repository-url: https://test.pypi.org/legacy/
54+
55+
- name: Publish to PyPI
56+
if: ${{ inputs.pypi_target == 'pypi' || github.event_name == 'release' }}
57+
uses: pypa/gh-action-pypi-publish@release/v1
58+
59+
npm-publish:
60+
runs-on: ubuntu-latest
61+
permissions:
62+
contents: read
63+
id-token: write
64+
steps:
65+
- uses: actions/checkout@v4 # v4.2.2 (pinned)
66+
with:
67+
persist-credentials: false
68+
- uses: actions/setup-node@v4
69+
with:
70+
node-version: 22
71+
registry-url: 'https://registry.npmjs.org'
72+
- run: npm ci --ignore-scripts || npm install --ignore-scripts
73+
- run: npm publish --provenance --access public
74+
env:
75+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

‎.gitignore‎

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Byte-compiled / optimized / compiled files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
*.egg
25+
26+
# PyInstaller
27+
*.manifest
28+
*.spec
29+
30+
# Installer logs
31+
pip-log.txt
32+
pip-delete-this-directory.txt
33+
34+
# Unit test / coverage
35+
htmlcov/
36+
.tox/
37+
.nox/
38+
.coverage
39+
.coverage.*
40+
.cache
41+
nosetests.xml
42+
coverage.xml
43+
*.cover
44+
*.py,cover
45+
.hypothesis/
46+
.pytest_cache/
47+
48+
# Translations
49+
*.mo
50+
*.pot
51+
52+
# Environments
53+
.env
54+
.venv
55+
env/
56+
venv/
57+
ENV/
58+
59+
# IDE
60+
.vscode/
61+
.idea/
62+
*.swp
63+
*.swo
64+
*~
65+
66+
# OS
67+
.DS_Store
68+
Thumbs.db
69+
70+
# Project specific
71+
research/
72+
fixtures/generated/
73+
.ruff_cache/
74+
75+
# Added by release-prep
76+
node_modules
77+
78+
# Cron/audit scratch artifacts
79+
_audit_reqs.txt
80+
nul
81+
package-lock.json

‎AGENTS.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SchemaForge
2+
3+
## Purpose
4+
Bidirectional ORM schema converter — convert between SQL DDL, Prisma, Drizzle, TypeORM, Django, SQLAlchemy, Alembic migrations, JSON Schema, GraphQL SDL, EF Core (C#), and Scala case classes. 11 formats, 100 direction pairs.
5+
6+
## Build & Test Commands
7+
- Install: `pip install -e .` or `pip install git+https://github.com/Coding-Dev-Tools/schemaforge.git`
8+
- Test: `pytest` (310 tests)
9+
- Lint: `ruff check .`
10+
- Build: `pip wheel . --wheel-dir dist/`
11+
12+
## Architecture
13+
Key directories:
14+
- `src/schemaforge/` — Main package (CLI, converters, formats, diff, type mapping)
15+
- `tests/` — 310 passing tests
16+
- `fixtures/` — Test fixtures for various schema formats
17+
- `scripts/` — Build/release scripts
18+
- `.github/workflows/` — CI/CD (4 workflows)
19+
20+
## Conventions
21+
- Language: Python 3.10+
22+
- Test framework: pytest (310 tests passing)
23+
- CI: GitHub Actions (4 workflows)
24+
- Formatting: ruff (line-length 120)
25+
- Type checking: py.typed included
26+
- Package: setuptools with src layout

0 commit comments

Comments
 (0)