-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run Translation - Refactor command-line script into a Python module #8
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Joozef315 <[email protected]>
Signed-off-by: Joozef315 <[email protected]>
Signed-off-by: Joozef315 <[email protected]>
Signed-off-by: Joozef315 <[email protected]>
c58c49a
to
2acfaac
Compare
|
||
# This source code is licensed under the license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
# -------------------------------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's be consistent about the license header here (it's important because those headers are automatically parsed by our bot and it will raise warning / error if the format is not recognized)
from omegaconf import OmegaConf | ||
|
||
# Add the parent directory to sys.path so it can locate the `translation` folder | ||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest removing this, and just specifying a fully qualified path
d4c81c8
to
fc3fafc
Compare
Purpose
This PR converts an existing command-line script
run_translation.py
into a Python module for better structure, reuse, and test coverage.Summary of Changes
run_translation_module.py
).unittest
to validate the functionality of the module.Testing Instructions
unittest
to execute the tests:python -m unittest tests/translation_module_test.py