I have also thoroughly verified that the application runs without issues using Docker and that the frontend functionality works as expected.
Once this PR is merged, I can start working on creating the unit test files!
Please review the changes and provide any feedback or suggestions.
Please feel free to ask if you have any questions or uncertainties.
Most significant change
The main.py file has been renamed to cli.py.
The reason for changing main.py to cli.py was to resolve the naming conflict between the module name and the function name when importing the main function in test_code.py.
Initially, the main.py file contained a function named main. In the test_code.py file, the main function was imported using from src.main import main.
However, this approach resulted in importing the main module instead of directly calling the main function. The error message TypeError: 'module' object is not callable was encountered.
To resolve this issue, two changes were made:
The main.py file was renamed to cli.py. This avoids the naming conflict between the module and the function.
The main function within cli.py was renamed to run. This allows test_code.py to import the run function using from src.cli import run.
These changes resolved the naming conflict between the module and the function, enabling the test code to execute successfully.
Additionally, renaming main.py to cli.py provides a clearer indication of the file's role and purpose within the project.
@ryansurf This PR addresses the directory structure changes discussed in https://github.com/ryansurf/cli-surf/pull/19#issue-2319916494.
The modifications turned out to be more extensive than initially anticipated. Please refer to the commit messages for the specific changes made. https://github.com/ryansurf/cli-surf/commit/65ea49e666283ce31a89e0b3f858069ffdf5b92f https://github.com/ryansurf/cli-surf/commit/e7acc8fdaed62c5b99673a48395cdec83a3dfad5 https://github.com/ryansurf/cli-surf/commit/136f2e07f7ca82ab0e79991115e8530a7ad6f637 https://github.com/ryansurf/cli-surf/commit/60001d6556e45cd28bdc8781074e9b5de7ea31fe
I have also thoroughly verified that the application runs without issues using Docker and that the frontend functionality works as expected.
Once this PR is merged, I can start working on creating the unit test files!
Please review the changes and provide any feedback or suggestions. Please feel free to ask if you have any questions or uncertainties.
Most significant change
The
main.py
file has been renamed tocli.py
.The reason for changing
main.py
tocli.py
was to resolve the naming conflict between the module name and the function name when importing themain
function intest_code.py
. Initially, themain.py
file contained a function namedmain
. In thetest_code.py
file, the main function was imported usingfrom src.main import main
. However, this approach resulted in importing the main module instead of directly calling the main function. The error messageTypeError: 'module' object is not callable was encountered
. To resolve this issue, two changes were made:main.py
file was renamed tocli.py
. This avoids the naming conflict between the module and the function.cli.py
was renamed torun
. This allowstest_code.py
to import therun
function usingfrom src.cli import run
.These changes resolved the naming conflict between the module and the function, enabling the test code to execute successfully.
Additionally, renaming
main.py
tocli.py
provides a clearer indication of the file's role and purpose within the project.Fixes #20