refactor: update Python version and optimize dice configuration parameters

This commit is contained in:
2026-03-24 23:01:45 -03:00
parent 0763c4a9e1
commit 0470200d00
12 changed files with 228 additions and 233 deletions

View File

@@ -1,36 +1,35 @@
from pathlib import Path
from typing import Any
import pytest
from diceplayer.config import PlayerConfig
from diceplayer.environment import System
from diceplayer.utils.potential import read_system_from_phb
import pytest
class TestPotential:
@pytest.fixture
def player_config(self) -> PlayerConfig:
return PlayerConfig.model_validate({
"type": "both",
"mem": 12,
"max_cyc": 100,
"switch_cyc": 50,
"ncores": 4,
"dice": {
"nprocs": 4,
"ljname": "phb.ljc.example",
"outname": "test",
"dens": 1.0,
"nmol": [12, 16],
"nstep": [1, 1],
},
"gaussian": {
"level": "test",
"qmprog": "g16",
"keywords": "test",
},
})
return PlayerConfig.model_validate(
{
"type": "both",
"mem": 12,
"max_cyc": 100,
"switch_cyc": 50,
"ncores": 4,
"dice": {
"nprocs": 4,
"ljname": "phb.ljc.example",
"outname": "test",
"dens": 1.0,
"nmol": [12, 16],
"nstep": [1, 1],
},
"gaussian": {
"level": "test",
"qmprog": "g16",
"keywords": "test",
},
}
)
def test_read_phb(self, player_config: PlayerConfig):
system = read_system_from_phb(player_config)