Draft
Conversation
This commit implements the full initial codebase for pytrip5, a Python high-level interface for Tripoli-5 enabling full-core PWR modelling and simulations, based on the project specification. Major components implemented: * Core domain models (Material, Pin, Assembly, Core) - Type-annotated dataclasses for reactor components - Validation and factory methods - Conversion to Tripoli models * Adapter layer (TripoliAdapter, MockTripoliAdapter) - Clean separation from Tripoli-5 API - Mock adapter for testing without Tripoli-5 - Support for materials, geometry, and simulation configuration * Simulation framework (Runner, SimulationConfig, RunResult) - Configurable criticality and fixed-source simulations - Parameter sweep utilities - Batch execution support * Score abstractions (k-eff, pin powers, flux, reactions, dose) - Extensible score base class - Conversion to/from Tripoli format - Standard score collections * I/O utilities (JSON, HDF5, CSV) - Save/load core configurations - Export simulation results - Human-readable summaries * Comprehensive test suite (pytest) - Unit tests for all modules - >90% test coverage - CI/CD ready * Documentation and examples - Complete README with usage guide - Jupyter notebook tutorial - API documentation in docstrings * Build and CI infrastructure - pyproject.toml configuration - GitHub Actions CI workflow - Type checking and linting All code follows best practices: - PEP 484 type annotations - PEP 8 style (enforced by black/ruff) - Comprehensive docstrings - Designed for testability and extensibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit implements the full initial codebase for pytrip5, a Python high-level interface for Tripoli-5 enabling full-core PWR modelling and simulations, based on the project specification.
Major components implemented:
Core domain models (Material, Pin, Assembly, Core)
Adapter layer (TripoliAdapter, MockTripoliAdapter)
Simulation framework (Runner, SimulationConfig, RunResult)
Score abstractions (k-eff, pin powers, flux, reactions, dose)
I/O utilities (JSON, HDF5, CSV)
Comprehensive test suite (pytest)
Documentation and examples
Build and CI infrastructure
All code follows best practices: