Add Unit Test Coverage
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- python
- Área
- machine-learning, testing-qa
Línea de trabajo
Start by locating the planet generation, configuration, biome, noise, and PLY export entry points, then identify the existing test framework and run command. Add deterministic tests using small resolutions for the suggested behaviors, including mesh counts, biome classification, and export headers. Done when the documented single command runs a stable suite covering the core paths.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Add Unit Test Coverage
Summary
Add a proper unit test suite for the planet generator, noise deformation, and export pipeline. The project currently has a lot of core logic that should be covered by repeatable tests so regressions are easier to catch.
Why This Matters
- Planet generation logic is complex and easy to break unintentionally.
- Biome classification, presets, and terrain shaping have a lot of moving parts.
- Tests will make it safer to change visuals, tuning, and output formats.
- A basic test suite will help validate future refactors, including performance work and multithreading.
Suggested Test Areas
1. Configuration and Presets
- Verify each preset loads expected baseline values.
- Verify config overrides are applied correctly.
- Verify invalid values fall back to sane defaults.
2. Sphere Generation
- Verify the mesh generator returns the expected vertex and face counts for a known resolution.
- Verify the sphere is closed correctly at the longitude seam.
- Verify no invalid face indices are produced.
3. Noise Deformation
- Verify
apply_noise(...)is deterministic for the same seed and config. - Verify different seeds produce different output.
- Verify increasing amplitude changes elevation variance.
- Verify
pattern_scaleaffects terrain variation scale as expected. - Verify biome biases influence biome distribution in the expected direction.
- Verify
plains_biasincreases flatter terrain regions.
4. Biome Classification
- Verify high-temperature, high-moisture configs favor rainforest or forest.
- Verify dry configs favor desert or savanna.
- Verify cold configs favor tundra or snow.
- Verify ocean bias shifts classification toward ocean.
- Verify rock bias shifts classification toward rocky/highland biomes.
5. Planet Generation Entry Point
- Verify
generate_planet(...)returns the expected keys: vertices, faces, colors, metadata, stats. - Verify stats counts match the generated geometry.
- Verify a small known resolution produces a valid mesh and non-empty biome stats.
6. Export
- Verify PLY export writes a file.
- Verify the exported file contains the expected header fields.
- Verify vertex and face counts in the output match the generated mesh.
Sample Test Criteria
- Tests must be deterministic and not depend on random global state.
- Tests should use small resolutions so they run quickly.
- Tests should cover both normal cases and edge cases.
- Tests should fail when a regression changes mesh structure, biome assignment, or config handling.
- Tests should not rely on visual inspection.
- Performance-sensitive tests should stay lightweight enough for regular local runs and CI.
Acceptance Criteria
- A test framework is added and documented.
- Core generation paths have meaningful unit coverage.
- Tests run locally with a single command.
- The suite catches obvious regressions in presets, terrain deformation, biome logic, and export output.
- At least a few tests are deterministic and stable enough for CI.
Optional Follow-Up
- Add snapshot-style checks for generated stats.
- Add integration tests for the web API endpoints.
- Add a smoke test that generates and exports a planet from a known config.
- Lenguaje dominante
- Python
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 11 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TiElixir/Pylanet
-
Fix 3D Model Drag ViewAbiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
-
Improve texturesAbiertoenhancement help wanted
Dificultad 4/5 1-2 días Aptitud para principiantes 47/100
Todos los issues de TiElixir/Pylanet
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
-
area:other help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
WingedGuardian/GENesis-AGI#4734 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
peach-mitao/peach#693 ·
Los mantenedores suelen responder en 1 día
-
Failed result serialization destroys a previously saved JSON resultPosiblemente ocupada @chessing234 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
huggingface/evaluate#867 ·
-
FTP reads inside a transaction use a nonexistent staging pathPosiblemente ocupada @Harsh23Kashyap la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
fsspec/filesystem_spec#2463 ·
Los mantenedores suelen responder en 1 día