Skip to content

Commit 7cdd88c

Browse files
committed
Merge branch 'dev' into kzscisoft/handle-config-traceback
2 parents 09396b0 + 988edf3 commit 7cdd88c

File tree

10 files changed

+163
-13
lines changed

10 files changed

+163
-13
lines changed

.github/workflows/test_client_macos_nightlies.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,30 @@ jobs:
161161
python -m pytest -x
162162
-m config -c /dev/null -p no:warnings
163163
-n 8 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
164+
scenario_tests:
165+
runs-on: ubuntu-latest
166+
timeout-minutes: 30
167+
steps:
168+
- uses: actions/checkout@v5
169+
- name: Set up Python 3.14
170+
uses: actions/setup-python@v6
171+
with:
172+
python-version: "3.14"
173+
- name: Install dependencies
174+
run: |
175+
python -m pip install poetry
176+
poetry self add poetry-plugin-export
177+
poetry export -f requirements.txt --with dev -o requirements.txt --all-extras
178+
python -m pip install -r requirements.txt
179+
python -m pip install .
180+
- name: Test with pytest
181+
env:
182+
SIMVUE_URL: ${{ secrets.SIMVUE_URL }}
183+
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
184+
run: >-
185+
python -m pytest -x
186+
-m "scenario and not run" -c /dev/null -p no:warnings
187+
-n 0 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
164188
executor_tests:
165189
runs-on: ubuntu-latest
166190
timeout-minutes: 30

.github/workflows/test_client_ubuntu.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,30 @@ jobs:
166166
python -m pytest -x
167167
-m config -c /dev/null -p no:warnings
168168
-n 8 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
169+
scenario_tests:
170+
runs-on: ubuntu-latest
171+
timeout-minutes: 30
172+
steps:
173+
- uses: actions/checkout@v5
174+
- name: Set up Python 3.14
175+
uses: actions/setup-python@v6
176+
with:
177+
python-version: "3.14"
178+
- name: Install dependencies
179+
run: |
180+
python -m pip install poetry
181+
poetry self add poetry-plugin-export
182+
poetry export -f requirements.txt --with dev -o requirements.txt --all-extras
183+
python -m pip install -r requirements.txt
184+
python -m pip install .
185+
- name: Test with pytest
186+
env:
187+
SIMVUE_URL: ${{ secrets.SIMVUE_URL }}
188+
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
189+
run: >-
190+
python -m pytest -x
191+
-m "scenario and not run" -c /dev/null -p no:warnings
192+
-n 0 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
169193
executor_tests:
170194
runs-on: ubuntu-latest
171195
timeout-minutes: 30

.github/workflows/test_client_ubuntu_nightlies.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,30 @@ jobs:
164164
python -m pytest -x
165165
-m config -c /dev/null -p no:warnings
166166
-n 8 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
167+
scenario_tests:
168+
runs-on: ubuntu-latest
169+
timeout-minutes: 30
170+
steps:
171+
- uses: actions/checkout@v5
172+
- name: Set up Python 3.14
173+
uses: actions/setup-python@v6
174+
with:
175+
python-version: "3.14"
176+
- name: Install dependencies
177+
run: |
178+
python -m pip install poetry
179+
poetry self add poetry-plugin-export
180+
poetry export -f requirements.txt --with dev -o requirements.txt --all-extras
181+
python -m pip install -r requirements.txt
182+
python -m pip install .
183+
- name: Test with pytest
184+
env:
185+
SIMVUE_URL: ${{ secrets.SIMVUE_URL }}
186+
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
187+
run: >-
188+
python -m pytest -x
189+
-m "scenario and not run" -c /dev/null -p no:warnings
190+
-n 0 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
167191
executor_tests:
168192
runs-on: ubuntu-latest
169193
timeout-minutes: 30

.github/workflows/test_client_windows_nightlies.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,30 @@ jobs:
167167
-m 'config and not unix' -c /dev/null -p no:warnings
168168
-n 8 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
169169
shell: pwsh
170+
scenario_tests:
171+
runs-on: ubuntu-latest
172+
timeout-minutes: 30
173+
steps:
174+
- uses: actions/checkout@v5
175+
- name: Set up Python 3.14
176+
uses: actions/setup-python@v6
177+
with:
178+
python-version: "3.14"
179+
- name: Install dependencies
180+
run: |
181+
python -m pip install poetry
182+
poetry self add poetry-plugin-export
183+
poetry export -f requirements.txt --with dev -o requirements.txt --all-extras
184+
python -m pip install -r requirements.txt
185+
python -m pip install .
186+
- name: Test with pytest
187+
env:
188+
SIMVUE_URL: ${{ secrets.SIMVUE_URL }}
189+
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
190+
run: >-
191+
python -m pytest -x
192+
-m scenario -c /dev/null -p no:warnings
193+
-n 0 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
170194
executor_tests:
171195
runs-on: windows-latest
172196
timeout-minutes: 30

.github/workflows/test_multiple_python.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,30 @@ jobs:
194194
python -m pytest -x
195195
-m config -c /dev/null -p no:warnings
196196
-n 8 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
197+
scenario_tests:
198+
runs-on: ubuntu-latest
199+
timeout-minutes: 30
200+
steps:
201+
- uses: actions/checkout@v5
202+
- name: Set up Python 3.14
203+
uses: actions/setup-python@v6
204+
with:
205+
python-version: "3.14"
206+
- name: Install dependencies
207+
run: |
208+
python -m pip install poetry
209+
poetry self add poetry-plugin-export
210+
poetry export -f requirements.txt --with dev -o requirements.txt --all-extras
211+
python -m pip install -r requirements.txt
212+
python -m pip install .
213+
- name: Test with pytest
214+
env:
215+
SIMVUE_URL: ${{ secrets.SIMVUE_URL }}
216+
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
217+
run: >-
218+
python -m pytest -x
219+
-m "scenario and not run" -c /dev/null -p no:warnings
220+
-n 0 -v -o cache_dir=${GITHUB_WORKSPACE}/.pytest-cache
197221
executor_tests:
198222
runs-on: ubuntu-latest
199223
name: Executor Tests

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
args: [--branch, main, --branch, dev]
2424
- id: check-added-large-files
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: v0.14.8
26+
rev: v0.14.14
2727
hooks:
2828
- id: ruff
2929
args: [ --fix, --exit-non-zero-on-fix, "--ignore=C901" ]
@@ -35,7 +35,7 @@ repos:
3535
pass_filenames: false
3636

3737
- repo: https://github.com/PyCQA/bandit.git
38-
rev: 1.9.2
38+
rev: 1.9.3
3939
hooks:
4040
- id: bandit
4141
args: [-lll, --recursive, clumper]

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

simvue/config/user.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
import semver
1818

1919
from simvue.exception import SimvueUserConfigError
20+
21+
try:
22+
from typing import Self
23+
except ImportError:
24+
from typing_extensions import Self
25+
2026
import simvue.utilities as sv_util
2127
from simvue.config.parameters import (
2228
ClientGeneralOptions,
@@ -139,14 +145,13 @@ def write(self, out_directory: pydantic.DirectoryPath) -> None:
139145
toml.dump(self.model_dump(), out_f)
140146

141147
@pydantic.model_validator(mode="after")
142-
@classmethod
143-
def check_valid_server(cls, values: "SimvueConfiguration") -> "SimvueConfiguration":
148+
def check_valid_server(self) -> Self:
144149
if os.environ.get("SIMVUE_NO_SERVER_CHECK"):
145-
return values
150+
return self
146151

147-
cls._check_server(values.server.token, values.server.url, values.run.mode)
152+
self._check_server(self.server.token, self.server.url, self.run.mode)
148153

149-
return values
154+
return self
150155

151156
@classmethod
152157
@sv_util.prettify_pydantic

tests/example_data/python_poetry/poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)