Skip to content

Conversation

avrata
Copy link
Contributor

@avrata avrata commented Jan 17, 2020

Not at all critical, but this threw me for a bit and I thought it might be nice to expose here.

@codecov-io
Copy link

codecov-io commented Jan 17, 2020

Codecov Report

Merging #641 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #641   +/-   ##
=======================================
  Coverage   81.69%   81.69%           
=======================================
  Files          72       72           
  Lines        2732     2732           
=======================================
  Hits         2232     2232           
  Misses        500      500
Flag Coverage Δ
#py27 81.67% <ø> (ø) ⬆️
#py36 81.67% <ø> (ø) ⬆️
#py37 81.67% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d9a10f...742289a. Read the comment docs.

Copy link
Collaborator

@reinecke reinecke left a comment

Choose a reason for hiding this comment

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

Works for me, this is pretty in-line with other adapters that take keyword args.

@jminor
Copy link
Collaborator

jminor commented Jan 21, 2020

If you want to go one step farther, you could expose a minify=true option, and then toggle to use Writer instead of PrettyWriter in the serializer.

@avrata
Copy link
Contributor Author

avrata commented Jan 21, 2020

Yeah, good point. I found while reading the code you can trigger that PrettyWriter vs Writer switch by passing a negative value to indent that I ended up using in #640. I wonder if simply adding some documentation would help here.

@jminor
Copy link
Collaborator

jminor commented Jan 22, 2020

That should either be clearly documented, or perhaps minify=true could do that for you? That would be clearer for someone reading the code, and wouldn't rely on an implementation detail of RapidJSON.

@avrata
Copy link
Contributor Author

avrata commented Jan 22, 2020

Totally, however that (< 0) code is ours: https://github.com/PixarAnimationStudios/OpenTimelineIO/blob/0a35894d72b14c7cb8373a00f0dfa594dc493751/src/opentimelineio/serialization.cpp#L707-L756

If you wanted to split out the logic into indent vs no-newlines, we should make the change there and carry the arguments along out to python.

@davidbaraff
Copy link
Contributor

davidbaraff commented Jan 22, 2020 via email

@jminor
Copy link
Collaborator

jminor commented Jan 22, 2020

Ah, I see. Thanks for pointing that out. I have a slight preference for making this a toggle (pretty vs minified) since I doubt anyone would actually want indent=3 or any other value.

@davidbaraff
Copy link
Contributor

davidbaraff commented Jan 22, 2020 via email

@avrata
Copy link
Contributor Author

avrata commented Jan 22, 2020

Ok, I added some docs for the otio_json adapter. Can someone take a look and perhaps suggest improved wording?

Copy link
Collaborator

@jminor jminor left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks for documenting that.

@ssteinbach ssteinbach added this to the Public Beta 12 milestone Mar 17, 2020
@ssteinbach ssteinbach merged commit f24279f into AcademySoftwareFoundation:master Mar 17, 2020
andrewmoore-nz added a commit to andrewmoore-nz/OpenTimelineIO that referenced this pull request Apr 19, 2020
* master: (23 commits)
  Indicate Empty track in otioview and display track name (AcademySoftwareFoundation#677)
  FCP 7 XML - Fix failure on empty name tags (AcademySoftwareFoundation#674)
  xges: Effects and Markers Support (AcademySoftwareFoundation#609)
  Add List of Supported Formats to Conform.py Help Text (AcademySoftwareFoundation#676)
  Update Copyright/License on ffmpeg_burnins.py (AcademySoftwareFoundation#679)
  Fix the windows build (AcademySoftwareFoundation#669)
  Version bump to beta 13
  Set final version for beta 12.0 (AcademySoftwareFoundation#665)
  Rodeofx fix cmx 3600 multiple markers per clip issue 593 (AcademySoftwareFoundation#664)
  Tweaks to cmake so that pip and local builds both work (AcademySoftwareFoundation#663)
  Fixed issue where CMX3600 adapter would try to add the same clip to multiple tracks. Also moved some code out of a loop it didn't need to be in. (AcademySoftwareFoundation#644)
  RV adapter metadata updates (AcademySoftwareFoundation#640)
  Expose json indent to the otio_json adapter (AcademySoftwareFoundation#641)
  fix otioconvert for Kdenlive with python3 (AcademySoftwareFoundation#646)
  Add basic debugging instructions to quickstart. (AcademySoftwareFoundation#655)
  Add kdenlive adapter to adapters list. (AcademySoftwareFoundation#661)
  Timecode rate is ignored (AcademySoftwareFoundation#612)
  Detect if plugin doesn't have a docstring and return an error which says which plugin it is that doesn't have the docstring. (AcademySoftwareFoundation#635)
  Add hook function args to otioview and otioconvert (AcademySoftwareFoundation#651)
  Updating Copyright notices (AcademySoftwareFoundation#660)
  ...

# Conflicts:
#	contrib/opentimelineio_contrib/adapters/advanced_authoring_format.py
#	src/py-opentimelineio/opentimelineio/adapters/fcp_xml.py
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.

7 participants