forked from maxpareschi/LabLib
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from ynput/release/0.1.0
Release 0.1.0
- Loading branch information
Showing
41 changed files
with
1,954 additions
and
568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: documentation | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main", "develop"] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
- uses: abatilo/actions-poetry@v2 | ||
- uses: conda-incubator/[email protected] | ||
- name: Install dependencies | ||
run: | | ||
poetry install | ||
- name: Install pandoc | ||
shell: bash -el {0} | ||
run: | | ||
conda install pandoc | ||
- name: Convert Readme to rst | ||
shell: bash -el {0} | ||
run: | | ||
pandoc ./README.md -o ./docs/README.rst | ||
- name: Sphinx build | ||
run: | | ||
poetry run sphinx-build ./docs ./docs/_build | ||
- name: Deploy to GitHub Pages | ||
if: github.event_name == 'push' | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
publish_branch: gh-pages | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/_build/ | ||
force_orphan: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: run all tests | ||
|
||
on: | ||
pull_request: | ||
branches: ["main", "develop"] | ||
|
||
jobs: | ||
full_test_suite: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: restore poetry cache | ||
uses: actions/cache@v4 | ||
id: restore-poetry | ||
with: | ||
path: .poetry | ||
key: ${{ runner.os }}-poetry | ||
|
||
- name: restore poetry lock file | ||
uses: actions/cache@v4 | ||
id: restore-poetry-lockfile | ||
with: | ||
path: poetry.lock | ||
key: ${{ runner.os }}-poetry-lockfile | ||
|
||
- name: restore vendor cache | ||
uses: actions/cache@v4 | ||
id: restore-vendor | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-vendor | ||
|
||
- name: install LabLib | ||
run: | | ||
.\start.ps1 install | ||
- name: get dependencies | ||
if: steps.restore-vendor.outputs.cache-hit != 'true' | ||
run: | | ||
.\start.ps1 get-dependencies | ||
- name: run all tests | ||
run: | | ||
.\start.ps1 test | ||
- name: save vendor dependencies cache | ||
if: steps.restore-vendor.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
id: cache-vendor | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-vendor | ||
|
||
- name: save poetry cache | ||
if: steps.restore-poetry.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
id: cache-poetry | ||
with: | ||
path: .poetry | ||
key: ${{ runner.os }}-poetry | ||
|
||
- name: save poetry lock file | ||
if: steps.restore-poetry-lockfile.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
id: cache-poetry-lockfile | ||
with: | ||
path: poetry.lock | ||
key: ${{ runner.os }}-poetry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,4 @@ results/ | |
.python-version | ||
|
||
test_results/ | ||
docs/_build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
LabLib | ||
====== | ||
|
||
Generate intermediate sequences for VFX processing using OIIO and | ||
FFMPEG! | ||
|
||
This module aims to help by providing helper classes and functions to: - | ||
Get basic info from videos and images using iinfo and ffprobe as a | ||
fallback. - Read and parse effect json outputted by | ||
`AYON/Openpype <https://github.com/ynput>`__ for pipeline automation. - | ||
Create a custom OCIO config file for direct use. - Create OIIO and | ||
FFMPEG matrix values to be used in filters for repositioning. - Create | ||
correctly formed OIIO commandline strings automatically. - Render out | ||
frames with Color and Repositioning baked in using oiiotool | ||
|
||
**DISCLAIMER** This is still a wip, and it’s currently missing a lot of | ||
functionality. Use at your own risk! | ||
|
||
Instructions | ||
------------ | ||
|
||
The core functionality relies on using **Processors** and **Operators** | ||
to compute the correct commandline parameters. | ||
|
||
**Operators** are single operation classes that hold your operation | ||
parameters (translation, luts, cdls etc.) | ||
|
||
**Processors** (usually classes such as ``ColorTransformProcessor``) | ||
compute **Operators** chains together. They can be fed ordered lists of | ||
dicts (with same name attributes as Operator classes) or ordered lists | ||
of **Operators** objects, or one at a time for secondary processing | ||
between the chained operations. On compute they return their relevant | ||
section of commandline flags to be passed to oiio. | ||
|
||
**Renderers** take care of returning the fully formed commanline command | ||
and executing it. | ||
|
||
Installation | ||
------------ | ||
|
||
LabLib requires ``python-3.9`` and uses ``poetry`` for managing its | ||
dependencies. | ||
|
||
It’s encouraged to use the provided PowerShell script to install and | ||
download the binaries for | ||
`oiiotool <https://www.patreon.com/posts/openimageio-oiio-63609827>`__, | ||
`ffmpeg <https://github.com/GyanD/codexffmpeg/releases/tag/7.0.1>`__, | ||
the `OCIO Color | ||
Configs <https://github.com/colour-science/OpenColorIO-Configs/releases/tag/v1.2>`__ | ||
and the font `Source Code | ||
Pro <https://fontsource.org/fonts/source-code-pro>`__ which is used in | ||
tests. | ||
|
||
- clone this repo | ||
- ``.\start.ps1 install`` | ||
- ``.\start.ps1 get-dependencies`` | ||
|
||
Testing | ||
~~~~~~~ | ||
|
||
You can run the full suite with ``.\start.ps1 test`` or to run custom | ||
``pytest`` commands make sure to be in the cloned repository’s directory | ||
and run ``poetry run pytest [ARGS]``. | ||
|
||
Contributing | ||
------------ | ||
|
||
The best way to contribute to LabLib currently is to write extensive | ||
test cases for all modules. But also sharing your thoughts and ideas on | ||
the `Discussions Page <https://github.com/ynput/LabLib/discussions>`__ | ||
really helps to keep this project going 💞 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import lablib | ||
|
||
project = "LabLib" | ||
copyright = "2024, maxpareschi, jakubjezek001, doerp" | ||
author = lablib.__author__ | ||
release = lablib.__version__ | ||
|
||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.todo", | ||
"sphinx.ext.viewcode", | ||
"sphinx.ext.napoleon", | ||
"sphinx_copybutton", | ||
] | ||
templates_path = ["_templates"] | ||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
||
html_theme = "furo" | ||
|
||
todo_include_todos = True | ||
|
||
autodoc_typehints = "none" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Generators | ||
========== | ||
|
||
.. automodule:: lablib.generators | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Welcome to LabLib's documentation! | ||
================================== | ||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
📚 README <README> | ||
modules | ||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Lib | ||
=== | ||
|
||
.. automodule:: lablib.lib | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=. | ||
set BUILDDIR=_build | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
⚙️ Module Documentation | ||
======================= | ||
|
||
This page contains auto-generated documentation for all exposed modules. | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
lib | ||
operators | ||
generators | ||
processors | ||
renderers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Operators | ||
========= | ||
|
||
.. automodule:: lablib.operators | ||
:members: |
Oops, something went wrong.