aiidateam / aiida-core

The official repository for the AiiDA code
https://aiida-core.readthedocs.io
Other
411 stars 184 forks source link

CLI: Allow higher than index 10 for `verdi presto` #6477

Closed mbercx closed 1 week ago

mbercx commented 1 week ago

Fixes #6476

When the user is using verdi presto to create more than 11 profiles, the command will fåail because presto-10 already exists. This is due to the fact that the get_default_presto_profile_name() function sorts the existing indices as strings, which means 10 will precede 9 and hence the "last index" would be 9, making the new index 10, which already exists.

Here we fix this issue by casting the extracted existing indices as integers, so the sorting works as intended.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 77.75%. Comparing base (ef60b66) to head (756aba4). Report is 48 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6477 +/- ## ========================================== + Coverage 77.51% 77.75% +0.25% ========================================== Files 560 561 +1 Lines 41444 41771 +327 ========================================== + Hits 32120 32476 +356 + Misses 9324 9295 -29 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.