Add experimental feature to use a hash as sim_dir.#107
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an experimental option to generate Simulation.sim_dir from a hash of the full resolved parameter set, aiming to shorten directory names compared to the current directory_name(...) scheme.
Changes:
- Add
sim_dir_hashkwarg toSimulation.__init__to enable hashed directory naming. - Introduce
simple_hash()(FNV-1a 32-bit) anddirectory_name_hash()to compute the hashed directory name. - Update
Simulationdocstring to document the experimental feature and its cautions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (1)
py_alf/simulation.py:16
- Import order is not isort/ruff-compliant after adding
json/hashlib(CI runsruff checkwithIenabled). Please sort the standard-library imports (e.g.,hashlibshould come beforejson, and the rest should be alphabetized within the stdlib block).
import hashlib
import json
import os
import re
import shutil
import subprocess
import tempfile
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
70d3b98 to
8f92b5c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.