You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository implements weather-routing optimization with JAX and CMA-ES. Keep changes focused, reproducible, and validated.
4
+
5
+
Write and reason in English.
6
+
7
+
## Required Workflow
8
+
9
+
1. Read relevant source files and matching tests before editing.
10
+
2. Make the smallest change that satisfies the request.
11
+
3. Add or update tests when behavior changes.
12
+
4. After each update, run both commands:
13
+
-`make hooks`
14
+
-`make test`
15
+
5. If either command fails, fix the issues and rerun both commands.
16
+
6. Do not finalize work until both commands pass.
17
+
18
+
## Code Conventions
19
+
20
+
- Use the repository toolchain (`uv` via `make` targets).
21
+
- Preserve existing public APIs unless the request explicitly requires a breaking change.
22
+
- Follow `ruff` and `pytest` settings in `pyproject.toml`.
23
+
- Keep docstrings in NumPy style for public functions.
24
+
- Prefer vectorized/JAX-friendly implementations in performance-sensitive code paths.
25
+
26
+
## Testing Conventions
27
+
28
+
- Place tests in `tests/` near the relevant domain file.
29
+
- For bug fixes, add a regression test first whenever practical.
30
+
- Keep tests deterministic and lightweight unless a larger benchmark is explicitly requested.
31
+
32
+
## Data and Artifacts
33
+
34
+
- Do not commit large generated outputs.
35
+
- Treat `data/` contents as potentially large and optional in local environments.
36
+
- Fail with clear error messages when optional datasets are missing.
37
+
38
+
## Permissions
39
+
40
+
- Make sure you have the necessary permissions to push to the repository. If you do not have permissions, stop and ask for them, guiding the user to the appropriate process to gain access.
41
+
- You can add, commit and push changes to this repository. Never commit to 'main' or 'swopp' branches directly.
42
+
- If you are on 'main' or 'swopp', create a new branch for your changes and open a pull request for review.
43
+
- Create tests before implementing new features or fixing bugs. Tests should be in the `tests/` directory and follow existing patterns.
44
+
- Make sure to run all tests and hooks before pushing your changes. If you encounter any issues, please fix them before pushing.
45
+
- Do small commits, preferably one per logical change. This makes it easier to review and understand the history of changes.
-[prettier](https://prettier.io/): format YAML and Markdown
23
23
-[codespell](https://github.com/codespell-project/codespell): check spelling in source code
24
24
25
+
## Documentation
26
+
27
+
-[Parametric Performance Model](docs/parametric_model.md) — closed-form RISE model for ship power prediction (hull, wind, wave, and wingsail components).
28
+
25
29
## Installation
26
30
27
31
### Application
@@ -38,7 +42,18 @@ Install package and pinned dependencies with the [`uv`](https://docs.astral.sh/u
38
42
uv sync
39
43
```
40
44
41
-
4. Run any command or Python script with `uv run`, for instance:
45
+
4. (Optional) Install the SWOPP3 performance model:
If the pre-built wheels are available locally in `release_package/wheels/`,
52
+
`uv` will resolve `swopp3-performance-model` from that directory. Wheels are
53
+
available for Python 3.10 – 3.13 on Linux (manylinux) and Windows
54
+
(win_amd64).
55
+
56
+
5. Run any command or Python script with `uv run`, for instance:
42
57
43
58
```{bash}
44
59
uv run routetools/cmaes.py
@@ -50,63 +65,6 @@ Install package and pinned dependencies with the [`uv`](https://docs.astral.sh/u
50
65
source .venv/bin/activate
51
66
```
52
67
53
-
### Git credentials for VCS dependencies
54
-
55
-
When `uv` installs a package from a git repository (VCS dependency), Git may need credentials to fetch the remote. On non-interactive environments this commonly fails with:
56
-
57
-
```bash
58
-
fatal: could not read Username for'https://github.com': terminal prompts disabled
59
-
```
60
-
61
-
Use one of the following approaches to make VCS fetches non-interactive.
If you run `uv` from PowerShell on Windows, ensure the Windows SSH agent is running and the key is loaded (Start-Service ssh-agent; ssh-add $env:USERPROFILE\\.ssh\\id_ed25519), or run `uv` from WSL where the key was created.
89
-
90
-
**Option B: HTTPS with credentials (fallback)**
91
-
92
-
Use Git Credential Manager or GitHub CLI to cache credentials so Git won't prompt:
0 commit comments