Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Python version and minor fixes #75

Merged
merged 3 commits into from
Jan 6, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- published

env:
MINIMUM_PYTHON_VERSION: '3.10'
MINIMUM_PYTHON_VERSION: '3.11'

jobs:
precommit:
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion grand_challenge_forge/generation_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def copy_and_render(
# Create directories in the output path
current_output_dir.mkdir(parents=True, exist_ok=True)

for file in files:
for file in sorted(files):
source_file = root / file
output_file = current_output_dir / file

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ cleanup() {
# Ensure permissions are set correctly on the output
# This allows the host user (e.g. you) to access and handle these files
docker run --rm \
--platform=linux/amd64 \
--quiet \
--volume "$OUTPUT_DIR":/output \
--entrypoint /bin/sh \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include 'sym_template.j2' %}

This file was deleted.

10 changes: 6 additions & 4 deletions tests/test_evaluate_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ def forever_process(*_):
time.sleep(1)


def stop_children(process, interval):
def stop_children(process_pid, interval):
stopped = False
while not stopped:
process = psutil.Process(process.pid)
process = psutil.Process(process_pid)
children = process.children(recursive=True)
if children:
for child in children:
Expand Down Expand Up @@ -110,7 +110,9 @@ def test_prediction_processing_catching_killing_of_child_processes():
def add_child_terminator(*args, **kwargs):
process = _start_pool_worker(*args, **kwargs)
nonlocal child_stopper
child_stopper = Process(target=partial(stop_children, process, 0.5))
child_stopper = Process(
target=partial(stop_children, process.pid, 0.5)
)
child_stopper.start() # Hasta la vista, baby
return process

Expand All @@ -121,5 +123,5 @@ def add_child_terminator(*args, **kwargs):
fn=forever_process, predictions=predictions
)
finally:
if child_stopper:
if child_stopper and child_stopper.is_alive():
child_stopper.terminate()
Loading