Skip to content

Conversation

@jgray-19
Copy link
Collaborator

@jgray-19 jgray-19 commented Dec 17, 2024

@jgray-19 jgray-19 self-assigned this Dec 17, 2024
@jgray-19 jgray-19 marked this pull request as draft December 17, 2024 20:00
@jgray-19 jgray-19 added bug Something isn't working good first issue Good for newcomers labels Dec 17, 2024
@jgray-19 jgray-19 linked an issue Apr 2, 2025 that may be closed by this pull request
10 tasks
@jgray-19 jgray-19 changed the title Fix for when threading is used Additional Tests Apr 2, 2025
@jgray-19 jgray-19 requested a review from Copilot April 2, 2025 20:43
Copy link
Contributor

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 adds new tests to improve coverage for numeric, miscellaneous, IO, debugging, and communication functionalities while also refining underlying MAD interface methods.

  • New tests to validate numeric types, miscellaneous types, IO and loading, debugging, and communication
  • Updates to the MAD-NG Python API including improved iter, eval signature and enhanced repr documentation
  • A fix ensuring the signal handler is only set in the main thread

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_numeric_types.py Adds tests for numeric and complex number send/receive functionality
tests/test_misc_types.py Introduces tests for nil values, ranges, monomials, and TPSA functionalities
tests/test_io_and_loading.py Adds tests for file loading, global variable management, and MAD file execution
tests/test_debug.py Includes tests for log file output and error routing in debug mode
tests/test_communication.py Adds threading and string transmission tests along with signal handler verifications
src/pymadng/madp_pymad.py Refines signal handler setup to only run on the main thread
src/pymadng/madp_object.py Updates the eval function signature and accompanying documentation
src/pymadng/madp_classes.py Improves iter safety with a sequence-check and updates repr and eq documentation

@jgray-19 jgray-19 requested a review from Copilot April 3, 2025 07:53
Copy link
Contributor

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 introduces additional tests for numeric, miscellaneous, I/O, communication, and debug functionalities; it refactors some functions for clarity and safety; and it updates documentation and internal methods.

  • New tests are added for numeric types, misc types (including tpsa and damap), I/O operations, debug logging, and communication (including multithreading compatibility).
  • Improvements include a safer iter implementation, better documentation and repr formatting in MAD objects, and a refined signal handler setup in the MAD process.
  • Minor documentation formatting fixes are applied to the architecture docs.

Reviewed Changes

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

Show a summary per file
File Description
tests/test_numeric_types.py Introduces tests for numeric types send/recv functionality
tests/test_misc_types.py Adds tests for miscellaneous types including nil, rng, mono, and tpsa tests
tests/test_io_and_loading.py Introduces tests for file I/O, loading MAD modules, and global variable handling
tests/test_debug.py Adds tests for debug logging and error handling in MAD
tests/test_communication.py Provides new tests for communication methods and multithreading aspects
src/pymadng/madp_pymad.py Updates signal handling to conditionally set handlers for main thread
src/pymadng/madp_object.py Refines the eval method parameter naming from “input” to “expression”
src/pymadng/madp_classes.py Improves repr and adds type hints; updates iter implementation
docs/source/architecture.md Adds a minor formatting fix
Comments suppressed due to low confidence (1)

src/pymadng/madp_classes.py:192

  • Consider quoting 'sequence' in the is_instanceOf call (e.g. use 'is_instanceOf("sequence")') to ensure it is interpreted as a string literal.
self._mad.send(f"{self._mad.py_name}:send({self._name}:is_instanceOf(sequence))")

@jgray-19 jgray-19 marked this pull request as ready for review April 3, 2025 07:57
@jgray-19 jgray-19 merged commit e86e619 into main Apr 3, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Untested Functions

2 participants