-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Refactor scripts to put shared code in a shared library #92
Conversation
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
This may cause relative import issue and also CWD / Root Diretories are not dealt in a right way. |
|
|
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
Hi @IamMQaisar! The pull request was still in progress, so I marked it as a draft to indicate it was still being worked on. Now, the naming is consistent, and I've created a package for the shared code. To pass the current working directory's path, I'm now using |
I've tested it locally, and everything appears to be functioning correctly. Could you please review it, @TimidRobot? |
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.
this is looking great! please see requested changes
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
…join() Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
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.
just a few refinements left
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
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.
When executed using pipenv
it needs sys.path.append(".")
. With sys.path.append("..")
it fails:
pipenv run google_custom_search/google_scratcher.py
Loading .env environment variables...
Traceback (most recent call last):
File "[...]/quantifying/google_custom_search/google_scratcher.py", line 21, in <module>
import quantify # noqa: E402
^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'quantify'
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
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.
good work! thank you!
Fixes
Description
The shared code from various scripts has been moved to a shared library named quantify.py. This refactor eliminates duplicate code and improves code maintainability.
Checklist
Update index.md
).main
ormaster
).visible errors.
Developer Certificate of Origin
For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."
Developer Certificate of Origin