Skip to content

Commit ac32d88

Browse files
author
Z User
committed
Production-ready packaging: pyproject.toml, CI/CD, interactive playground
- pyproject.toml: PEP 621 metadata, zero-dep packaging, CLI entry point, dev tooling - __main__.py: 'python -m flux' support - __init__.py: __version__, __author__, __license__ exports - MANIFEST.in: includes docs/, benchmarks/, README.md - GitHub Actions: CI (3 OS × 4 Python), release on tags, weekly benchmarks - Issue/PR templates, CODEOWNERS, FUNDING, Dependabot - Interactive playground: cyberpunk-themed HTML demo with live pipeline, tile gallery, evolution visualizer, architecture explorer - 1848 tests passing, 0 external dependencies
1 parent 8697712 commit ac32d88

14 files changed

Lines changed: 2269 additions & 0 deletions

File tree

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Default code owners
2+
# Every file in the repo is owned by SuperInstance
3+
4+
* @SuperInstance

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [SuperInstance]
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug or unexpected behavior in FLUX
4+
title: "[Bug] "
5+
labels: ["bug"]
6+
assignees: []
7+
---
8+
9+
## Bug Description
10+
11+
A clear and concise description of what the bug is.
12+
13+
## Reproduction Steps
14+
15+
1. ...
16+
2. ...
17+
3. ...
18+
19+
## Expected Behavior
20+
21+
What you expected to happen.
22+
23+
## Actual Behavior
24+
25+
What actually happened (include stack traces, error messages, or unexpected output).
26+
27+
## Environment
28+
29+
- **OS**: [e.g., Ubuntu 22.04, macOS 14, Windows 11]
30+
- **Python version**: [e.g., 3.12.0]
31+
- **FLUX version**: [e.g., v0.1.0 or git commit hash]
32+
33+
## Additional Context
34+
35+
Any other context that may help diagnose the issue (relevant logs, configuration, screenshots, etc.).
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or enhancement for FLUX
4+
title: "[Feature] "
5+
labels: ["enhancement"]
6+
assignees: []
7+
---
8+
9+
## Feature Description
10+
11+
A clear and concise description of the feature you'd like.
12+
13+
## Motivation
14+
15+
Why is this feature needed? What problem does it solve? How would it benefit FLUX users?
16+
17+
## Proposed Solution
18+
19+
Describe your proposed solution or approach. Include any API designs, data structures, or implementation ideas.
20+
21+
## Alternatives Considered
22+
23+
Any alternative solutions or workarounds you've thought of.
24+
25+
## Additional Context
26+
27+
Any other context, references, or examples that would help (links to relevant specs, papers, or prior art).

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Summary
2+
3+
Brief description of what this PR changes and why.
4+
5+
## Changes
6+
7+
<!-- List the key changes made in this PR -->
8+
9+
-
10+
11+
## Testing
12+
13+
<!-- Describe how you tested these changes -->
14+
15+
- [ ] Unit tests pass (`pytest tests/`)
16+
- [ ] Linting passes (`ruff check src/ tests/`)
17+
- [ ] New tests added for new functionality (if applicable)
18+
19+
## Checklist
20+
21+
- [ ] My code follows the project's style guidelines
22+
- [ ] I have added/updated documentation where appropriate
23+
- [ ] All existing tests pass
24+
- [ ] No breaking changes to public APIs (or documented below)
25+
- [ ] I have reviewed my own changes before requesting review
26+
27+
## Breaking Changes
28+
29+
<!-- If this PR introduces breaking changes, document them here -->
30+
31+
_None_

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
commit-message:
9+
prefix: "ci"
10+
prefix-development: "ci"
11+
labels:
12+
- "dependencies"
13+
- "github-actions"
14+
open-pull-requests-limit: 5

.github/workflows/benchmark.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Benchmarks
2+
3+
on:
4+
schedule:
5+
# Every Monday at 00:00 UTC
6+
- cron: "0 0 * * 1"
7+
workflow_dispatch:
8+
9+
jobs:
10+
benchmark:
11+
name: Run Benchmarks
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python 3.12
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.12"
21+
cache: pip
22+
23+
- name: Install dependencies
24+
run: python -m pip install --upgrade pip && pip install -e .
25+
26+
- name: Run benchmark suite
27+
id: benchmarks
28+
run: |
29+
echo "## FLUX Benchmark Results" >> $GITHUB_STEP_SUMMARY
30+
echo "" >> $GITHUB_STEP_SUMMARY
31+
echo "**Run:** $(date -u '+%Y-%m-%d %H:%M:%S UTC') | **Commit:** \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY
32+
echo "" >> $GITHUB_STEP_SUMMARY
33+
echo '```' >> $GITHUB_STEP_SUMMARY
34+
PYTHONPATH=src python -m benchmarks.benchmarks >> $GITHUB_STEP_SUMMARY 2>&1
35+
echo '```' >> $GITHUB_STEP_SUMMARY
36+
37+
- name: Post benchmark summary
38+
if: always()
39+
run: |
40+
echo "Benchmarks completed. See the [Job Summary](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for results."

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ci-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
lint-and-test:
15+
name: py${{ matrix.python-version }} / ${{ matrix.os }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-latest, macos-latest, windows-latest]
21+
python-version: ["3.10", "3.11", "3.12", "3.13"]
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
cache: pip
32+
33+
- name: Install dev dependencies
34+
run: python -m pip install --upgrade pip && pip install -e ".[dev]" build pytest-cov
35+
36+
- name: Lint with ruff
37+
run: python -m ruff check src/ tests/
38+
39+
- name: Type check with mypy
40+
continue-on-error: true
41+
run: python -m mypy src/
42+
43+
- name: Run tests
44+
run: python -m pytest tests/ -v --tb=short
45+
env:
46+
PYTHONPATH: src
47+
shell: bash
48+
49+
- name: Upload coverage report
50+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: coverage-report
54+
path: htmlcov/
55+
retention-days: 14

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-and-release:
13+
name: Build & Publish Release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Set up Python 3.12
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.12"
25+
cache: pip
26+
27+
- name: Install build tools
28+
run: python -m pip install --upgrade pip && pip install build
29+
30+
- name: Build package
31+
run: python -m build
32+
33+
- name: Create GitHub Release
34+
uses: softprops/action-gh-release@v2
35+
with:
36+
generate_release_notes: true
37+
files: |
38+
dist/*.whl
39+
dist/*.tar.gz
40+
draft: false
41+
prerelease: ${{ contains(github.ref, 'rc') || contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}

MANIFEST.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include README.md
2+
include LICENSE
3+
recursive-include docs *
4+
recursive-include benchmarks *

0 commit comments

Comments
 (0)