Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@roomrys
Copy link
Contributor

@roomrys roomrys commented Aug 2, 2022

Description

In #768, we added a feature to handle creating analysis files for multi-video projects; however, we also implemented a semi-automatic naming convention which is unintuitive to users.

This PR gives users control over the output path (as it should have always been) and only starts creating default names if no output path is given for a video in the project.

Ex. 3 output names given with 4 videos will generate 1 default name. Output names are mapped to videos based on ordering of names given and video index in the project.

Types of changes

  • Bugfix
  • New feature
  • Refactor / Code style update (no logical changes)
  • Build / CI changes
  • Documentation Update
  • Other (explain)

Does this address any currently open issues?

sleap-convert names files with 000.filename #876

Outside contributors checklist

  • Review the guidelines for contributing to this repository
  • Read and sign the CLA and add yourself to the authors list
  • Make sure you are making a pull request against the develop branch (not main). Also you should start your branch off develop
  • Add tests that prove your fix is effective or that your feature works
  • Add necessary documentation (if appropriate)

Thank you for contributing to SLEAP!

❤️

@codecov
Copy link

codecov bot commented Aug 2, 2022

Codecov Report

Merging #881 (232e5bf) into develop (740f9fa) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #881      +/-   ##
===========================================
+ Coverage    66.69%   66.73%   +0.03%     
===========================================
  Files          129      129              
  Lines        21728    21729       +1     
===========================================
+ Hits         14492    14500       +8     
+ Misses        7236     7229       -7     
Impacted Files Coverage Δ
sleap/io/convert.py 83.67% <100.00%> (+14.92%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@roomrys roomrys marked this pull request as ready for review August 2, 2022 17:19
@roomrys roomrys requested a review from talmo August 2, 2022 17:20
Copy link
Collaborator

@talmo talmo left a comment

Choose a reason for hiding this comment

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

lgtm

one small suggestion: in the docs <input path> could maybe be <slp path> so it's clear what we mean by input here? Also an example could be good, like:

                        Path to output file (optional). The analysis format expects an
                        output path per video in the project. Otherwise, the default
                        naming convention
                        <input path>.<video index>_<video filename>.analysis.h5 will be
                        used for every video without a specified output path. Multiple
                        outputs can be specified, each preceded by --output.
                        
                        Example:
                        > sleap-convert predictions.slp
                        predictions.000_video.analysis.h5
                        predictions.001_video.analysis.h5
                        ...

Does that look right?

@roomrys roomrys merged commit 28b395d into develop Aug 3, 2022
@roomrys roomrys deleted the liezl/convert_output-path branch August 3, 2022 20:48
@roomrys roomrys restored the liezl/convert_output-path branch August 17, 2022 17:57
@roomrys roomrys deleted the liezl/convert_output-path branch August 17, 2022 18:11
@roomrys roomrys mentioned this pull request Sep 11, 2022
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.

2 participants