aiidateam / aiida-core

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

CLI: Deprecate the `deprecated_command` decorator #6461

Closed sphuber closed 3 weeks ago

sphuber commented 3 weeks ago

In an ironic turn of events, the deprecated_command decorator is itself deprecated. The current way of deprecating verdi commands is by passing the deprecation message in the deprecated argument in the command decorator when the command is declared. New functionality in VerdiCommandGroup then ensures that a deprecation message is printed when the command is invoked and the help text is updated accordingly.

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 77.73%. Comparing base (ef60b66) to head (fd5ec5b). Report is 37 commits behind head on main.

Files Patch % Lines
src/aiida/cmdline/utils/decorators.py 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6461 +/- ## ========================================== + Coverage 77.51% 77.73% +0.23% ========================================== Files 560 561 +1 Lines 41444 41724 +280 ========================================== + Hits 32120 32432 +312 + Misses 9324 9292 -32 ```

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

sphuber commented 3 weeks ago

Should we also replace the one in the cmd_database? There it was where I was not sure if should remove commands, because at least one is saying to be removed with v2.1

I am actually removing that one entirely. See #6461

I think that command was a bit of an outlier since it was the only one deprecated when we released v2.0. Nowadays, when we deprecate, we default to it being removed to 3.0. If we want to change this policy, I think that would require a separate discussion.

agoscinski commented 3 weeks ago

I am actually removing that one entirely. See https://github.com/aiidateam/aiida-core/pull/6461

For reference. @sphuber has sent the correct link on discourse https://github.com/aiidateam/aiida-core/pull/6460

Since readthedocs is has reached a limit, I checked the docs locally and it works image