I would highly recommend pulling this branch down and testing locally; and/or if not comfortable merging, I think it would be a good reference to uplifting some areas of the code. I didn't see an area for unit tests but please correct me if I'm wrong :+1:
If so, feel free to close the PR as desired, just thought it may help.
Changes include:
Moved modules into a more "package-like" structure. (I would recommend updating your Jupiter notebooks if needed).
Created a logger config and added respective loggers to modules within the package.
Logger can be switched to debug mode by using LOGGING env.
Created a central environment.py file for common ENVs and imports.
Merged common code found within the asr.py module into a helper function. (Both 'transcribe' and 'translate' functions could be replaced with the helper function if desired).
Files have been linted with Flake8 to match the pep8 standard.
Added Docstrings to areas of code where I've touched significantly.
Changed some code logic to use Guard Clauses.
As mentioned above, the directory structure for src/ now looks like:
If at any point in the future you wanted to make this a python package, or cythonize it, you could use this directory structure to manage package imports and/or easily place the package into a docker container during a build process.
A general uplift of the language leap package.
I would highly recommend pulling this branch down and testing locally; and/or if not comfortable merging, I think it would be a good reference to uplifting some areas of the code. I didn't see an area for unit tests but please correct me if I'm wrong :+1:
If so, feel free to close the PR as desired, just thought it may help.
Changes include:
environment.py
file for common ENVs and imports.asr.py
module into a helper function. (Both 'transcribe' and 'translate' functions could be replaced with the helper function if desired).As mentioned above, the directory structure for
src/
now looks like:If at any point in the future you wanted to make this a python package, or cythonize it, you could use this directory structure to manage package imports and/or easily place the package into a docker container during a build process.