Skip to content

Conversation

@MasloMaslane
Copy link
Member

No description provided.

@MasloMaslane MasloMaslane requested a review from Copilot May 15, 2025 10:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes workflows loaded from the database and enhances tests and model handling for Sinolpack packages. Key changes include:

  • Updating tests to run both file- and DB-based workflows using a configurable package loader.
  • Modifying additional file handling in the Sinolpack model to load files via LocalFile with error handling.
  • Adding workflow saving in the Django handler and raising NotImplemented errors for abstract methods in the package model.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_django/test_sio3pack/test_sinolpack.py Passes new configuration to the save-and-test workflow function and validates title and statement accessors.
tests/packages/sinolpack/test_workflows.py Introduces a dual-run type strategy for testing workflows, switching between file and DB sources, and replaces LocalFile with package.main_model_solution.
src/sio3pack/workflow/workflow_manager.py Converts workflow definitions from dictionaries using Workflow.from_json.
src/sio3pack/packages/sinolpack/model.py Updates additional files loading logic to use LocalFile and gracefully ignore missing files.
src/sio3pack/packages/package/model.py Replaces placeholder implementations with explicit NotImplemented errors.
src/sio3pack/django/common/handler.py Adds workflow save logic and a helper for retrieving executable paths.
Comments suppressed due to low confidence (2)

tests/packages/sinolpack/test_workflows.py:41

  • [nitpick] The loop variable 'type' shadows the built-in 'type'. Consider renaming it (e.g., 'run_type') to improve clarity.
for type in _get_run_types():

src/sio3pack/packages/sinolpack/model.py:312

  • [nitpick] The variable name 'file' shadows the built-in 'file'. Consider renaming it to a more descriptive name like 'filename' to avoid confusion.
for file in self.config.get("extra_compilation_files", []) + self.config.get("extra_execution_files", []):

@MasloMaslane MasloMaslane merged commit 8bee447 into main May 18, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants