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

Make video download optional for sample datasets #224

Merged
merged 7 commits into from
Jul 11, 2024

Conversation

niksirbi
Copy link
Member

@niksirbi niksirbi commented Jun 14, 2024

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
See issue 181.

What does this PR do?
It introduces a with_video argument to sample_data.fetch_dataset and sample_data.fetch_dataset_paths. The default is False, which is sensible I think because videos can be large and we don't want to get them unless we are sure we want them. This should speedup CI somewhat, and also the execution of examples in binder.

There is only one test (so far) for which a video is necessary, the one that tests the video-fetching functionality itself. For that test we now use the smallest available video (~5MB).

The "Sample Data" section of docs has been updated accordingly.

References

Closes #181

How has this PR been tested?

Updated existing test with parametrisation across the new with_video argument.

Is this a breaking change?

Noe.

Does this PR require an update to the documentation?

Yes, done.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Copy link

codecov bot commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.70%. Comparing base (43f17d7) to head (553e4d2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #224   +/-   ##
=======================================
  Coverage   99.70%   99.70%           
=======================================
  Files          12       12           
  Lines         681      681           
=======================================
  Hits          679      679           
  Misses          2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@niksirbi niksirbi marked this pull request as ready for review June 14, 2024 17:18
@niksirbi niksirbi requested a review from sfmig June 14, 2024 17:19
Copy link
Contributor

@sfmig sfmig left a comment

Choose a reason for hiding this comment

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

nice one! 🚀

Most comments are on the docs description, trying to make some sentences a bit shorter. But this is often very subjective so of course feel free to take/leave bits as you see fit!

docs/source/getting_started/sample_data.md Outdated Show resolved Hide resolved

If available, the video file is downloaded and its path is stored
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If available, the video file is downloaded and its path is stored
If available, the video file is downloaded to the path

Copy link
Member Author

Choose a reason for hiding this comment

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

In this case I think I'll stick with my more verbose phrasing, fro the sake of clarity. But I'll change "e.g." to "i.e".

docs/source/getting_started/sample_data.md Show resolved Hide resolved
docs/source/getting_started/sample_data.md Outdated Show resolved Hide resolved
Comment on lines 44 to 45
still frame extracted from the video. This can serve as a representative
image of the video, which could be useful for visualisation (e.g.,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
still frame extracted from the video. This can serve as a representative
image of the video, which could be useful for visualisation (e.g.,
still frame extracted from the video. This can be useful for visualisation (e.g.,

IMO it's not very clear what a "representative image of the video" means so I'd suggest to remove it.

Copy link
Contributor

Choose a reason for hiding this comment

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

(as in, how is it "representative"?)

Copy link
Member Author

Choose a reason for hiding this comment

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

agreed

movement/sample_data.py Outdated Show resolved Hide resolved
movement/sample_data.py Show resolved Hide resolved
tests/test_unit/test_sample_data.py Show resolved Hide resolved
tests/test_unit/test_sample_data.py Show resolved Hide resolved
docs/source/getting_started/sample_data.md Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Jul 9, 2024

@niksirbi
Copy link
Member Author

niksirbi commented Jul 9, 2024

Thanks for the review @sfmig!. I've accepted most of your suggestion on phrasing.
I've merge the main branch into this one and manually resolved a few conflicts. Assuming the CI passes this will be ready to merge!

@niksirbi niksirbi added this pull request to the merge queue Jul 11, 2024
Merged via the queue into main with commit b98cac0 Jul 11, 2024
27 checks passed
@lochhh lochhh deleted the optional-video-download branch July 12, 2024 16:22
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.

Optionally download videos for sample dataset
2 participants