feat: add curated Draän example world
Rust CI Epoch Forge passed all CI checks.
Gitea/epoch_forge/pipeline/head This commit looks good
Details
Rust CI Epoch Forge passed all CI checks.
Gitea/epoch_forge/pipeline/head This commit looks good
Details
This commit is contained in:
parent
41abf73006
commit
fc6c28e67b
|
|
@ -32,3 +32,7 @@ tarpaulin-report.html
|
|||
|
||||
# Local repositories used for manual CLI testing and IDE inspection.
|
||||
/.local/
|
||||
|
||||
# Local source material used to curate examples. Finished examples belong in
|
||||
# /examples and remain tracked.
|
||||
/ressources/
|
||||
|
|
|
|||
|
|
@ -35,6 +35,12 @@ fuzzing, configuration, rendering, and release-asset contract is approved in
|
|||
Embedded and override configuration, deterministic generation, safe CLI apply,
|
||||
packaging, and default/portable release gates passed on 2026-09-21.
|
||||
|
||||
**Example checkpoint — curated Draän base world: complete.** A clean,
|
||||
committed repository with a copied 3840×2160 map, 50 positioned entities, lore,
|
||||
governance links, and active events is tracked under
|
||||
[`examples/ravenous-draan`](examples/ravenous-draan/README.md). Integration
|
||||
tests open it as a real repository and validate its map and world invariants.
|
||||
|
||||
## Phase 0 — audit and guardrails
|
||||
|
||||
- [x] Inventory workspace crates, commands, persistence files, CI, and tests.
|
||||
|
|
@ -246,6 +252,9 @@ These require user approval and are not part of the current implementation:
|
|||
2026-09-21.
|
||||
- The worldgen foundation raised coverage to 93 default-feature tests and 89
|
||||
portable-output tests; strict Clippy and both release builds still pass.
|
||||
- Local source material under `ressources/` is ignored; the curated Draän
|
||||
example remains tracked and carries a warning about its provisional reserved
|
||||
setting/map rights.
|
||||
- The milestone-only `rust_autobadges` run was attempted, but this installed
|
||||
version misreported passing tests as failing and coverage as unavailable.
|
||||
Its false generated badges were discarded; the prior badges were preserved.
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ glyphs. Press `?` for its complete keyboard reference.
|
|||
- [Architecture and development](docs/architecture.md)
|
||||
- [TUI scope and keyboard guide](docs/tui-design.md)
|
||||
- [Roadmap and proposed stretch goals](docs/roadmap.md)
|
||||
- [Ready-to-use Draän example world](examples/ravenous-draan/README.md)
|
||||
- [Contributor/agent rules](AGENTS.md) and [working task list](AGENTS-TASKS.md)
|
||||
|
||||
## Development
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"format_version": {
|
||||
"major": 1,
|
||||
"minor": 0
|
||||
},
|
||||
"repository_id": "5834208c-09ff-4fe9-b202-034652c3d485",
|
||||
"epoch_id": {
|
||||
"id": 1
|
||||
},
|
||||
"next_epoch_id": {
|
||||
"id": 2
|
||||
},
|
||||
"version": "0.1.0",
|
||||
"tags": {}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
# Draän example world
|
||||
|
||||
This is a ready-to-use Epoch Forge repository built from the local Ravenous
|
||||
development material. It is both a realistic regression fixture and a base
|
||||
world that can be copied elsewhere and changed freely.
|
||||
|
||||
```sh
|
||||
cp -a examples/ravenous-draan /tmp/my-draan
|
||||
cd /tmp/my-draan
|
||||
efo status
|
||||
efo show
|
||||
```
|
||||
|
||||
The checked-out state contains the known settlements shown on `map.png`, key
|
||||
organisations, roaming hunters, representative creatures and calamities, and
|
||||
several active world events. Positions use map percentages (`0..100`) from the
|
||||
top-left corner, so they remain meaningful at any rendered resolution.
|
||||
|
||||
The repository includes a committed baseline and a clean worktree/index. Make
|
||||
an epoch before experimentation, or edit and use the ordinary `stage`,
|
||||
`restore`, `commit`, `switch`, and `revert` workflows.
|
||||
|
||||
## Source note
|
||||
|
||||
Names, descriptions, coordinates, and `map.png` were adapted from the Ravenous
|
||||
development sources supplied alongside this checkout by Dandaedre. The source
|
||||
tree is intentionally ignored because it is working material; this curated
|
||||
fixture is tracked. The supplied Ravenous notice reserves setting lore and the
|
||||
map and describes artwork as provisional, so this example must not be treated
|
||||
as independently reusable or redistributable game content without the rights
|
||||
holder's permission.
|
||||
|
||||
The map was inspected when this fixture was assembled: it is a 3840×2160 map
|
||||
of the known Draän regions, with a 0–500 km scale and labelled settlements.
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"epoch_id": {
|
||||
"id": 0
|
||||
},
|
||||
"parent_epoch": null,
|
||||
"commit_message": "",
|
||||
"rng_seed": 0,
|
||||
"tags": {
|
||||
"inner": []
|
||||
},
|
||||
"summary": "",
|
||||
"events": [],
|
||||
"characters": [],
|
||||
"organizations": [],
|
||||
"towns": [],
|
||||
"calamities": [],
|
||||
"blockers": []
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 15 MiB |
|
|
@ -274,10 +274,10 @@ impl FromStr for ListStats {
|
|||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
match s.to_ascii_lowercase().as_str() {
|
||||
"dem" | "demog" | "demographics" | "demo" => Ok(ListStats::Demographics),
|
||||
"pop" | "popul" | "populations" => Ok(ListStats::Population),
|
||||
"grow" | "grw" | "growth" => Ok(ListStats::Growthrate),
|
||||
"cri" | "crim" | "crimes" => Ok(ListStats::Crime),
|
||||
"hapn" | "happines" | "hap" => Ok(ListStats::Happiness),
|
||||
"pop" | "popul" | "population" | "populations" => Ok(ListStats::Population),
|
||||
"grow" | "grw" | "growth" | "growthrate" => Ok(ListStats::Growthrate),
|
||||
"cri" | "crim" | "crime" | "crimes" => Ok(ListStats::Crime),
|
||||
"hapn" | "happiness" | "happines" | "hap" => Ok(ListStats::Happiness),
|
||||
"eco" | "economy" | "econ" => Ok(ListStats::Economy),
|
||||
"food" | "fo" | "agr" | "agri" | "fod" => Ok(ListStats::Food),
|
||||
"industry" | "indus" | "ind" => Ok(ListStats::Industry),
|
||||
|
|
|
|||
|
|
@ -255,6 +255,18 @@ fn test_liststats_aliases() {
|
|||
assert_snapshot!(output);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn documented_full_stat_names_parse() {
|
||||
for (name, expected) in [
|
||||
("population", stats::ListStats::Population),
|
||||
("growthrate", stats::ListStats::Growthrate),
|
||||
("crime", stats::ListStats::Crime),
|
||||
("happiness", stats::ListStats::Happiness),
|
||||
] {
|
||||
assert_eq!(name.parse::<stats::ListStats>().expect(name), expected);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_liststats_unknown_alias() {
|
||||
// Pick a string that is not in the list of known aliases.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
use std::{fs, path::PathBuf};
|
||||
|
||||
use lib_efo::{epoch::EpochId, workspace::Workspace};
|
||||
|
||||
fn example_root() -> PathBuf {
|
||||
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../examples/ravenous-draan")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn curated_draan_world_is_a_clean_usable_repository() {
|
||||
let root = example_root();
|
||||
let workspace = Workspace::open(&root).expect("open curated example");
|
||||
|
||||
assert_eq!(workspace.head.epoch_id, EpochId::new(1));
|
||||
assert!(!workspace.has_staged_changes());
|
||||
assert!(!workspace.has_unstaged_changes());
|
||||
assert_eq!(workspace.head.towns.len(), 23);
|
||||
assert_eq!(workspace.head.characters.len(), 6);
|
||||
assert_eq!(workspace.head.organizations.len(), 5);
|
||||
assert_eq!(workspace.head.calamities.len(), 7);
|
||||
assert_eq!(workspace.head.blockers.len(), 4);
|
||||
assert_eq!(workspace.head.events.len(), 5);
|
||||
|
||||
let entities = workspace
|
||||
.head
|
||||
.towns
|
||||
.iter()
|
||||
.chain(&workspace.head.characters)
|
||||
.chain(&workspace.head.organizations)
|
||||
.chain(&workspace.head.calamities)
|
||||
.chain(&workspace.head.blockers)
|
||||
.chain(&workspace.head.events);
|
||||
for entity in entities {
|
||||
assert!(
|
||||
!entity.description.trim().is_empty(),
|
||||
"{} needs lore",
|
||||
entity.name
|
||||
);
|
||||
let position = serde_json::to_value(entity.position()).expect("serialize position");
|
||||
let coordinates = position.as_array().expect("position coordinate pair");
|
||||
for coordinate in coordinates {
|
||||
assert!(
|
||||
(0..=100).contains(&coordinate.as_i64().expect("integer coordinate")),
|
||||
"{} position is on the percentage map",
|
||||
entity.name
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn curated_draan_map_is_the_expected_png() {
|
||||
let bytes = fs::read(example_root().join("map.png")).expect("read example map");
|
||||
assert_eq!(&bytes[..8], b"\x89PNG\r\n\x1a\n");
|
||||
|
||||
let width = u32::from_be_bytes(bytes[16..20].try_into().expect("PNG width"));
|
||||
let height = u32::from_be_bytes(bytes[20..24].try_into().expect("PNG height"));
|
||||
assert_eq!((width, height), (3840, 2160));
|
||||
}
|
||||
Loading…
Reference in New Issue