Skip to content

Commit 11ca140

Browse files
committed
Initial commit to public repo
0 parents  commit 11ca140

Some content is hidden

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

57 files changed

+16113
-0
lines changed

.bumpversion.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[tool.bumpversion]
2+
current_version = "0.0.1"
3+
commit = true
4+
allow_dirty = false
5+
commit_args = "--no-verify"
6+
tag = true
7+
tag_name = "v{new_version}"
8+
pre_commit_hooks = ["uv lock", "git add uv.lock"]
9+
10+
[[tool.bumpversion.files]]
11+
# Where the version is stored
12+
filename = "pyproject.toml"
13+
search = 'version = "{current_version}"'
14+
replace = 'version = "{new_version}"'
15+
16+
[[tool.bumpversion.files]]
17+
# Update version in __init__.py
18+
filename = "mach/__init__.py"
19+
search = '__version__ = "{current_version}"'
20+
replace = '__version__ = "{new_version}"'
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: "\U0001F41E Bug Report"
3+
about: Did you find a bug?
4+
title: ""
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
## Describe the bug
10+
11+
_Replace this text with a description of the bug._
12+
13+
## Steps to reproduce
14+
15+
_Replace this text with a code snippet or minimal working example to replicate your problem._
16+
17+
_Include a description of your setup including:_
18+
19+
- **Python version**:
20+
- **OS version and name**: _Replace with the output of `python -c "import platform; print(platform.uname()._asdict())"`_
21+
- **GPU and driver information**: _Replace with the output of `nvidia-smi`_
22+
- **mach version**: _Replace with wheel version or git commit (if built from source)_
23+
24+
## Expected results
25+
26+
_Replace this text with a description of what you expected to happen._
27+
28+
## Actual results
29+
30+
_Replace this text with the actual output, tracebacks, screenshot, or other description of the results._
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: "\U0001F4DA Documentation Issue"
3+
about: Did you find errors, omissions, or anything unintelligible in the documentation?
4+
title: ""
5+
labels: documentation
6+
assignees: ""
7+
---
8+
9+
## Issue
10+
11+
_Describe your proposed enhancement in detail. If you are requesting a new glossary term, please include a proposed definition._
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: "\U0001F381 Feature Request"
3+
about: Do you have ideas for new features or improvements?
4+
title: ""
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
## Describe the new feature or enhancement
10+
11+
_Please provide a clear and concise description of what you want to add or change._
12+
13+
_Please describe how you would use this new feature._
14+
15+
## Describe your proposed implementation
16+
17+
_Describe how you think the feature or improvement should be implemented (e.g., as a new function in an existing module?) If you're not sure, please delete this section and the next section._
18+
19+
## Describe possible alternatives
20+
21+
_If you've suggested an implementation above, list here any alternative implementations you can think of, and brief comments explaining why the chosen implementation is better._
22+
23+
## Additional comments
24+
25+
_Add any other context or screenshots about the feature request here._
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Setup CUDA Environment"
2+
description: "Set up CUDA environment with Python dependencies for beamforming"
3+
4+
inputs:
5+
python-version:
6+
description: "Python version to use"
7+
required: true
8+
default: "3.11"
9+
cuda-version:
10+
description: "CUDA version to install"
11+
required: true
12+
default: "12.4.0"
13+
14+
runs:
15+
using: "composite"
16+
steps:
17+
- name: Install nvcc and CUDA runtime libraries for cupy
18+
uses: Jimver/cuda-toolkit@v0.2.25
19+
id: cuda-toolkit
20+
with:
21+
cuda: ${{ inputs.cuda-version }}
22+
sub-packages: '["nvcc", "nvrtc"]'
23+
non-cuda-sub-packages: '["libcurand", "libcublas"]'
24+
method: "network"
25+
26+
- name: CUDA diagnostic info
27+
run: |
28+
nvidia-smi
29+
nvcc --version
30+
shell: bash
31+
32+
- name: Set up the environment
33+
uses: ./.github/actions/setup-python-env
34+
with:
35+
python-version: ${{ inputs.python-version }}
36+
37+
- name: Build cuda beamformer
38+
run: make compile
39+
shell: bash
40+
env:
41+
CC: gcc
42+
CXX: g++
43+
44+
- name: Check CuPy/CUDA installation
45+
run: uv run --with cupy-cuda12x python -c 'import cupy; cupy.show_config()'
46+
shell: bash
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Setup Python Environment"
2+
description: "Set up Python environment for the given Python version"
3+
4+
inputs:
5+
python-version:
6+
description: "Python version to use"
7+
required: true
8+
default: "3.11"
9+
uv-version:
10+
description: "uv version to use"
11+
required: true
12+
default: "0.7.3"
13+
14+
runs:
15+
using: "composite"
16+
steps:
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v5
19+
with:
20+
version: ${{ inputs.uv-version }}
21+
enable-cache: "true"
22+
python-version: ${{ inputs.python-version }}
23+
cache-suffix: ${{ inputs.python-version }}
24+
25+
- name: Install Python dependencies
26+
run: uv sync --frozen
27+
shell: bash
28+
29+
- name: Check Python version and pip list
30+
run: |
31+
uv run --no-sync which python
32+
uv run --no-sync python --version
33+
uv pip list
34+
shell: bash

.github/pull_request_template.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Link to the Github issue, if applicable
2+
3+
#### Introduction
4+
5+
In the introduction, please describe the type of change introduced by the pull request and its purpose and link the GitHub issue that this pull request addresses if possible, or add any reference that would provide more context to the reviewer.
6+
7+
#### Changes
8+
9+
Please list the changes introduced by the pull request and the important design decisions that were made.
10+
11+
#### Behavior
12+
13+
How the new behavior is different from the current behavior, how you tested and how the reviewer can test it.
14+
15+
#### Review checklist
16+
17+
- [ ] All existing tests and checks pass
18+
- [ ] Unit tests covering the new feature or bugfix have been added
19+
- [ ] The documentation has been updated if necessary

.github/workflows/check.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Check
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
paths-ignore:
9+
- "**.md"
10+
workflow_dispatch: # manual button click
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-22.04
15+
16+
steps:
17+
- name: Check out repository
18+
uses: actions/checkout@v4
19+
20+
- name: Install nvcc (CUDA compiler)
21+
uses: Jimver/cuda-toolkit@v0.2.25
22+
id: cuda-toolkit
23+
with:
24+
method: "network"
25+
sub-packages: '["nvcc"]'
26+
27+
- name: Set up the environment
28+
uses: ./.github/actions/setup-python-env
29+
30+
- name: Check (lint)
31+
run: make check

.github/workflows/docs.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Docs and example-gallery
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
# To limit Actions,
9+
# don't automatically run on synchronize, but allow manual triggering
10+
types: [opened, reopened, ready_for_review]
11+
paths:
12+
- "**"
13+
- "!*.md"
14+
- "!.bumpversion.toml"
15+
- "!.gitignore"
16+
- "!.github/workflows/*.yml"
17+
- ".github/workflows/docs.yml"
18+
workflow_dispatch: # manual button click
19+
20+
defaults:
21+
run:
22+
shell: bash
23+
24+
jobs:
25+
docs:
26+
strategy:
27+
matrix:
28+
python-version: ["3.11"]
29+
# Need to use a GPU to run the example gallery
30+
os: ["linux-x64-nvidia-gpu-t4"]
31+
runs-on: ${{ matrix.os }}
32+
timeout-minutes: 10
33+
34+
steps:
35+
- name: Check out repository
36+
uses: actions/checkout@v4
37+
38+
- name: Setup CUDA environment
39+
uses: ./.github/actions/setup-cuda-python-env
40+
with:
41+
python-version: ${{ matrix.python-version }}
42+
cuda-version: "12.4.0"
43+
44+
- name: Build docs
45+
run: make docs
46+
47+
- name: Upload docs
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: docs
51+
include-hidden-files: true
52+
path: docs/_build/
53+
retention-days: 7

.github/workflows/test_cpu.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Test-CPU
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
paths:
9+
- "**"
10+
- "!**.md"
11+
- "!.bumpversion.toml"
12+
- "!.gitignore"
13+
- "!**.cu"
14+
- "!**.h"
15+
- "!CMakeLists.txt"
16+
- "!.github/workflows/*.yml"
17+
- ".github/workflows/test_cpu.yml"
18+
workflow_dispatch: # manual button click
19+
20+
defaults:
21+
run:
22+
shell: bash
23+
24+
jobs:
25+
test-cpu:
26+
strategy:
27+
matrix:
28+
python-version: ["3.11"]
29+
os: [ubuntu-22.04]
30+
runs-on: ${{ matrix.os }}
31+
timeout-minutes: 15
32+
33+
steps:
34+
- name: Check out repository
35+
uses: actions/checkout@v4
36+
37+
- name: Install nvcc (CUDA compiler)
38+
uses: Jimver/cuda-toolkit@v0.2.25
39+
id: cuda-toolkit
40+
with:
41+
method: "network"
42+
sub-packages: '["nvcc"]'
43+
44+
- name: Set up the environment
45+
uses: ./.github/actions/setup-python-env
46+
with:
47+
python-version: ${{ matrix.python-version }}
48+
49+
- name: Run CPU-only unit tests
50+
run: uv run --group test --group array pytest tests -v -s -m "no_cuda"

0 commit comments

Comments
 (0)