`orm/utils/node.py`: Bug fix, `removeprefix` was being applied to `'data'` instead of `'process'`
Description:
There was an issue in the line 64 that removeprefix function was being applied to data. instead of process.
In the end the change made here doesn't change any behaviour, it simply remove a line of code that was not doing anything useful.
Reference Link to PR #6758
It is an empty PR, could you check you push the change?
It is an empty PR, could you check you push the change?
I've Updated
Added the functional change #6758
If it's possible please give more detailed explanation.
Also the title: "Deprecated function" is not descriptive at all, please revise.
@Muhammad-Rebaal thank you for the PR, see my review comments.
We need to add tests covering this code. Can you please try to add them to
tests/orm/utils/test_node.py. You should be able to run the tests locally bypytest tests/orm/utils/test_node.pyLet us know if you need asssistance with them:
Yeah sure @danielhollas ! But if you describe what is your intention by adding a test in that particular file about those functions that've changed then it would be easier for me to implement that.
Added the functional change #6758
If it's possible please give more detailed explanation.
Also the title: "Deprecated function" is not descriptive at all, please revise.
I've changed that and thank you for your assistance .
Hi @Muhammad-Rebaal, please check the comment above, there are diff compares in the code not cleaned.
Hi @Muhammad-Rebaal, please check the comment above, there are diff compares in the code not cleaned.
Hi @unkcpz @danielhollas ! Yes , I've updated the suggested change in src/aiida/orm/utils/node.py file which is in line 62 and 63.
Hey @danielhollas @unkcpz !
Need some assistance regarding the test part . By running this command : pytest tests/orm/utils/test_node.py
I ran into some issues like :
E :PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\Temp\\AppData\\Local\\Temp\\pytest-of-Temp\\pytest-22\\28efecaa984d0d6c847fc2b33421ae0c0\\.aiida\\tmpgopjmudt' -> 'C:\\Users\\Temp\\AppData\\Local\\Temp\\pytest-of-Temp\\pytest-22\\28efecaa984d0d6c847fc2b33421ae0c0\\.aiida\\config.json'
C:\Users\Temp\AppData\Roaming\Python\Python312\site-packages\aiida\manage\configuration\config.py:782: PermissionError
========================= slowest 50 durations =========================
(2 durations < 1s hidden. Use -vv to show these durations.)
======================= short test summary info ========================
ERROR tests/orm/utils/test_node.py::test_load_node_class_fallback - PermissionError: [WinError 32] The process cannot access the file be...
If you know how to resolve this please let me know . I've done the previous parts of removing the conflict and adding the suggested changes .
I am not a Windows user, but it looks like perhaps you have the file opened in an editor or somewhere else and pytest cannot access it?
Hey @danielhollas @unkcpz !
I've added the tests in the tests/orm/utils/test_node.py directory and implemented the tests and they are passed as well , here's the picture :
And a little request if you could assign me those issues that I've resolved #6760 , #6758 , #6705 as a token of appreciation for my contributions.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 78.32%. Comparing base (660fec7) to head (83833ec).
:warning: Report is 132 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #6760 +/- ##
==========================================
+ Coverage 78.31% 78.32% +0.02%
==========================================
Files 566 566
Lines 42762 42767 +5
==========================================
+ Hits 33484 33495 +11
+ Misses 9278 9272 -6
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Hey @danielhollas ! Hope you are fine !
Is this issue resolved ? Or needs to have some work ? Please let me know ?
Thank You !
@Muhammad-Rebaal thanks for the ping! Regarding the changes themselves, I just have some minor cleanup notes.
It would be great if we could get 100% test coverage for the
orm/utils/node.pyfile in this PR, since you've added a bunch of tests already. If you're up for it, you can check which branches are not tested on Codecov report here: https://app.codecov.io/gh/aiidateam/aiida-core/pull/6760/blob/src/aiida/orm/utils/node.py
There's actually not much missing!
Yeah sure ! It would be a pleasure to do that .
Hi @danielhollas , @unkcpz !
Hope you are fine !
Could you please review code . I've added the 100% test coverage for node.py in test_node.py . I've also tested it locally by coverage a python library.
Thank You !
I opened a new PR #6983 based on this one since I didn't want to push changes here.
Closing this in favor of #6983. Please continue development there.
