uclahs-cds / Ligare

GNU General Public License v2.0
0 stars 0 forks source link

Using scaffold create and specifying a module causes the logger to issue warnings #37

Open j2salmingo opened 9 months ago

j2salmingo commented 9 months ago

Used the following command: bl-python-scaffold create -n test-scaffold -t openapi -m database

Scaffolding application named "test-scaffold" under directory `/home/jsalmingo/python_projects/test-scaffold`.
[INFO   ] Running create mode.
[INFO   ] Creating new application "test-scaffold" from openapi template ...

Enter a database connection string.
By default this is `sqlite:///:memory:?check_same_thread=False`.
Retain this default by pressing enter, or type something else.
>
[INFO   ] Using database connection string `sqlite:///:memory:?check_same_thread=False`
[WARNING] Directory `test-scaffold` exists. Files may be overwritten.
[WARNING] Directory `test-scaffold/test-scaffold` exists. Files may be overwritten.
[INFO   ] "test-scaffold" will be accessible at http://127.0.0.1:5000/test-scaffold
Done.

I am not sure what triggers the warning but it seems quite scary if this is normal operation.

It also appears that the link http://127.0.0.1:5000/test-scaffold will be available after installation but the application needs to be run first.

aholmes commented 9 months ago

I need to think about this one. The warning exists for cases when someone may run the command where the files do exist before running the command, and also for the modify command when creating endpoints. However, the warning probably is not needed when the create command is first executed. This warning is largely an artifact of where the check is performed in the scaffolding process.