Conversation
122a74e to
02835b3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25 +/- ##
==========================================
+ Coverage 85.57% 87.71% +2.13%
==========================================
Files 16 17 +1
Lines 929 944 +15
==========================================
+ Hits 795 828 +33
+ Misses 134 116 -18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
02835b3 to
c6f9fa8
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the parser interface by renaming the output‐related keys from function_outputs to output_ports and adding support for input_ports. In addition, it shares the helper parser function between PyFunction and PythonJob and updates related tests and documentation for consistency.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/aiida_pythonjob/utils.py | Introduces helper functions for formatting and serializing input/output ports. |
| src/aiida_pythonjob/calculations/pyfunction.py | Updates process specification to use output_ports instead of deprecated outputs key. |
| tests/test_pyfunction.py | Adjusts tests to use the new output_ports parameter instead of function_outputs. |
| tests/test_parser.py | Modifies tests to validate output_ports handling in the parser. |
| docs/gallery/autogen/* | Updates documentation examples replacing function_outputs with output_ports. |
| Other files | Various helper functions, decorators, and utilities updated accordingly for consistency. |
Comments suppressed due to low confidence (3)
src/aiida_pythonjob/utils.py:259
- [nitpick] Consider using a consistent uppercase default for 'identifier' (e.g., 'ANY') to match comparisons elsewhere in the code.
item.setdefault("identifier", "any")
tests/test_pyfunction.py:55
- Ensure test inputs consistently use 'output_ports' instead of the deprecated 'function_outputs' to align with the updated API.
output_ports=[{"name": "sum"}, ...]
src/aiida_pythonjob/calculations/pyfunction.py:46
- The change from 'function_data.outputs' to 'function_data.output_ports' improves clarity; ensure that corresponding documentation and error messages are updated accordingly.
spec.input("function_data.output_ports", valid_type=Dict, serializer=to_aiida_type, required=False)
function_outputstooutput_portsinput_portsPyFunctionandPythonJobshare the helper parser function.