Skip to content

Commit a5f60cb

Browse files
Release RadarSim 3.0 scientific simulation overhaul
1 parent 75dbd9f commit a5f60cb

101 files changed

Lines changed: 3944 additions & 8156 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 62 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -2,129 +2,87 @@ name: CI
22

33
on:
44
push:
5-
branches: [ main, develop ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
811

912
jobs:
10-
lint:
13+
quality:
1114
runs-on: ubuntu-latest
1215
steps:
13-
- uses: actions/checkout@v4
14-
15-
- name: Set up Python
16-
uses: actions/setup-python@v5
17-
with:
18-
python-version: '3.10'
19-
cache: 'pip'
20-
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install ruff
25-
26-
- name: Check formatting and lint with Ruff
27-
run: |
28-
ruff check . --select=E9,F63,F7,F82
29-
ruff format --check .
30-
31-
- name: Check complexity with Ruff (Warning only)
32-
run: |
33-
ruff check . --select C901 --exit-zero
16+
- uses: actions/checkout@v6
17+
- uses: actions/setup-python@v6
18+
with:
19+
python-version: "3.11"
20+
cache: pip
21+
- run: python -m pip install --upgrade pip
22+
- run: python -m pip install -e ".[dev]"
23+
- run: python -m ruff check src tests examples
3424

3525
test:
3626
runs-on: ubuntu-latest
3727
strategy:
28+
fail-fast: false
3829
matrix:
39-
python-version: ['3.9', '3.10', '3.11', '3.12']
40-
30+
python-version: ["3.9", "3.10", "3.11", "3.12"]
31+
steps:
32+
- uses: actions/checkout@v6
33+
- uses: actions/setup-python@v6
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
cache: pip
37+
- run: python -m pip install --upgrade pip
38+
- run: python -m pip install -e ".[dev]"
39+
- run: python -m pytest -q
40+
41+
ui-smoke:
42+
runs-on: ubuntu-latest
43+
env:
44+
QT_QPA_PLATFORM: offscreen
4145
steps:
42-
- uses: actions/checkout@v4
43-
44-
- name: Set up Python ${{ matrix.python-version }}
45-
uses: actions/setup-python@v5
46-
with:
47-
python-version: ${{ matrix.python-version }}
48-
cache: 'pip'
49-
50-
- name: Install dependencies
51-
run: |
52-
python -m pip install --upgrade pip
53-
pip install -r requirements.txt
54-
pip install pytest pytest-cov
55-
56-
- name: Test imports
57-
run: |
58-
python -c "from src.physics import RadarParameters, ITU_R_P676, SwerlingRCS"
59-
python -c "from src.tracking import LinearKalmanFilter, TrackManager"
60-
python -c "from src.physics import ECMSimulator"
61-
62-
- name: Run tests with pytest
63-
run: |
64-
pytest tests/ -v --cov=. --cov-report=xml || echo "No tests found yet"
65-
66-
- name: Upload coverage
67-
uses: codecov/codecov-action@v4
68-
if: matrix.python-version == '3.10'
69-
with:
70-
file: ./coverage.xml
71-
fail_ci_if_error: false
46+
- uses: actions/checkout@v6
47+
- uses: actions/setup-python@v6
48+
with:
49+
python-version: "3.11"
50+
cache: pip
51+
- run: python -m pip install --upgrade pip
52+
- run: python -m pip install -e ".[gui,dev]"
53+
- run: python -m pytest tests/test_ui_smoke.py -q
7254

73-
type-check:
55+
package:
7456
runs-on: ubuntu-latest
7557
steps:
76-
- uses: actions/checkout@v4
77-
78-
- name: Set up Python
79-
uses: actions/setup-python@v5
80-
with:
81-
python-version: '3.10'
82-
cache: 'pip'
83-
84-
- name: Install dependencies
85-
run: |
86-
python -m pip install --upgrade pip
87-
pip install mypy
88-
pip install -r requirements.txt
89-
90-
- name: Type check with mypy
91-
run: |
92-
mypy --ignore-missing-imports --no-strict-optional src/ || true
58+
- uses: actions/checkout@v6
59+
- uses: actions/setup-python@v6
60+
with:
61+
python-version: "3.11"
62+
cache: pip
63+
- run: python -m pip install --upgrade pip build
64+
- run: python -m build
65+
- run: python -m pip install --force-reinstall dist/*.whl
66+
- run: python -c "import src; from src.physics import RadarParameters"
9367

9468
security:
9569
runs-on: ubuntu-latest
9670
steps:
97-
- uses: actions/checkout@v4
98-
99-
- name: Set up Python
100-
uses: actions/setup-python@v5
101-
with:
102-
python-version: '3.10'
103-
cache: 'pip'
104-
105-
- name: Install Bandit
106-
run: pip install bandit
107-
108-
- name: Security check with Bandit
109-
run: |
110-
bandit -r src/ -x ./tests -ll || true
71+
- uses: actions/checkout@v6
72+
- uses: actions/setup-python@v6
73+
with:
74+
python-version: "3.11"
75+
- run: python -m pip install bandit
76+
- run: bandit -r src -x tests -ll
11177

11278
docs:
11379
runs-on: ubuntu-latest
11480
steps:
115-
- uses: actions/checkout@v4
116-
117-
- name: Set up Python
118-
uses: actions/setup-python@v5
119-
with:
120-
python-version: '3.10'
121-
cache: 'pip'
122-
123-
- name: Verify documentation exists
124-
run: |
125-
test -f README.md
126-
test -f LICENSE
127-
test -f CONTRIBUTING.md
128-
test -f CHANGELOG.md
129-
test -f docs/SCIENTIFIC_METHODOLOGY.md
130-
echo "All documentation files present!"
81+
- uses: actions/checkout@v6
82+
- uses: actions/setup-python@v6
83+
with:
84+
python-version: "3.11"
85+
cache: pip
86+
- run: python -m pip install --upgrade pip
87+
- run: python -m pip install -e ".[docs]"
88+
- run: python -m sphinx -W --keep-going -b html docs/source docs/_build/html

.github/workflows/release.yml

Lines changed: 72 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,90 @@
1-
name: Build and Release
1+
name: Release
22

33
on:
44
push:
5-
tags:
6-
- 'v*'
5+
tags: ["v*"]
76

87
permissions:
98
contents: write
109

1110
jobs:
12-
build:
13-
name: Build for ${{ matrix.os }}
11+
source-distributions:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
- uses: actions/setup-python@v6
16+
with:
17+
python-version: "3.11"
18+
- run: python -m pip install --upgrade pip build
19+
- run: python -m build
20+
- uses: actions/upload-artifact@v4
21+
with:
22+
name: python-distributions
23+
path: dist/*
24+
25+
desktop:
1426
runs-on: ${{ matrix.os }}
1527
strategy:
1628
fail-fast: false
1729
matrix:
18-
os: [ubuntu-latest, windows-latest, macos-latest]
1930
include:
20-
- os: ubuntu-latest
21-
artifact_name: RadarSim_Linux
22-
asset_name: RadarSim_v${{ github.ref_name }}_Linux.tar.gz
2331
- os: windows-latest
24-
artifact_name: RadarSim_Windows
25-
asset_name: RadarSim_v${{ github.ref_name }}_Windows.zip
32+
platform: Windows_x86_64
33+
executable: build/RadarSim.exe
34+
- os: ubuntu-latest
35+
platform: Linux_x86_64
36+
executable: build/RadarSim.bin
2637
- os: macos-latest
27-
artifact_name: RadarSim_macOS
28-
asset_name: RadarSim_v${{ github.ref_name }}_macOS.zip
29-
38+
platform: macOS_arm64
39+
executable: build/RadarSim.bin
3040
steps:
31-
- uses: actions/checkout@v4
32-
33-
- name: Set up Python
34-
uses: actions/setup-python@v5
35-
with:
36-
python-version: '3.10'
37-
cache: 'pip'
38-
39-
- name: Install dependencies
40-
run: |
41-
python -m pip install --upgrade pip
42-
pip install -r requirements.txt
43-
44-
- name: Install System Dependencies (Linux)
45-
if: matrix.os == 'ubuntu-latest'
46-
run: |
47-
sudo apt-get update
48-
sudo apt-get install -y patchelf ccache libgl1 libegl1 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2t64 libxi6 libxtst6
49-
50-
- uses: Nuitka/Nuitka-Action@main
51-
with:
52-
nuitka-version: main
53-
script-name: run_gui.py
54-
mode: onefile
55-
enable-plugins: pyside6
56-
output-file: RadarSim
57-
58-
- name: Package Windows
59-
if: matrix.os == 'windows-latest'
60-
run: |
61-
powershell Compress-Archive -Path build/* -DestinationPath ${{ matrix.asset_name }}
62-
63-
- name: Package Linux
64-
if: matrix.os == 'ubuntu-latest'
65-
run: |
66-
tar -czvf ${{ matrix.asset_name }} -C build/ .
67-
68-
- name: Package macOS
69-
if: matrix.os == 'macos-latest'
70-
run: |
71-
cd build && zip -r ../${{ matrix.asset_name }} .
72-
73-
- name: Upload Artifact
74-
uses: actions/upload-artifact@v4
75-
with:
76-
name: ${{ matrix.artifact_name }}
77-
path: ${{ matrix.asset_name }}
78-
79-
release:
80-
name: Create Release
81-
needs: build
41+
- uses: actions/checkout@v6
42+
- uses: actions/setup-python@v6
43+
with:
44+
python-version: "3.11"
45+
cache: pip
46+
- run: python -m pip install --upgrade pip
47+
- run: python -m pip install -e ".[gui]"
48+
- name: Install Linux system libraries
49+
if: runner.os == 'Linux'
50+
run: |
51+
sudo apt-get update
52+
sudo apt-get install -y patchelf libgl1 libegl1 libxkbcommon-x11-0 libxcb-cursor0
53+
- uses: Nuitka/Nuitka-Action@main
54+
with:
55+
nuitka-version: stable
56+
script-name: run_gui.py
57+
mode: onefile
58+
enable-plugins: pyside6
59+
include-data-dir: scenarios=scenarios
60+
output-file: RadarSim
61+
- name: Package Windows
62+
if: runner.os == 'Windows'
63+
shell: pwsh
64+
run: Compress-Archive -Path '${{ matrix.executable }}', README.md, LICENSE -DestinationPath 'RadarSim_${{ github.ref_name }}_${{ matrix.platform }}.zip'
65+
- name: Package Unix
66+
if: runner.os != 'Windows'
67+
run: tar -czf "RadarSim_${{ github.ref_name }}_${{ matrix.platform }}.tar.gz" "${{ matrix.executable }}" README.md LICENSE
68+
- uses: actions/upload-artifact@v4
69+
with:
70+
name: RadarSim_${{ matrix.platform }}
71+
path: RadarSim_${{ github.ref_name }}_${{ matrix.platform }}.*
72+
73+
publish:
74+
needs: [source-distributions, desktop]
8275
runs-on: ubuntu-latest
8376
steps:
84-
- name: Download Artifacts
85-
uses: actions/download-artifact@v4
86-
with:
87-
merge-multiple: true
88-
89-
- name: Create GitHub Release
90-
uses: softprops/action-gh-release@v2
91-
with:
92-
files: |
93-
RadarSim_v*_Linux.tar.gz
94-
RadarSim_v*_Windows.zip
95-
RadarSim_v*_macOS.zip
96-
name: RadarSim ${{ github.ref_name }}
97-
draft: false
98-
prerelease: false
99-
body: |
100-
## 🚀 RadarSim ${{ github.ref_name }} Official Release
101-
102-
Automated cross-platform build for Windows, Linux, and macOS.
103-
104-
### 📦 Installation:
105-
1. Download the archive for your operating system.
106-
2. Extract the contents.
107-
3. Run the `RadarSim` executable.
108-
109-
---
110-
*Scientifically accurate radar simulation engine.*
111-
env:
112-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
- uses: actions/download-artifact@v4
78+
with:
79+
merge-multiple: true
80+
path: release-assets
81+
- name: Generate checksums
82+
working-directory: release-assets
83+
run: find . -type f ! -name SHA256SUMS -print0 | sort -z | xargs -0 sha256sum > SHA256SUMS
84+
- uses: softprops/action-gh-release@v3
85+
with:
86+
name: RadarSim ${{ github.ref_name }}
87+
body_path: RELEASE_NOTES.md
88+
files: release-assets/**/*
89+
generate_release_notes: true
90+
fail_on_unmatched_files: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pip-delete-this-directory.txt
3535

3636
# Unit test / coverage reports
3737
htmlcov/
38+
docs/_build/
3839
.tox/
3940
.nox/
4041
.coverage

0 commit comments

Comments
 (0)