Skip to content
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

replace pipreqs with pip freeze #1384

Merged
merged 6 commits into from Jun 30, 2023
Merged

Conversation

AleksanderWWW
Copy link
Contributor

@AleksanderWWW AleksanderWWW commented Jun 30, 2023

Before submitting checklist

  • Did you update the CHANGELOG? (not for test updates, internal changes/refactors or CI/CD setup)
  • Did you ask the docs owner to review all the user-facing changes?

@codecov
Copy link

codecov bot commented Jun 30, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.07 ⚠️

Comparison is base (56c5461) 79.53% compared to head (97d25b7) 79.47%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1384      +/-   ##
==========================================
- Coverage   79.53%   79.47%   -0.07%     
==========================================
  Files         279      279              
  Lines       13846    13847       +1     
==========================================
- Hits        11013    11005       -8     
- Misses       2833     2842       +9     
Flag Coverage Δ
py3.7 73.00% <100.00%> (-6.03%) ⬇️
py3.9 ?
ubuntu 73.00% <100.00%> (-6.34%) ⬇️
unit 73.00% <100.00%> (-0.74%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/neptune/metadata_containers/run.py 95.55% <ø> (ø)
src/neptune/internal/utils/dependency_tracking.py 85.18% <100.00%> (+0.56%) ⬆️

... and 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@AleksanderWWW AleksanderWWW marked this pull request as ready for review June 30, 2023 08:45
PatrykGala
PatrykGala previously approved these changes Jun 30, 2023
Co-authored-by: Timothy Wolodzko <twolodzko@users.noreply.github.com>
normandy7
normandy7 previously approved these changes Jun 30, 2023
Copy link
Contributor

@twolodzko twolodzko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AleksanderWWW AleksanderWWW merged commit 0b7edcd into master Jun 30, 2023
2 checks passed
@AleksanderWWW AleksanderWWW deleted the aw/fix-dependency-tracking branch June 30, 2023 10:06
@@ -30,7 +30,7 @@ def log_dependencies(self, run: "Run") -> None:
class InferDependenciesStrategy(DependencyTrackingStrategy):
def log_dependencies(self, run: "Run") -> None:
try:
dependencies_str = subprocess.check_output(["pipreqs", "--print", "."]).decode("utf-8")
dependencies_str = subprocess.check_output(["pip", "freeze"]).decode("utf-8")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AleksanderWWW pip list --format=freeze is a more reliable option as it correctly parses requirements in a conda environment
https://stackoverflow.com/questions/62863020/pip-freeze-generating-file-on-conda-environment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see in the comments on SO that there are some issues with it. For conda, we would probably go with a dedicated integration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment there says that if someone installs a dependency from git then it will not be shown in the output. Is that a deal-breaker for us @twolodzko @SiddhantSadangi?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked for me using pip==23.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants