From 3be956ad7c0dc9742d6929d6c1b7d0330d0b003d Mon Sep 17 00:00:00 2001 From: PProfizi Date: Mon, 25 Nov 2024 16:34:17 +0100 Subject: [PATCH 1/3] Augment timeout to 5s in 13-manage_licensing.py due to timeouts on GitHub --- examples/04-advanced/13-manage_licensing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/04-advanced/13-manage_licensing.py b/examples/04-advanced/13-manage_licensing.py index 4a39f84c70f..fd909333108 100644 --- a/examples/04-advanced/13-manage_licensing.py +++ b/examples/04-advanced/13-manage_licensing.py @@ -104,7 +104,7 @@ # license increment is used, and for what maximum duration. # Use the LicenseContextManager to block a specific increment for a limited duration -with dpf.LicenseContextManager(increment_name="preppost", license_timeout_in_seconds=1.0) as lic: +with dpf.LicenseContextManager(increment_name="preppost", license_timeout_in_seconds=5.0) as lic: # Instantiate the licensed operator out = op_premium.eval() print(out) From a00a4f669d90536ecfc63425fe517db318b2ce1f Mon Sep 17 00:00:00 2001 From: PProfizi Date: Mon, 25 Nov 2024 16:34:40 +0100 Subject: [PATCH 2/3] Clean examples.yml --- .github/workflows/examples.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 037a56bcd4c..9ef7ee947a3 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -132,7 +132,6 @@ jobs: shell: bash working-directory: .ci run: | - echo on python run_examples.py - name: "Kill all servers" From fa109e24507ccafc71d5ad1cc239fef74ea8e957 Mon Sep 17 00:00:00 2001 From: PProfizi Date: Mon, 25 Nov 2024 16:55:14 +0100 Subject: [PATCH 3/3] Flush prints when running examples --- .ci/run_examples.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/run_examples.py b/.ci/run_examples.py index 58d4881df1a..5a3da2b7bd5 100644 --- a/.ci/run_examples.py +++ b/.ci/run_examples.py @@ -33,13 +33,13 @@ print(file) minimum_version_str = get_example_required_minimum_dpf_version(file) if float(server_version) - float(minimum_version_str) < -0.05: - print(f"Example skipped as it requires DPF {minimum_version_str}.") + print(f"Example skipped as it requires DPF {minimum_version_str}.", flush=True) continue try: out = subprocess.check_output([sys.executable, file]) except subprocess.CalledProcessError as e: sys.stderr.write(str(e.args)) if e.returncode != 3221225477: - print(out) + print(out, flush=True) raise e - print("PASS") + print("PASS", flush=True)