067853 Small improvements to the dev-data.py script

1 file Authored by Pierre-Yves Chibon 5 years ago , Committed by pingou 5 years ago ,
1 file changed. 66 lines added. 59 lines removed.
    Small improvements to the dev-data.py script
    
    This script is used by new contributors to pagure to create or populate
    the database.
    
    This commit moves the database initiation to the code used within pagure
    to reduce code duplication.
    
    This commit also allows specifying an user name and user email using
    environment variables to by-pass the logic asking for the user's input
    which will allow testing this script in pagure's own test suite.
    
    Finally this commit also moves deleting all the data in the database at
    the end of the ``--all`` so it does: create, populate, delete rather than
    create, delete, populate.
    
    Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr></pingou@pingoured.fr>
    
        
file modified
+66 -59