-
Notifications
You must be signed in to change notification settings - Fork 1.3k
updater: detect conda #2679
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
updater: detect conda #2679
Conversation
|
I have no idea how to get DeepSource to pass these minor issues. Recommended usage by python docs is |
|
@n3hrox thanks for the PR! It's not the requirement to fix all the deepsource complaints. @sanketsaurav may be this #2679 (comment) can be of some interest to you and you can recommend us a better way to deal with this. |
shcheklein
left a comment
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.
are there tests for this? can we add one?
|
Added test and refactored |
|
|
||
| def is_conda(): | ||
| try: | ||
| from .build import PKG # patched during conda package build |
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 we start including this file into other packages, we would be able to simply delete this dvc/utils/pkg.py and have build.py(or maybe pkg.py if we decide to rename it) have PKG = "something" defined and then just from .build import PKG and use it instead of get_package_manager. That would look and feel very nice. 🙂
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.
@efiop I will rework that method in the next PR where I include patches for other builds as well ;)
efiop
left a comment
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.
Thanks! 🎉
Have you followed the guidelines in our
Contributing document?
Does your PR affect documented changes or does it add new functionality
that should be documented? If yes, have you created a PR for
dvc.org documenting it or at
least opened an issue for it? If so, please add a link to it.
Resolves #2611