-
Notifications
You must be signed in to change notification settings - Fork 1
Add transfer of dicts. #21
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
Conversation
…has any keys, it indexes from 1
There was a problem hiding this 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 implements a breaking change in the MAD-NG API to require that all table transfers be made by reference, with an option to perform a shallow copy using eval(), along with corresponding updates to documentation, examples, and workflows. Key changes include:
- Updating MAD-NG function calls (e.g. recv_vars, send) to include the new shallow_copy/true parameter.
- Renaming variables and updating file paths in examples to fix typos.
- Updating version numbers, changelogs, and workflow scripts to reflect the new MAD-NG release.
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/pymadng/madp_classes.py | Updated calls to MAD-NG with shallow_copy and modified send commands. |
| src/pymadng/init.py | Updated version from 0.6.3 to 0.7.0. |
| examples/runall.py | Corrected example file paths. |
| examples/ex-recv-lhc/ex-defexpr.py | Improved formatting and added explicit receive keys in recv calls. |
| examples/ex-ps-twiss/ex-ps-twiss.py | Fixed variable naming and enhanced type assertion. |
| examples/ex-managing-refs/ex-managing-refs.py | Corrected directory name and updated reference usage. |
| examples/ex-lhc-couplingLocal/ex-lhc-couplingLocal.py | Removed chrom flag; fixed misnamed variables and improved output messaging. |
| examples/ex-fodo/ex-fodos.py | Fixed typos in directory names and improved formatting. |
| examples/ex-benchmark-and-fork/ex-benchmark-and-fork.py | Updated MAD commands and fixed variable naming inconsistencies. |
| examples/ex-LowLevel/ex-send-recv.py | Reformatted send calls and adjusted message parameters for data transfer. |
| examples/ex-LowLevel/ex-send-multypes.py | Reformatted send calls, updated variable naming, and improved None comparisons. |
| docs/quickstartguide.md | Updated code examples to reflect API changes. |
| docs/examples.rst | Revised literalinclude paths for updated example files. |
| docs/ex-lhc-couplingLocal.rst | Updated file references and example excerpts. |
| docs/contributing.md | Revised documentation guidelines for descriptive naming. |
| docs/communication.md | Updated literalinclude directives with new line ranges. |
| docs/advanced_features.md | Modified example syntax to match updated API usage. |
| CHANGELOG.md | Documented the breaking changes and new features for version 0.7.0. |
| .github/workflows/test-pymadng.yml | Updated MAD binary versions in workflow. |
| .github/workflows/python-publish.yml | Updated MAD binary versions in workflow. |
Comments suppressed due to low confidence (1)
examples/ex-LowLevel/ex-send-recv.py:57
- The comment for setting 'cm4' indicates a multiplication factor of 1, yet the code is using a multiplier of 2. Please update the comment to accurately describe the operation.
mad.send(cmatrixString.format("cm4", "*", 2)) # Set cm4 to cm1 * 1 and send it to Python
Breaking change - Now it forces all tables to be references. So lists that were previously transferred need the .eval(), which does a shallow copy.
Updated documentation and examples.
Closes #20
Needs a release of MAD-NG to be merged.