Skip to content

Commit 044f39d

Browse files
Use glossary terms for environment variables references in the docs (AcademySoftwareFoundation#1442)
* Use glossary terms for environment variables references in the docs * Add documentation for livereload Signed-off-by: Jean-Christophe Morin <[email protected]> Signed-off-by: Michele Spina <[email protected]>
1 parent 1589c1b commit 044f39d

File tree

9 files changed

+49
-20
lines changed

9 files changed

+49
-20
lines changed

docs/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ help:
2121
@echo " htmlstrict to make standalone HTML files and fails if any warnings or errors are produced"
2222
@echo " dirhtml to make HTML files named index.html in directories"
2323
@echo " singlehtml to make a single large HTML file"
24+
@echo " livehtml to make standalone HTML files served by a web server that will automatically reload and rebuild when a file changes"
2425
@echo " pickle to make pickle files"
2526
@echo " json to make JSON files"
2627
@echo " htmlhelp to make HTML files and a HTML help project"
@@ -73,6 +74,10 @@ singlehtml:
7374
@echo
7475
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
7576

77+
.PHONY: livehtml
78+
livehtml:
79+
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
80+
7681
.PHONY: pickle
7782
pickle:
7883
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle

docs/tutorials/architecture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ A range in time. Encodes the start time and the duration, meaning that end_time
109109

110110
OpenTimelineIO includes several adapters for reading and writing from other file formats. The `otio.adapters` module has convenience functions that will auto-detect which adapter to use, or you can specify the one you want.
111111

112-
Adapters can be added to the system (outside of the distribution) via JSON files that can be placed on the `OTIO_PLUGIN_MANIFEST_PATH` environment variable to be made available to OTIO.
112+
Adapters can be added to the system (outside of the distribution) via JSON files that can be placed on the {term}`OTIO_PLUGIN_MANIFEST_PATH` environment variable to be made available to OTIO.
113113

114114
Most common usage only cares about:
115115
- `timeline = otio.adapters.read_from_file(filepath)`
@@ -127,7 +127,7 @@ For more information, see [How To Write An OpenTimelineIO Adapter](write-an-adap
127127

128128
Media linkers run on the otio file after an adapter calls `.read_from_file()` or `.read_from_string()`. They are intended to replace media references that exist after the adapter runs (which depending on the adapter are likely to be `MissingReference`) with ones that point to valid files in the local system. Since media linkers are plugins, they can use proprietary knowledge or context and do not need to be part of OTIO itself.
129129

130-
You may also specify a media linker to be run after the adapter, either via the `media_linker_name` argument to `.read_from_file()` or `.read_from_string()` or via the `OTIO_DEFAULT_MEDIA_LINKER` environment variable. You can also turn the media linker off completely by setting the `media_linker_name` argument to `otio.media_linker.MediaLinkingPolicy.DoNotLinkMedia`.
130+
You may also specify a media linker to be run after the adapter, either via the `media_linker_name` argument to `.read_from_file()` or `.read_from_string()` or via the {term}`OTIO_DEFAULT_MEDIA_LINKER` environment variable. You can also turn the media linker off completely by setting the `media_linker_name` argument to `otio.media_linker.MediaLinkingPolicy.DoNotLinkMedia`.
131131

132132
For more information about writing media linkers, see [How To Write An OpenTimelineIO Media Linker](write-a-media-linker).
133133

docs/tutorials/otio-env-variables.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,39 @@ various aspects of OTIO.
55

66
## Plugin Configuration
77

8-
These variables must be set _before_ the OpenTimelineIO python library is imported. They only impact the python library. The C++ library has no environment variables.
8+
These variables must be set _before_ the OpenTimelineIO python library is imported. They only impact the python library. The C++ library has no environment variables.
99

10-
- `OTIO_PLUGIN_MANIFEST_PATH`: a ":" separated string with paths to .manifest.json files that contain OTIO plugin manifests. See: [Tutorial on how to write an adapter plugin](write-an-adapter).
11-
- `OTIO_DEFAULT_MEDIA_LINKER`: the name of the default media linker to use after reading a file, if "" then no media linker is automatically invoked.
12-
- `OTIO_DISABLE_PKG_RESOURCE_PLUGINS`: By default, OTIO will use the pkg_resource entry_points mechanism to discover plugins that have been installed into the current python environment. pkg_resources, however, can be slow in certain cases, so for users who wish to disable this behavior, this variable can be set to 1.
13-
- `OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL`: if no downgrade arguments are passed to `write_to_file`/`write_to_string`, use the downgrade manifest specified by the family/label combination in the variable. Variable is of the form FAMILY:LABEL. Only one tuple of FAMILY:LABEL may be specified.
10+
```{glossary}
11+
12+
OTIO_PLUGIN_MANIFEST_PATH
13+
A colon (`:`) on POSIX system (or a semicolon (`;`) on Windows) separated string with paths
14+
to `.manifest.json` files that contain OTIO plugin manifests.
15+
See the [tutorial on how to write an adapter plugin](write-an-adapter.md) for additional details.
16+
17+
OTIO_DEFAULT_MEDIA_LINKER
18+
The name of the default media linker to use after reading a file, if `""` then no
19+
media linker is automatically invoked.
20+
21+
OTIO_DISABLE_PKG_RESOURCE_PLUGINS
22+
By default, OTIO will use the `pkg_resource` entry_points mechanism to discover plugins
23+
that have been installed into the current python environment. `pkg_resources`, however, can
24+
be slow in certain cases, so for users who wish to disable this behavior, this variable can be set to 1.
25+
26+
OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL
27+
If no downgrade arguments are passed to `write_to_file`/`write_to_string`, use the downgrade manifest
28+
specified by the family/label combination in the variable. Variable is of the form `FAMILY:LABEL`.
29+
Only one tuple of `FAMILY:LABEL` may be specified.
30+
```
1431

1532
## Unit tests
1633

1734
These variables only impact unit tests.
1835

19-
- `OTIO_DISABLE_SHELLOUT_TESTS`: When running the unit tests, skip the console tests that run the otiocat program and check output through the shell. This is desirable in environments where running the commandline tests is not meaningful or problematic. Does not disable the tests that run through python calling mechanisms.
20-
- `OTIO_DISABLE_SERIALIZED_SCHEMA_TEST`: Skip the unit tests that generate documentation and compare the current state of the schema against the stored one. Useful if the documentation is not available from the test directory.
36+
```{glossary}
37+
38+
OTIO_DISABLE_SHELLOUT_TESTS
39+
When running the unit tests, skip the console tests that run the otiocat program and check output through the shell. This is desirable in environments where running the commandline tests is not meaningful or problematic. Does not disable the tests that run through python calling mechanisms.
40+
41+
OTIO_DISABLE_SERIALIZED_SCHEMA_TEST
42+
Skip the unit tests that generate documentation and compare the current state of the schema against the stored one. Useful if the documentation is not available from the test directory.
43+
```

docs/tutorials/versioning-schemas.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ sc->to_json_file("/var/tmp/simpleclass.otio", &err, &downgrade_manifest);
164164
165165
In python, an additional level of indirection is provided, "FAMILY", which is intended to allow developers to define their own sets of target versions for their plugin schemas. For example, a studio might have a family named "MYFAMILY" under which they organize labels for their internal releases of their own plugins.
166166
167-
These can be defined in a plugin manifest, which is a `.plugin_manifest.json` file found on the environment variable `${OTIO_PLUGIN_MANIFEST_PATH}`.
167+
These can be defined in a plugin manifest, which is a `.plugin_manifest.json` file found on the environment variable {term}`OTIO_PLUGIN_MANIFEST_PATH`.
168168
169169
For example:
170170
@@ -204,19 +204,19 @@ See the [versioning module](../api/python/opentimelineio.versioning.rst) for mor
204204
If you are using multiple pieces of software built with mismatched versions of OTIO, you may need to configure the newer one(s) to write out OTIO in an older format without recompiling or modifying the software.
205205

206206
You can accomplish this in two ways:
207-
- The `OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL` environment variable can specify a family and version.
207+
- The {term}`OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL` environment variable can specify a family and version.
208208
- The `otioconvert` utility program can downgrade an OTIO file to an older version.
209209

210210
### OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL Environment Variable
211211

212-
If your software uses OTIO's Python adapter system, then you can set the `OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL` environment variable with a `FAMILY:VERSION` value.
212+
If your software uses OTIO's Python adapter system, then you can set the {term}`OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL` environment variable with a `FAMILY:VERSION` value.
213213
For example, in a *nix shell: `env OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL=OTIO_CORE:0.14.0 my_program`
214214

215215
The `OTIO_CORE` family is pre-populated with the core OTIO schema versions for previous OTIO releases, for example `0.14.0`. If you have custom schema that needs to be downgraded as well, you will need to specify your own family and version mapping, as described above.
216216

217217
### Downgrading with otioconvert
218218

219-
If your software uses OTIO's C++ API, then it does not look for the `OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL` environment variable, but you can convert an OTIO file after it has been created with the `otioconvert` utility.
219+
If your software uses OTIO's C++ API, then it does not look for the {term}`OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL` environment variable, but you can convert an OTIO file after it has been created with the `otioconvert` utility.
220220

221221
You can either use a family like this:
222222
```

docs/tutorials/write-a-hookscript.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ To create a new OTIO hook script, you need to create a file myhooks.py. Then add
4545

4646
The ``hook_scripts`` section will register the plugin with the system, and the ``hooks`` section will attach the scripts to hooks.
4747

48-
Then you need to add this manifest to your `$OTIO_PLUGIN_MANIFEST_PATH` environment variable (which is separated with `:` for POSIX or `;` for Windows). You may also define media linkers and adapters via the same manifest.
48+
Then you need to add this manifest to your {term}`OTIO_PLUGIN_MANIFEST_PATH` environment variable.
49+
You may also define media linkers and adapters via the same manifest.
4950

5051
## Running a Hook Script
5152

docs/tutorials/write-a-media-linker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ To create a new OTIO Adapter, you need to create a file mymedialinker.py. Then a
3333
}
3434
```
3535
36-
Then you need to add this manifest to your `$OTIO_PLUGIN_MANIFEST_PATH` environment variable (which is separated with `:` for POSIX or `;` for Windows).
36+
Then you need to add this manifest to your {term}`OTIO_PLUGIN_MANIFEST_PATH` environment variable.
3737

38-
Finally, to specify this linker as the default media linker, set `OTIO_DEFAULT_MEDIA_LINKER` to the name of the media linker:
38+
Finally, to specify this linker as the default media linker, set {term}`OTIO_DEFAULT_MEDIA_LINKER` to the name of the media linker:
3939

4040
```bash
4141
export OTIO_DEFAULT_MEDIA_LINKER="awesome_studios_media_linker"

docs/tutorials/write-a-schemadef.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ Then you must add it to a plugin manifest:
8484

8585
The same plugin manifest may also include adapters and media linkers, if desired.
8686

87-
Then you need to add this manifest to your `$OTIO_PLUGIN_MANIFEST_PATH` environment
88-
variable (which is separated with `:` for POSIX or `;` for Windows).
87+
Then you need to add this manifest to your {term}`OTIO_PLUGIN_MANIFEST_PATH` environment
88+
variable.
8989

9090
## Using the New Schema in Your Code
9191

docs/tutorials/write-an-adapter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ And a `plugin_manifest.json` like:
9595

9696
### Custom Adapters
9797

98-
Alternately, if you are creating a site specific adapter that you do _not_ intend to share with the community, you can create your `myadapter.py` file anywhere. In this case, you must create a `mysite.plugin_manifest.json` (with an entry like the below example that points at `myadapter.py`) and then put the path to your `mysite.plugin_manifest.json` on your `$OTIO_PLUGIN_MANIFEST_PATH` environment variable (which is separated with `:` for POSIX or `;` for Windows).
98+
Alternately, if you are creating a site specific adapter that you do _not_ intend to share with the community, you can create your `myadapter.py` file anywhere. In this case, you must create a `mysite.plugin_manifest.json` (with an entry like the below example that points at `myadapter.py`) and then put the path to your `mysite.plugin_manifest.json` on your {term}`OTIO_PLUGIN_MANIFEST_PATH` environment variable.
9999

100100
For example, to register `myadapter.py` that supports files with a `.myext` file extension:
101101
```json

src/py-opentimelineio/opentimelineio/plugins/manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def load_manifest():
220220
221221
The order of loading (and precedence) is:
222222
223-
1. Manifests specified via the ``OTIO_PLUGIN_MANIFEST_PATH`` variable
223+
1. Manifests specified via the :term:`OTIO_PLUGIN_MANIFEST_PATH` variable
224224
2. Entrypoint based plugin manifests
225225
3. Builtin plugin manifest
226226
4. Contrib plugin manifest

0 commit comments

Comments
 (0)