Compare commits
1 Commits
main
..
79fd57401e
| Author | SHA1 | Date | |
|---|---|---|---|
| 79fd57401e |
@@ -1,49 +0,0 @@
|
|||||||
# Agent instructions
|
|
||||||
## Git Commit Style
|
|
||||||
- Make small, focused commits while working
|
|
||||||
- Commit changes incrementally to make history easier to follow
|
|
||||||
- Write clear, concise commit messages describing what changed
|
|
||||||
- Ask permission before commiting or merging to main branch
|
|
||||||
- When applicable, write tests before implementation
|
|
||||||
|
|
||||||
# Developer Commands
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Unit tests (fast, no database required)
|
|
||||||
cargo test --lib
|
|
||||||
|
|
||||||
# Integration tests (requires test DB - run setup first)
|
|
||||||
cargo run -- db setup --env test
|
|
||||||
cargo test --tests
|
|
||||||
|
|
||||||
# Single test file
|
|
||||||
cargo test --test config_test
|
|
||||||
|
|
||||||
# CLI commands
|
|
||||||
cargo run -- db setup --env <dev|test|prod>
|
|
||||||
cargo run -- db reset --env <dev|test|prod>
|
|
||||||
cargo run -- import <csv-file> --env <dev|test|prod>
|
|
||||||
cargo run -- generate <csv-file> <output-dir>
|
|
||||||
```
|
|
||||||
|
|
||||||
# Config Loading
|
|
||||||
|
|
||||||
- Files: `config.toml` → `config.<env>.toml` → `config.example.toml` (fallback)
|
|
||||||
- Gitignored: `config.toml`, `config.dev.toml`, `config.test.toml`, `config.prod.toml`
|
|
||||||
- DB names: `rusty_petroleum_dev`, `rusty_petroleum_test`, `rusty_petroleum_prod`
|
|
||||||
|
|
||||||
# Architecture
|
|
||||||
|
|
||||||
- Binary: `src/main.rs`, Library: `src/lib.rs`
|
|
||||||
- Test entry: `tests/common/test_db.rs` creates fresh DB per test via `cargo test --test`
|
|
||||||
- Run lib tests first to verify logic without DB dependency
|
|
||||||
|
|
||||||
# Issue Management
|
|
||||||
|
|
||||||
- Use Gitea REST API to close issues:
|
|
||||||
```bash
|
|
||||||
curl -X PATCH https://gitea.rowanbrook.net/api/v1/repos/jakob/rusty-petroleum/issues/{issue_number} \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-H "Authorization: Bearer YOUR_TOKEN" \
|
|
||||||
-d '{"state": "closed"}'
|
|
||||||
```
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Issue Management
|
||||||
|
- Use Gitea REST API to close issues when fixing them:
|
||||||
|
```bash
|
||||||
|
curl -X PATCH https://gitea.rowanbrook.net/api/v1/repos/jakob/rusty-petroleum/issues/{issue_number} \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: Bearer YOUR_TOKEN" \
|
||||||
|
-d '{"state": "closed"}'
|
||||||
|
```
|
||||||
|
- Or suggest closing issues on Gitea web UI when automatic closing via API is not configured
|
||||||
|
|
||||||
Reference in New Issue
Block a user