aiidateam / aiida-core

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

CLI: Add automatic PostgreSQL management to `verdi presto` #6432

Closed sphuber closed 1 month ago

sphuber commented 1 month ago

The functionality of verdi quicksetup that automatically creates a PostgreSQL user and database was still relied upon by quite a number of users. Therefore, this functionality is integrated into verdi presto so that verdi quicksetup can finally be deprecated.

Since the crux of verdi presto is to be as automatic as possible and require no prompting and as little configuration as necessary, only a few options are exposed. To use PostgreSQL instead of SQLite, the --use-postgres switch needs to be toggled. Only the hostname and port of the PostgreSQL server can be configured, as well as the username and password of an existing user with which to connect.

sphuber commented 1 month ago

@mbercx @danielhollas @agoscinski in case you are interested in testing this one out

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 77.70%. Comparing base (ef60b66) to head (290688c). Report is 15 commits behind head on main.

Files Patch % Lines
src/aiida/cmdline/commands/cmd_presto.py 93.34% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6432 +/- ## ========================================== + Coverage 77.51% 77.70% +0.19% ========================================== Files 560 562 +2 Lines 41444 41716 +272 ========================================== + Hits 32120 32410 +290 + Misses 9324 9306 -18 ```

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

sphuber commented 1 month ago

Have the deprecation of quicksetup been discussed already? I feel this was quite a contentious topic on the last PR. If not, @mbercx should give his blessing I think :-)

I was working on this together with the update of the docs. Those are still mentioning verdi setup/quicksetup and we don't mention verdi presto yet. @agoscinski was also working on improving the deprecation decorator in #6433 where he also deprecates verdi setup/quicksetup. So it will be handled in another PR in any case before the release.