Skip to content

Commit 7c9d952

Browse files
committed
feat: initial commit - Pulsing Actor System with load balancing
0 parents  commit 7c9d952

File tree

104 files changed

+34461
-0
lines changed

Some content is hidden

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

104 files changed

+34461
-0
lines changed

.gitattributes

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
* text eol=lf
2+
*.sln text eol=crlf
3+
*.[Ii][Cc][Oo] binary
4+
*.[Jj][Pp][Ee][Gg] binary
5+
*.[Jj][Pp][Gg] binary
6+
*.[Pp][Dd][Ff] binary
7+
*.[Pp][Nn][Gg] binary
8+
*.[Zz][Ii][Pp] binary
9+
*.[Tt][Gg][Zz] binary
10+
*.fatbin binary
11+
12+
# Exclude test data files from linguist language detection
13+
lib/llm/tests/data/** linguist-vendored
14+
lib/llm/tests/snapshots/** linguist-vendored
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Bug Report
2+
description: Submit a bug report to help improve Pulsing
3+
title: "[BUG]: Enter bug title"
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report to improve Pulsing!
10+
11+
- type: textarea
12+
id: bug-description
13+
attributes:
14+
label: Describe the Bug
15+
description: A clear and concise description of what the bug is.
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
id: reproduction
21+
attributes:
22+
label: Steps to Reproduce
23+
description: How can we reproduce this issue?
24+
placeholder: |
25+
1. Go to '...'
26+
2. Click on '....'
27+
3. See error
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: expected
33+
attributes:
34+
label: Expected Behavior
35+
description: What did you expect to happen?
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: actual
41+
attributes:
42+
label: Actual Behavior
43+
description: What actually happened?
44+
validations:
45+
required: true
46+
47+
- type: textarea
48+
id: environment
49+
attributes:
50+
label: Environment
51+
description: Please provide details about your environment.
52+
placeholder: |
53+
Operating System, Pulsing Version, CPU Architecture, CUDA Version, GPU Architecture, Python Version...
54+
validations:
55+
required: true
56+
57+
- type: textarea
58+
id: additional-context
59+
attributes:
60+
label: Additional Context
61+
description: Add any other context about the problem here.
62+
validations:
63+
required: false
64+
65+
- type: textarea
66+
id: screenshots
67+
attributes:
68+
label: Screenshots
69+
description: If applicable, add screenshots to help explain your problem.
70+
validations:
71+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Pulsing GitHub Discussions
4+
url: https://github.com/reiase/Pulsing/discussions
5+
about: Ask questions and discuss ideas in GitHub Discussions.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Feature Request
2+
description: Suggest an improvement for Pulsing
3+
title: '[FEATURE]: Enter feature title'
4+
labels: ["enhancement"]
5+
body:
6+
- type: textarea
7+
id: feature-description
8+
attributes:
9+
label: Feature request
10+
description: |
11+
A clear and concise description of the feature proposal.
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
id: problem
17+
attributes:
18+
label: Describe the problem you're encountering
19+
description: |
20+
Please describe the problem you're encountering. Include any relevant environment information (eg. os, pulsing version, etc).
21+
validations:
22+
required: true
23+
24+
- type: textarea
25+
id: alternatives
26+
attributes:
27+
label: Describe alternatives you've tried
28+
description: |
29+
Please describe any alternative solutions you've tried in as much detail as possible.
30+
validations:
31+
required: false

.github/pull_request_template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#### Overview:
2+
3+
<!-- Describe your pull request here. Please read the text below the line, and make sure you follow the checklist.-->
4+
5+
#### Details:
6+
7+
<!-- Describe the changes made in this PR. -->
8+
9+
#### Where should the reviewer start?
10+
11+
<!-- call out specific files that should be looked at closely -->
12+
13+
#### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
14+
15+
- closes GitHub issue: #xxx

.github/workflows/ci.yml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: 1
12+
13+
jobs:
14+
# Rust 检查和测试
15+
rust:
16+
name: Rust ${{ matrix.rust }} on ${{ matrix.os }}
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [ubuntu-latest, macos-latest]
22+
rust: [stable]
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Install Rust toolchain
28+
uses: dtolnay/rust-action@stable
29+
with:
30+
toolchain: ${{ matrix.rust }}
31+
components: rustfmt, clippy
32+
33+
- name: Cache cargo
34+
uses: actions/cache@v4
35+
with:
36+
path: |
37+
~/.cargo/bin/
38+
~/.cargo/registry/index/
39+
~/.cargo/registry/cache/
40+
~/.cargo/git/db/
41+
target/
42+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
43+
44+
- name: Check formatting
45+
run: cargo fmt --all -- --check
46+
47+
- name: Clippy
48+
run: cargo clippy --all-targets --all-features -- -D warnings
49+
50+
- name: Build
51+
run: cargo build --all-targets
52+
53+
- name: Test
54+
run: cargo test --all-targets
55+
56+
# Python 检查和测试
57+
python:
58+
name: Python ${{ matrix.python-version }}
59+
runs-on: ubuntu-latest
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
python-version: ["3.10", "3.11", "3.12"]
64+
65+
steps:
66+
- uses: actions/checkout@v4
67+
68+
- name: Set up Python ${{ matrix.python-version }}
69+
uses: actions/setup-python@v5
70+
with:
71+
python-version: ${{ matrix.python-version }}
72+
73+
- name: Install Rust toolchain
74+
uses: dtolnay/rust-action@stable
75+
76+
- name: Install dependencies
77+
run: |
78+
python -m pip install --upgrade pip
79+
pip install maturin pytest pytest-asyncio ruff
80+
81+
- name: Build Python package
82+
run: maturin develop
83+
84+
- name: Lint with ruff
85+
run: ruff check python/
86+
87+
- name: Test with pytest
88+
run: pytest tests/ -v
89+
90+
# Pre-commit 检查
91+
pre-commit:
92+
name: Pre-commit
93+
runs-on: ubuntu-latest
94+
steps:
95+
- uses: actions/checkout@v4
96+
- uses: actions/setup-python@v5
97+
with:
98+
python-version: "3.12"
99+
- uses: pre-commit/[email protected]
100+
with:
101+
extra_args: --all-files
102+
103+
# 构建检查
104+
build:
105+
name: Build wheels
106+
runs-on: ${{ matrix.os }}
107+
strategy:
108+
matrix:
109+
os: [ubuntu-latest, macos-latest]
110+
111+
steps:
112+
- uses: actions/checkout@v4
113+
114+
- name: Set up Python
115+
uses: actions/setup-python@v5
116+
with:
117+
python-version: "3.12"
118+
119+
- name: Install Rust toolchain
120+
uses: dtolnay/rust-action@stable
121+
122+
- name: Install maturin
123+
run: pip install maturin
124+
125+
- name: Build wheel
126+
run: maturin build --release
127+
128+
- name: Upload wheels
129+
uses: actions/upload-artifact@v4
130+
with:
131+
name: wheels-${{ matrix.os }}
132+
path: target/wheels/*.whl
133+

.github/workflows/codeql.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CodeQL
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
codeql:
8+
name: Analyze Codebase
9+
runs-on: ubuntu-latest
10+
permissions:
11+
actions: read
12+
contents: read
13+
security-events: write
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
language: [ 'python' ]
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
24+
- name: Initialize CodeQL
25+
uses: github/codeql-action/init@v3
26+
with:
27+
languages: ${{matrix.language}}
28+
queries: +security-and-quality
29+
30+
- name: Perform CodeQL Analysis
31+
uses: github/codeql-action/analyze@v3
32+
with:
33+
category: "/language:${{matrix.language}}"
34+

.github/workflows/release.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-wheels:
13+
name: Build wheels on ${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, macos-latest]
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.12"
26+
27+
- name: Install Rust toolchain
28+
uses: dtolnay/rust-action@stable
29+
30+
- name: Install maturin
31+
run: pip install maturin
32+
33+
- name: Build wheel
34+
run: maturin build --release
35+
36+
- name: Upload wheels
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: wheels-${{ matrix.os }}
40+
path: target/wheels/*.whl
41+
42+
release:
43+
name: Create Release
44+
needs: [build-wheels]
45+
runs-on: ubuntu-latest
46+
47+
steps:
48+
- uses: actions/checkout@v4
49+
50+
- name: Download all wheels
51+
uses: actions/download-artifact@v4
52+
with:
53+
path: dist/
54+
pattern: wheels-*
55+
merge-multiple: true
56+
57+
- name: Create Release
58+
uses: softprops/action-gh-release@v1
59+
with:
60+
files: dist/*.whl
61+
generate_release_notes: true
62+
63+
# 可选:发布到 PyPI
64+
# publish-pypi:
65+
# name: Publish to PyPI
66+
# needs: [build-wheels]
67+
# runs-on: ubuntu-latest
68+
# steps:
69+
# - uses: actions/download-artifact@v4
70+
# with:
71+
# path: dist/
72+
# pattern: wheels-*
73+
# merge-multiple: true
74+
# - name: Publish to PyPI
75+
# uses: pypa/gh-action-pypi-publish@release/v1
76+
# with:
77+
# password: ${{ secrets.PYPI_API_TOKEN }}
78+

0 commit comments

Comments
 (0)