Permalink
Browse files

Overhaul of documentation system (#312)

Summary: This change merges the entire OTIO wiki into the main OTIO repo. This lets us version the documentation along with the code, and makes it easier to publish static documentation (e.g. to readthedocs.org).

Details:

* Remove old documentation files

They are out of date, and the generated ones for the API should not be checked into source control. By creating them at build time you can run tests against the documentation and ensure that the examples in the documentation are up to date with the code that has been written.

Additionally, I'm moving the doc folder over to docs in order to keep parity with the plurality of 'tests'

* Add MANIFEST.in file

By adding a Manifest file, we control what will get built into the final package so that we're not adding files that don't need to go into the package on pypi. This will be run in the tox step that will be added in a commit that is coming up which will build out a temporary distribution and check that the results in the output package file match up with what we've defined in here. I'd also like to exclude the examples folder, but if I exclude it, everything in my virtualenv goes nuts and breaks and I can't figure out why and I don't feel like putting more time into that.

* Migrate Wiki over to tutorials and generate all API documentation

Migrating the Wiki was actually the easy part. By adding the recommonmark sphinx plugin, I could just download the Wiki from Github and use the Markdown files that existed, with slight changes to fit into the sphinx-rtd-theme. NOTE that this isn't done or perfect, but it's 95% of the work done. So you might be wondering why one would want to move the wiki over to documentation in the project and the answer is simple - the wiki is not version controlled in alignment with the package and releases of the package.

Building the documentation along with the version of the package allows the user to see changes and explanation alongside whatever version they're using, while the Wiki does not. Yes, they will have to generate it, but with the integration of tox (coming in a separate commit), we make that so much easier on the user with the command `tox -e build-docs`. This practice also helps encourage developers to keep updating their documentation and it's worked great at the last few studios I've worked at and implemented it at.

* Add tox to dev dependencies and add tox file

Since this is a new dependency, you'll have to rerun the install command with `pip install -e .[dev]`, deactivate your virtualenv, and then source it again. After that, you only have to run `tox` when you're sourced inside of your virtualenv to run all the tests, and you can run `tox -e build-docs` to build the documentation. This is not finished yet, I plan to add a couple more steps to the tox script in a coming commit, but for the purpose of running tests and building documentation, this works.

If a tox environment ever gets funky, you can run `tox -r` to rebuild the environments. I have only ever had to do that once.

* Update file documentation to build API docs properly

Since I added the ability for Sphinx to build ALL of the API documentation, there were docstrings that were never touched by the build stuff that was set up previously, and thus had issues that prevented documentation from building. This was a rather annoying chore to have to go through, and I should not have messed with any code at all, it should have only been docstrings getting messed with (minus the import statements in tests). I would appreciate you all looking at this and making sure, though.

* Documentation formatting updates

Adding images, formatting, fixing tables, making links work.

* Add ReadTheDocs configuration file

* Add apidoc to Sphinx building and move module tree in index

* Cleanup for conf.py file and adding documentation link to README

* Flake8 cleanup and update manifest file

* Remove pip installs from Travis, change pep8 to pycodestyle, add to tox

* Test moving coverage call to tox

* Change py.test command to module being called from python for Travis

* Add tox-travis plugin to travis file

* Fix coverage on Travis

* Actually fix coverage on Travis and in Tox

* Add coverage dependency to travis pip installation

Didn't think about the fact that it should be needed outside of the virtualenvs that Tox creats

* Minor fixes to new doc system (#3)

* Fixed indentation issue in doc string.

* Changed Makefile doc-html target to run new tox -e build-docs.

* Put lambda idiom back the way it was.

* Adjust version string in conf.py for documentation
  • Loading branch information...
boredstiff authored and jminor committed Oct 9, 2018
1 parent 59a60bb commit 48c035aa3db1e6c951328d3cf3b14991d720c552
Showing with 2,128 additions and 997 deletions.
  1. +4 −0 .gitignore
  2. +6 −0 .readthedocs.yml
  3. +3 −7 .travis.yml
  4. +17 −0 MANIFEST.in
  5. +4 −4 Makefile
  6. +4 −0 README.md
  7. +0 −33 doc/source/index.rst
  8. +0 −7 doc/source/modules.rst
  9. +0 −46 doc/source/opentimelineio.adapters.rst
  10. +0 −46 doc/source/opentimelineio.core.rst
  11. +0 −47 doc/source/opentimelineio.rst
  12. +0 −70 doc/source/opentimelineio.schema.rst
  13. 0 {doc → docs}/Makefile
  14. 0 docs/_static/.empty
  15. BIN docs/_static/OpenTimelineIO_2018_04_26_FMX_Published.key.pdf
  16. BIN docs/_static/multiple_tracks.png
  17. BIN docs/_static/nested_compositions.png
  18. BIN docs/_static/simple_cut_list.png
  19. BIN docs/_static/transitions.png
  20. +84 −128 {doc/source → docs}/conf.py
  21. +73 −0 docs/index.rst
  22. +281 −281 {doc → docs}/make.bat
  23. +74 −0 docs/tutorials/adapters.md
  24. +130 −0 docs/tutorials/architecture.md
  25. +67 −0 docs/tutorials/contributing.md
  26. +29 −0 docs/tutorials/feature-matrix.rst
  27. +278 −0 docs/tutorials/otio-file-format-specification.md
  28. +163 −0 docs/tutorials/otio-timeline-structure.md
  29. +27 −0 docs/tutorials/quickstart.md
  30. +95 −0 docs/tutorials/versioning-schemas.md
  31. +63 −0 docs/tutorials/wrapping-otio.md
  32. +60 −0 docs/tutorials/write-a-media-linker.md
  33. +244 −0 docs/tutorials/write-an-adapter.md
  34. +60 −0 docs/use-cases/animation-shot-frame-ranges.md
  35. +36 −0 docs/use-cases/conform-new-renders-into-cut.md
  36. +53 −0 docs/use-cases/shots-added-removed-from-cut.md
  37. +2 −1 opentimelineio/adapters/adapter.py
  38. +39 −55 opentimelineio/adapters/cmx_3600.py
  39. +25 −41 opentimelineio/adapters/fcp_xml.py
  40. +27 −40 opentimelineio/algorithms/filter.py
  41. +2 −6 opentimelineio/algorithms/stack_algo.py
  42. +6 −17 opentimelineio/algorithms/track_algo.py
  43. +3 −3 opentimelineio/console/otioconvert.py
  44. +2 −2 opentimelineio/console/otiostat.py
  45. +30 −41 opentimelineio/core/composition.py
  46. +7 −6 opentimelineio/core/item.py
  47. +19 −23 opentimelineio/core/serializable_object.py
  48. +9 −8 opentimelineio/core/type_registry.py
  49. +26 −44 opentimelineio/opentime.py
  50. +2 −4 opentimelineio/schema/serializable_collection.py
  51. +1 −5 opentimelineio/schema/timeline.py
  52. +18 −23 opentimelineio/schema/track.py
  53. +1 −2 opentimelineio/schema/transition.py
  54. +1 −0 setup.py
  55. +1 −2 tests/test_adapter_plugin.py
  56. +1 −1 tests/test_json_backend.py
  57. +2 −2 tests/test_media_linker.py
  58. +1 −1 tests/test_plugin_detection.py
  59. +1 −1 tests/utils.py
  60. +47 −0 tox.ini
View
@@ -8,3 +8,7 @@ dist*
# Pycharm metadata
.idea/
# These files are generated, don't put them into source control
docs/api
.tox
View
@@ -0,0 +1,6 @@
build:
image: latest
python:
version: 3.6
setup_py_install: true
View
@@ -19,16 +19,12 @@ before_install:
- wget -qO /tmp/${PYAAF} "https://github.com/markreidvfx/pyaaf/releases/download/v1.0.0/${PYAAF}"
install:
- pip install pep8 pyflakes flake8 coverage
- pip install Pillow # only needed for some contrib adapters
- pip install --upgrade pip setuptools wheel
# tox-travis installs tox and also makes working with travis better.
- pip install tox-travis coverage
- pip install /tmp/${PYAAF}
script:
- make lint
- make test
# Build coverage which will get uploaded to codecov
- make coverage
- tox
after_success:
# Documentation for codecov uploader
View
@@ -0,0 +1,17 @@
include README.md CHANGELOG.md LICENSE.txt NOTICE.txt
recursive-include examples *
recursive-exclude docs *
prune docs
exclude .readthedocs.yml
exclude .codecov.yml
exclude .gitlab-ci.yml
exclude .travis.yml
exclude *.pdf
exclude CODE_OF_CONDUCT.md
exclude CONTRIBUTING.md
exclude opentimelineio_contrib/adapters/Makefile
exclude Makefile
recursive-exclude opentimelineio_contrib/adapters/tests *
recursive-exclude tests *
View
@@ -20,7 +20,7 @@ $(ccblue) pip install -e .[dev]$(newline)$(ccend)
endef
COV_PROG := $(shell command -v coverage 2> /dev/null)
PEP8_PROG := $(shell command -v pep8 2> /dev/null)
PYCODESTYLE_PROG := $(shell command -v pycodestyle 2> /dev/null)
PYFLAKES_PROG := $(shell command -v pyflakes 2> /dev/null)
FLAKE8_PROG := $(shell command -v flake8 2> /dev/null)
# AUTOPEP8_PROG := $(shell command -v autopep8 2> /dev/null)
@@ -82,8 +82,8 @@ clean:
# run the codebase through flake8. pep8 and pyflakes are called by flake8.
lint:
ifndef PEP8_PROG
$(error $(newline)$(ccred)pep8 is not available on $$PATH please see:$(newline)$(ccend)\
ifndef PYCODESTYLE_PROG
$(error $(newline)$(ccred)pycodestyle is not available on $$PATH please see:$(newline)$(ccend)\
$(ccblue) https://pypi.python.org/pypi/pep8#installation$(newline)$(ccend)\
$(dev_deps_message))
endif
@@ -102,4 +102,4 @@ endif
# generate documentation in html
doc-html:
@make -C doc html | sed 's#build/#doc/build/#g'
@tox -e build-docs
View
@@ -36,6 +36,10 @@ You can provide adapters for your video editing tool or pipeline as needed.
Each adapter allows for import/export between that proprietary tool and the
OpenTimelineIO format.
Documentation
--------------
[Documentation is available on ReadTheDocs](https://opentimelineio.readthedocs.io/)
Use Cases
---------
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
File renamed without changes.
View
No changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.

0 comments on commit 48c035a

Please sign in to comment.