File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55- Improves handling of Conda based environments in metadata collection.
66- Adds additional options to ` Client.get_runs ` .
77- Added ability to include environment variables within metadata for runs.
8+ - Improves checks on ` offline.cache ` directory specification in config file.
89
910## [ v2.1.2] ( https://github.com/simvue-io/client/releases/tag/v2.1.2 ) - 2025-06-25
1011
Original file line number Diff line number Diff line change 77"""
88
99import logging
10- import re
10+ import os
1111import time
1212import pydantic
1313import typing
@@ -53,10 +53,12 @@ class OfflineSpecifications(pydantic.BaseModel):
5353 @pydantic .field_validator ("cache" )
5454 @classmethod
5555 def check_valid_cache_path (cls , cache : pathlib .Path ) -> pathlib .Path :
56- if not re .fullmatch (
57- r"^(\/|([a-zA-Z]:\\))?([\w\s.-]+[\\/])*[\w\s.-]*$" , f"{ cache } "
58- ):
59- raise AssertionError (f"Value '{ cache } ' is not a valid cache path." )
56+ if not cache .parent .exists ():
57+ raise FileNotFoundError (f"No such directory '{ cache .parent } '." )
58+ if not cache .parent .is_dir ():
59+ raise FileNotFoundError (f"'{ cache .parent } ' is not a directory." )
60+ if not os .access (cache .parent , os .W_OK ):
61+ raise AssertionError (f"'{ cache .parent } ' is not a writable location." )
6062 return cache
6163
6264
You can’t perform that action at this time.
0 commit comments