Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
> **Warning**
This repository is experimental and bare-bones at the moment. It's not ready
for use, but discussions and contributions are welcome!
for general use, but discussions and contributions are welcome!

# Celeritas Python interface

Expand Down
26 changes: 16 additions & 10 deletions celerpy/conf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
from typing import Optional

from pydantic import DirectoryPath
from pydantic import DirectoryPath, FilePath
from pydantic_settings import BaseSettings, SettingsConfigDict

from celerpy.model import LogLevel
Expand All @@ -24,26 +24,32 @@ class Settings(BaseSettings):
use_attribute_docstrings=True,
)

prefix_path: Optional[DirectoryPath] = None
"Path to the Celeritas build/install directory"

# CELER_ environment variables

color: bool = True
"Enable colorized terminal output"

disable_device: bool = False
"Disable GPU execution even if available"

g4org_export: Optional[str] = None
"Filename base to export converted Geant4 geometry"

g4org_verbose: bool = False
"Filename base to export converted Geant4 geometry"

log: LogLevel = LogLevel.INFO
"World log level"

log_local: LogLevel = LogLevel.WARNING
"Self log level"

prefix_path: Optional[DirectoryPath] = None
"Path to the Celeritas build/install directory"

profiling: bool = False
"Enable NVTX/ROCTX/Perfetto profiling"

# Geant4->ORANGE conversion

g4org_options: Optional[FilePath] = None
"JSON file with conversion options"

# Geant4 configuration

g4_geo_optimize: bool = True
"Build Geant4 tracking acceleration structures"
174 changes: 0 additions & 174 deletions celerpy/model.py

This file was deleted.

41 changes: 41 additions & 0 deletions celerpy/model/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 2024 UT-Battelle, LLC, and other Celeritas developers.
# See the top-level LICENSE file for details.
# SPDX-License-Identifier: Apache-2.0
"""Manage models used for JSON I/O with Celeritas.

This module re-exports all models from the individual modules for backward
compatibility. For new code, prefer importing from the specific modules:
- celerpy.types: Base types, enums, and type aliases
- celerpy.input: Command and input models
- celerpy.output: Output and result models
"""

from . import input, output, types
from .input import (
ImageInput,
ModelSetup,
OrangeConversionOptions,
TraceInput,
TraceSetup,
)
from .types import (
GeometryEngine,
LogLevel,
MemSpace,
UnitSystem,
)

__all__ = [
"input",
"output",
"types",
"ImageInput",
"ModelSetup",
"OrangeConversionOptions",
"TraceInput",
"TraceSetup",
"GeometryEngine",
"LogLevel",
"MemSpace",
"UnitSystem",
]
Loading