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
16 changes: 8 additions & 8 deletions .github/workflows/test_client_windows_nightlies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
run: >-
python -m pytest -x
-m object_removal -m 'not unix' -c /dev/null -p no:warnings
-m 'object_removal and not unix' -c /dev/null -p no:warnings
-n 0 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
dispatch_tests:
runs-on: windows-latest
Expand All @@ -85,7 +85,7 @@ jobs:
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
run: >-
python -m pytest -x
-m dispatch -m 'not unix' -c /dev/null -p no:warnings
-m 'dispatch and not unix' -c /dev/null -p no:warnings
-n 0 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
run_tests_online:
runs-on: windows-latest
Expand All @@ -110,7 +110,7 @@ jobs:
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
run: >-
python -m pytest -x
-m run -m online -m 'not unix' -c /dev/null -p no:warnings
-m run -m 'online and not unix' -c /dev/null -p no:warnings
-n 0 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
run_tests_offline:
runs-on: windows-latest
Expand All @@ -135,7 +135,7 @@ jobs:
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
run: >-
python -m pytest -x
-m run -m offline -m 'not unix' -c /dev/null -p no:warnings
-m run -m 'offline and not unix' -c /dev/null -p no:warnings
-n 0 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
config_tests:
runs-on: windows-latest
Expand All @@ -159,7 +159,7 @@ jobs:
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
run: >-
python -m pytest -x
-m config -m 'not unix' -c /dev/null -p no:warnings
-m 'config and not unix' -c /dev/null -p no:warnings
-n 0 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
executor_tests:
runs-on: windows-latest
Expand All @@ -183,7 +183,7 @@ jobs:
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
run: >-
python -m pytest -x
-m executor -n 'not unix' -c /dev/null -p no:warnings
-m 'executor and not unix' -c /dev/null -p no:warnings
-n 0 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
api_tests:
runs-on: windows-latest
Expand All @@ -207,7 +207,7 @@ jobs:
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
run: >-
python -m pytest -x
-m api -m 'not unix' -c /dev/null -p no:warnings
-m 'api and not unix' -c /dev/null -p no:warnings
-n 0 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
local_tests:
runs-on: windows-latest
Expand All @@ -231,5 +231,5 @@ jobs:
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
run: >-
python -m pytest -x
-m local -m 'not unix' -c /dev/null -p no:warnings
-m 'local and not unix' -c /dev/null -p no:warnings
-n 0 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Improves handling of Conda based environments in metadata collection.
- Adds additional options to `Client.get_runs`.
- Added ability to include environment variables within metadata for runs.
- Improves checks on `offline.cache` directory specification in config file.

## [v2.1.2](https://github.com/simvue-io/client/releases/tag/v2.1.2) - 2025-06-25

Expand Down
12 changes: 7 additions & 5 deletions simvue/config/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""

import logging
import re
import os
import time
import pydantic
import typing
Expand Down Expand Up @@ -53,10 +53,12 @@ class OfflineSpecifications(pydantic.BaseModel):
@pydantic.field_validator("cache")
@classmethod
def check_valid_cache_path(cls, cache: pathlib.Path) -> pathlib.Path:
if not re.fullmatch(
r"^(\/|([a-zA-Z]:\\))?([\w\s.-]+[\\/])*[\w\s.-]*$", f"{cache}"
):
raise AssertionError(f"Value '{cache}' is not a valid cache path.")
if not cache.parent.exists():
raise FileNotFoundError(f"No such directory '{cache.parent}'.")
if not cache.parent.is_dir():
raise FileNotFoundError(f"'{cache.parent}' is not a directory.")
if not os.access(cache.parent, os.W_OK):
raise AssertionError(f"'{cache.parent}' is not a writable location.")
return cache


Expand Down
Loading