Skip to content

Commit f693149

Browse files
authored
Merge pull request #3 from AltimateAI/open-source-readiness
Open-source readiness: engine bootstrap, branding, release infra
2 parents 8a57d73 + 0602797 commit f693149

File tree

128 files changed

+2146
-910
lines changed

Some content is hidden

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

128 files changed

+2146
-910
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug to help us improve
4+
title: "[Bug] "
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Description
10+
11+
A clear and concise description of what the bug is.
12+
13+
## Steps to Reproduce
14+
15+
1. Go to '...'
16+
2. Run '...'
17+
3. See error
18+
19+
## Expected Behavior
20+
21+
A clear and concise description of what you expected to happen.
22+
23+
## Actual Behavior
24+
25+
A clear and concise description of what actually happened.
26+
27+
## Environment
28+
29+
- **OS:** [e.g., macOS 15.1, Ubuntu 24.04]
30+
- **CLI version:** [e.g., 0.1.0]
31+
- **Python version:** [e.g., 3.12.0]
32+
- **Node version:** [e.g., 22.0.0]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or improvement
4+
title: "[Feature] "
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Description
10+
11+
A clear and concise description of the feature you'd like to see.
12+
13+
## Use Case
14+
15+
Describe the problem or workflow this feature would address.
16+
17+
## Proposed Solution
18+
19+
A clear and concise description of how you'd like it to work.
20+
21+
## Alternatives Considered
22+
23+
A clear and concise description of any alternative solutions or features you've considered.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Summary
2+
3+
What changed and why?
4+
5+
## Test Plan
6+
7+
How was this tested?
8+
9+
## Checklist
10+
11+
- [ ] Tests added/updated
12+
- [ ] Documentation updated (if needed)
13+
- [ ] CHANGELOG updated (if user-facing)

.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: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 10
8+
- package-ecosystem: "pip"
9+
directory: "/packages/altimate-engine"
10+
schedule:
11+
interval: "weekly"
12+
open-pull-requests-limit: 5

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
typescript:
11+
name: TypeScript
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: oven-sh/setup-bun@v2
17+
18+
- name: Install dependencies
19+
run: bun install
20+
21+
- name: Run tests
22+
run: bun test
23+
continue-on-error: true
24+
25+
python:
26+
name: Python ${{ matrix.python-version }}
27+
runs-on: ubuntu-latest
28+
strategy:
29+
matrix:
30+
python-version: ["3.10", "3.11", "3.12"]
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- uses: actions/setup-python@v5
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
38+
- name: Install dependencies
39+
run: pip install -e ".[dev]"
40+
working-directory: packages/altimate-engine
41+
42+
- name: Run tests
43+
run: pytest
44+
working-directory: packages/altimate-engine
45+
46+
- name: Lint
47+
run: ruff check src
48+
working-directory: packages/altimate-engine
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Engine
2+
3+
on:
4+
push:
5+
tags:
6+
- "engine-v*"
7+
8+
jobs:
9+
publish:
10+
name: Publish to PyPI
11+
runs-on: ubuntu-latest
12+
environment: pypi
13+
permissions:
14+
id-token: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.12"
21+
22+
- name: Install build tools
23+
run: pip install build
24+
25+
- name: Build package
26+
run: python -m build
27+
working-directory: packages/altimate-engine
28+
29+
- name: Publish to PyPI
30+
uses: pypa/gh-action-pypi-publish@release/v1
31+
with:
32+
packages-dir: packages/altimate-engine/dist/

.github/workflows/release.yml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
id-token: write
11+
12+
env:
13+
GH_REPO: AltimateAI/altimate-code
14+
15+
jobs:
16+
build:
17+
name: Build
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- uses: oven-sh/setup-bun@v2
23+
24+
- name: Install dependencies
25+
run: bun install
26+
27+
- name: Build all targets
28+
run: bun run packages/altimate-code/script/build.ts
29+
env:
30+
ALTIMATE_CLI_VERSION: ${{ github.ref_name }}
31+
ALTIMATE_CLI_CHANNEL: latest
32+
ALTIMATE_CLI_RELEASE: "1"
33+
GH_REPO: ${{ env.GH_REPO }}
34+
MODELS_DEV_API_JSON: packages/altimate-code/test/tool/fixtures/models-api.json
35+
36+
- name: Upload build artifacts
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: dist
40+
path: packages/altimate-code/dist/
41+
42+
publish-npm:
43+
name: Publish to npm
44+
needs: build
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- uses: oven-sh/setup-bun@v2
50+
51+
- name: Install dependencies
52+
run: bun install
53+
54+
- name: Download build artifacts
55+
uses: actions/download-artifact@v4
56+
with:
57+
name: dist
58+
path: packages/altimate-code/dist/
59+
60+
- name: Publish to npm
61+
run: bun run packages/altimate-code/script/publish.ts
62+
env:
63+
ALTIMATE_CLI_VERSION: ${{ github.ref_name }}
64+
ALTIMATE_CLI_CHANNEL: latest
65+
ALTIMATE_CLI_RELEASE: "1"
66+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
67+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
68+
GH_REPO: ${{ env.GH_REPO }}
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
71+
publish-engine:
72+
name: Publish engine to PyPI
73+
needs: build
74+
runs-on: ubuntu-latest
75+
environment: pypi
76+
permissions:
77+
id-token: write
78+
steps:
79+
- uses: actions/checkout@v4
80+
81+
- uses: actions/setup-python@v5
82+
with:
83+
python-version: "3.12"
84+
85+
- name: Install build tools
86+
run: pip install build
87+
88+
- name: Build package
89+
run: python -m build
90+
working-directory: packages/altimate-engine
91+
92+
- name: Publish to PyPI
93+
uses: pypa/gh-action-pypi-publish@release/v1
94+
with:
95+
packages-dir: packages/altimate-engine/dist/
96+
97+
github-release:
98+
name: Create GitHub Release
99+
needs: [build, publish-npm]
100+
runs-on: ubuntu-latest
101+
permissions:
102+
contents: write
103+
steps:
104+
- uses: actions/checkout@v4
105+
with:
106+
fetch-depth: 0
107+
108+
- name: Generate release notes
109+
id: notes
110+
run: |
111+
# Validate tag format to prevent injection
112+
if ! echo "$CURRENT_TAG" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9._-]+)?$'; then
113+
echo "::error::Invalid tag format: $CURRENT_TAG"
114+
exit 1
115+
fi
116+
117+
# Get the previous tag
118+
PREV_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]' | head -2 | tail -1)
119+
120+
# Generate changelog from commits between tags
121+
echo "## What's Changed" > notes.md
122+
echo "" >> notes.md
123+
124+
if [ -n "$PREV_TAG" ]; then
125+
# Categorize commits
126+
echo "### Features" >> notes.md
127+
git log "${PREV_TAG}".."${CURRENT_TAG}" --pretty=format:"- %s (%h)" --grep="^feat" >> notes.md || true
128+
echo "" >> notes.md
129+
echo "" >> notes.md
130+
131+
echo "### Bug Fixes" >> notes.md
132+
git log "${PREV_TAG}".."${CURRENT_TAG}" --pretty=format:"- %s (%h)" --grep="^fix" >> notes.md || true
133+
echo "" >> notes.md
134+
echo "" >> notes.md
135+
136+
echo "### Other Changes" >> notes.md
137+
git log "${PREV_TAG}".."${CURRENT_TAG}" --pretty=format:"- %s (%h)" --invert-grep --grep="^feat" --grep="^fix" >> notes.md || true
138+
echo "" >> notes.md
139+
else
140+
echo "Initial release" >> notes.md
141+
fi
142+
143+
echo "" >> notes.md
144+
echo "### Install" >> notes.md
145+
echo '```bash' >> notes.md
146+
echo "npm install -g altimate-code-ai@${CURRENT_TAG#v}" >> notes.md
147+
echo "# or" >> notes.md
148+
echo "brew install altimate/tap/altimate-code" >> notes.md
149+
echo '```' >> notes.md
150+
151+
echo "" >> notes.md
152+
echo "**Full Changelog**: https://github.com/${GH_REPO}/compare/${PREV_TAG}...${CURRENT_TAG}" >> notes.md
153+
env:
154+
GH_REPO: ${{ env.GH_REPO }}
155+
CURRENT_TAG: ${{ github.ref_name }}
156+
157+
- name: Download build artifacts
158+
uses: actions/download-artifact@v4
159+
with:
160+
name: dist
161+
path: packages/altimate-code/dist/
162+
163+
- name: Create GitHub Release
164+
uses: softprops/action-gh-release@v2
165+
with:
166+
body_path: notes.md
167+
draft: false
168+
prerelease: ${{ contains(github.ref_name, '-') }}
169+
files: |
170+
packages/altimate-code/dist/*.tar.gz
171+
packages/altimate-code/dist/*.zip
172+
env:
173+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0] - 2025-06-01
9+
10+
### Added
11+
12+
- Initial open-source release
13+
- SQL analysis and formatting via Python engine
14+
- Column-level lineage tracking
15+
- dbt integration (profiles, lineage, `+` operator)
16+
- Warehouse connectivity (Snowflake, BigQuery, Databricks, Postgres, DuckDB, MySQL)
17+
- AI-powered SQL code review
18+
- TUI interface with Solid.js
19+
- MCP (Model Context Protocol) server support
20+
- Auto-bootstrapping Python engine via uv

CODE_OF_CONDUCT.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Code of Conduct
2+
3+
This project follows the [Contributor Covenant Code of Conduct v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
4+
5+
By participating in this project, you agree to abide by its terms.
6+
7+
## Reporting
8+
9+
If you experience or witness unacceptable behavior, please contact us at **info@altimate.ai**.
10+
11+
All reports will be reviewed and investigated promptly and fairly. The project team is committed to maintaining confidentiality with regard to the reporter of an incident.

0 commit comments

Comments
 (0)