Skip to content

Commit 6890d8b

Browse files
khushalkottaruGui-FernandesBR
authored andcommitted
chore: added personal toolkit files
1 parent 6ae5708 commit 6890d8b

6 files changed

Lines changed: 497 additions & 0 deletions

File tree

.coderabbit

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
3+
language: "en-US"
4+
5+
reviews:
6+
profile: "assertive"
7+
poem: false
8+
in_progress_fortune: false
9+
10+
auto_review:
11+
enabled: true
12+
drafts: false
13+
ignore_title_keywords:
14+
- "wip"
15+
- "do not review"
16+
17+
path_instructions:
18+
- path: "**/*.py"
19+
instructions: |
20+
This is RocketPy, a scientific Python rocket trajectory simulator.
21+
- Docstrings must use NumPy format with parameter types (e.g. `x : float`) but no units in the type field
22+
- Do not add type hints to function signatures — the codebase does not use them
23+
- No magic numbers without a comment explaining what they represent
24+
- Flag any new public function or class missing a NumPy docstring
25+
- Flag any logic that duplicates existing RocketPy utilities
26+
27+
- path: "tests/**"
28+
instructions: |
29+
Tests use pytest with pytest.approx for float comparisons, not plain == or np.isclose.
30+
Flag any float assertion that does not use pytest.approx.
31+
Test names should describe the scenario being tested, not just the function name.
32+
33+
finishing_touches:
34+
docstrings:
35+
enabled: true
36+
unit_tests:
37+
enabled: true
38+
39+
knowledge_base:
40+
web_search:
41+
enabled: true
42+
learnings:
43+
scope: auto
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# .github/workflows/sync-upstream.yml
2+
# Syncs your fork's default branch with the upstream repo daily.
3+
# Also runs on manual trigger via workflow_dispatch.
4+
#
5+
# Setup:
6+
# 1. Copy this file to .github/workflows/sync-upstream.yml in your fork
7+
# 2. Set the UPSTREAM_REPO variable below to the upstream owner/repo
8+
9+
name: Sync fork with upstream
10+
11+
on:
12+
schedule:
13+
- cron: '0 12 * * *' # 5:00 AM PT daily (runs before Jules scout at 6)
14+
workflow_dispatch: # manual trigger from Actions tab
15+
16+
env:
17+
UPSTREAM_REPO: RocketPy-Team/RocketPy # change per fork
18+
BRANCH: main # change if upstream uses 'main'
19+
20+
jobs:
21+
sync:
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: write
25+
26+
steps:
27+
- name: Checkout fork
28+
uses: actions/checkout@v4
29+
with:
30+
ref: ${{ env.BRANCH }}
31+
fetch-depth: 0
32+
33+
- name: Add upstream remote
34+
run: git remote add upstream https://github.com/${{ env.UPSTREAM_REPO }}.git
35+
36+
- name: Fetch upstream
37+
run: git fetch upstream ${{ env.BRANCH }}
38+
39+
- name: Rebase on upstream
40+
run: |
41+
git config user.name "github-actions[bot]"
42+
git config user.email "github-actions[bot]@users.noreply.github.com"
43+
git rebase upstream/${{ env.BRANCH }}
44+
45+
- name: Push to fork
46+
run: git push origin ${{ env.BRANCH }} --force-with-lease

AGENTS.md

Whitespace-only changes.

CLAUDE.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Commands
6+
7+
```bash
8+
# Install dependencies
9+
make install
10+
11+
# Run tests
12+
make pytest # standard test suite
13+
make pytest-slow # slow/marked tests with verbose output
14+
make coverage # tests with coverage
15+
16+
# Lint and format
17+
make format # ruff format + isort
18+
make lint # ruff + pylint
19+
make ruff-lint # ruff only
20+
make pylint # pylint only
21+
22+
# Docs
23+
make build-docs
24+
```
25+
26+
**Run a single test file:**
27+
```bash
28+
pytest tests/unit/test_environment.py -v
29+
```
30+
31+
**Run a single test by name:**
32+
```bash
33+
pytest tests/unit/test_environment.py::test_methodname_expectedbehaviour -v
34+
```
35+
36+
## Architecture
37+
38+
RocketPy simulates 6-DOF rocket trajectories. The core workflow is linear:
39+
40+
```
41+
Environment → Motor → Rocket → Flight
42+
```
43+
44+
**`rocketpy/environment/`** — Atmospheric models, weather data fetching (NOAA, Wyoming soundings, GFS forecasts). The `Environment` class (~116KB) is the entry point for atmospheric conditions.
45+
46+
**`rocketpy/motors/`**`Motor` is the base class. `SolidMotor`, `HybridMotor`, and `LiquidMotor` extend it. `Tank`, `TankGeometry`, and `Fluid` support liquid/hybrid propellant modeling.
47+
48+
**`rocketpy/rocket/`**`Rocket` aggregates a motor and aerodynamic surfaces. `aero_surface/` contains fins, nose cone, and tail implementations. `Parachute` uses trigger functions for deployment.
49+
50+
**`rocketpy/simulation/`**`Flight` (~162KB) is the simulation engine, integrating equations of motion with scipy's LSODA solver. `MonteCarlo` orchestrates many `Flight` runs for dispersion analysis.
51+
52+
**`rocketpy/stochastic/`** — Wraps any component (Environment, Rocket, Motor, Flight) with uncertainty distributions for Monte Carlo input generation.
53+
54+
**`rocketpy/mathutils/`**`Function` class wraps callable data (arrays, lambdas, files) with interpolation and mathematical operations. Heavily used throughout for aerodynamic curves, thrust profiles, etc.
55+
56+
**`rocketpy/plots/` and `rocketpy/prints/`** — Visualization and text output, each mirroring the module structure of the core classes.
57+
58+
**`rocketpy/sensors/`** — Simulated sensors (accelerometer, gyroscope, barometer, GNSS) that can be attached to a `Rocket`.
59+
60+
**`rocketpy/sensitivity/`** — Global sensitivity analysis via `SensitivityModel`.
61+
62+
## Coding Standards
63+
64+
- **Docstrings:** NumPy style with `Parameters`, `Returns`, and `Examples` sections. Always include units for physical quantities (e.g., "in meters", "in radians").
65+
- **No type hints in function signatures** — put types in the docstring `Parameters` section instead.
66+
- **SI units by default** throughout the codebase (meters, kilograms, seconds, radians).
67+
- **No magic numbers** — name constants with `UPPER_SNAKE_CASE` and comment their physical meaning.
68+
- **Performance:** Use vectorized numpy operations. Cache expensive computations with `cached_property`.
69+
- **Test names:** `test_methodname_expectedbehaviour` pattern. Use `pytest.approx` for float comparisons.
70+
- **Tests follow AAA** (Arrange, Act, Assert) with fixtures from `tests/fixtures/`.
71+
- **Backward compatibility:** Use deprecation warnings before removing public API features; document changes in CHANGELOG.

0 commit comments

Comments
 (0)