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

Interpret empty VIDEO_CACHE_DIR as None #245

Merged
merged 1 commit into from
Nov 10, 2022
Merged

Interpret empty VIDEO_CACHE_DIR as None #245

merged 1 commit into from
Nov 10, 2022

Conversation

ejm714
Copy link
Collaborator

@ejm714 ejm714 commented Nov 10, 2022

If VIDEO_CACHE_DIR gets set to an empty string or 0, it will be interpreted as True for caching. This PR adds logic so that empty strings or 0s in the environment variable will be interpreted as no caching is desired.

@ejm714 ejm714 requested a review from pjbull November 10, 2022 21:06
@netlify
Copy link

netlify bot commented Nov 10, 2022

Deploy Preview for silly-keller-664934 ready!

Name Link
🔨 Latest commit 4b18335
🔍 Latest deploy log https://app.netlify.com/sites/silly-keller-664934/deploys/636d67e370783a0009800829
😎 Deploy Preview https://deploy-preview-245--silly-keller-664934.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ejm714 ejm714 changed the title Interpret empty video_cache_dir as None Interpret empty VIDEO_CACHE_DIR as None Nov 10, 2022
@github-actions
Copy link
Contributor

Copy link
Member

@pjbull pjbull left a comment

Choose a reason for hiding this comment

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

LGTM!

@codecov-commenter
Copy link

Codecov Report

Merging #245 (4b18335) into master (00851f4) will decrease coverage by 0.2%.
The diff coverage is 100.0%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #245     +/-   ##
========================================
- Coverage    87.0%   86.7%   -0.3%     
========================================
  Files          28      28             
  Lines        1962    1936     -26     
========================================
- Hits         1707    1680     -27     
- Misses        255     256      +1     
Impacted Files Coverage Δ
zamba/data/video.py 81.0% <100.0%> (-0.6%) ⬇️
zamba/version.py 80.0% <0.0%> (-20.0%) ⬇️
zamba/models/densepose/config.py 92.2% <0.0%> (-0.2%) ⬇️
zamba/models/config.py 96.8% <0.0%> (-0.2%) ⬇️
zamba/models/model_manager.py 84.2% <0.0%> (-0.1%) ⬇️
zamba/models/utils.py 100.0% <0.0%> (ø)

@ejm714 ejm714 merged commit 70a6a29 into master Nov 10, 2022
@ejm714 ejm714 deleted the cache-dir-fix branch November 10, 2022 21:50
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.

3 participants