Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2b46652
Create python-package.yml
jacobmartinez3d Nov 6, 2020
04f9848
Development (#11)
jacobmartinez3d Nov 6, 2020
12cebfd
Update README.md
jacobmartinez3d Nov 7, 2020
8602d7b
Update python-package.yml
jacobmartinez3d Nov 7, 2020
302e92f
Update README.md
jacobmartinez3d Nov 8, 2020
fd5c68b
Update README.md
jacobmartinez3d Nov 8, 2020
3550079
Update README.md
jacobmartinez3d Nov 8, 2020
7a10a99
Update README.md
jacobmartinez3d Nov 8, 2020
2d2e656
merge with development
jacobmartinez3d Jan 1, 2021
a1ca32c
merge with development
jacobmartinez3d Jan 1, 2021
d26a730
Merge branch 'master' of https://github.com/magnetic-lab/magla
jacobmartinez3d Jan 1, 2021
9acc9b7
remove old workflow config
jacobmartinez3d Jan 1, 2021
c3a7142
initial commit
jacobmartinez3d Jan 10, 2021
c960982
make creation more consistent
jacobmartinez3d Jun 28, 2021
97fee9a
merge with magla-web work
jacobmartinez3d Jun 28, 2021
19e2aae
implement the 'create_from_config' method
jacobmartinez3d Jul 4, 2021
efcd10a
fix tests and seed data
jacobmartinez3d Jul 5, 2021
f566c52
change JSONB --> JSON
jacobmartinez3d Jul 5, 2021
5c7be83
add configparser module to setup.py
jacobmartinez3d Jul 5, 2021
5435d97
fixes/changes from magla-web integration
jacobmartinez3d Nov 15, 2021
03436af
Improve `setup.py`
jacobmartinez3d Dec 19, 2021
32a62bd
Add logging
jacobmartinez3d Dec 19, 2021
271d13e
Add `description` property
jacobmartinez3d Dec 19, 2021
8189901
add logging
jacobmartinez3d Dec 19, 2021
14a258f
bugfixes and improvements to
jacobmartinez3d Dec 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 52 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<img src="media/magla_banner.png">
</p>

![Python package](https://github.com/magnetic-lab/magla/workflows/Python%20package/badge.svg?branch=master)
![stability-experimental](https://img.shields.io/badge/stability-experimental-orange.svg)

## Magnetic-Lab Pipeline API for Content Creators

Magla is an effort to bring the magic of large-scale professional visual effects pipelines to small-scale studios and freelancers - for free. Magla features a backend designed to re-enforce the contextual relationships between things in a visual effects pipeline - a philosophy which is at the core of Magla's design. The idea is that with any given `MaglaEntity` one can traverse through all the related `entities` as they exist in the DB. This is achieved with a `Postgres` + `SQLAlchemy` combination allowing for an excellent object-oriented interface with powerful SQL queries and relationships behind it.

#### Example:
Expand All @@ -22,10 +22,11 @@ project_settings = user.assignments[-1].shot_version.shot.project.settings
project_settings = user.assignments[-1].project.settings
```
Comparing the above examples to the diagrom below and you can see the connective routes that can be traversed based on Magla's schema relationships:

<img src="media/ERD.png">

### [OpenTimelineIO](https://github.com/PixarAnimationStudios/OpenTimelineIO)-centric design
In the heat of production there is always a consistent demand for creating, viewing, and generally altering edits in various ways and in various contexts, for all kinds of reasons. This is the reason for another core philosophy of Magla, which is that timelines and edits should be the driving force of the pipeline. In simple terms the goal in a Magla production-environment is to create, mutate, and move data into a refined form: an edit(s) capable of outputting various formats demanded by the client.
In the heat of production there is always a consistent demand for creating, viewing, and generally altering edits in various ways and in various contexts, for all kinds of reasons. This is the reason for another core philosophy of Magla, which is that timelines and edits should be the driving force of the pipeline.

In Magla, timelines can be requested, and then dynamically generated on the fly using your production data. This will enable superior features development and automation, as well as hopefully break some shackles and give the idea of an edit more of an expressionistic, non-binding and ultimitely, more creative feeling.

Expand All @@ -38,6 +39,34 @@ Breakdown of `MaglaEntity` types and their associated `opentimelineio.schema` ty

in the Magla ecosystem `ShotVersion`'s are considered sacred and only one can be current at any given time, even new assignments result in new versions. For this reson they are used as the actual `ExternalReference` of the shot `Clip` - so only the latest versions of shots are used as meda references. Each time you instantiate a `MaglaProject` object it builds its otio data off of current production data and thus is always up-to-date and **requires no actual timeline file to be archived on disk or kept track of**.

## Getting Started
You will need to first set the following environment variables required for `magla` to function:

- `MAGLA_DB_DATA_DIR` <-- this is where your `sqlite` db will be written to
- `MAGLA_DB_NAME` <-- name of your DB
- `MAGLA_MACHINE_CONFIG_DIR` <-- this directory holds information about the current machine needed by `magla`

Linux:
```bash
export MAGLA_DB_DATA_DIR=/path/to/magla_data_dir
export MAGLA_DB_NAME=magla
export MAGLA_MACHINE_CONFIG_DIR=/path/to/magla_machine_dir
```

Windows:
```cmd
SET MAGLA_DB_DATA_DIR="<drive>:\\path\to\magla_data_dir"
SET MAGLA_DB_NAME="magla"
SET MAGLA_MACHINE_CONFIG_DIR="<drive>:\\path\to\magla_machine_dir"
```

### Installing
```bash
git clone https://github.com/magnetic-lab/magla.git
cd magla
pip install .
```

### Example Initial Setup
All creation and deletion methods are in `magla.Root`, so this is primarily a demonstration of
using the creation methods in the optimal order.
Expand Down Expand Up @@ -69,7 +98,7 @@ user = r.create_user(getpass.getuser())

# create Facility
facility = r.create_facility("test_facility",
settings={"tool_install_directory_label": "{tool_version.tool.name}_{tool_version.string}"})
settings={"tool_install_directory_label": "{tool_version.tool.name}_{tool_version.vstring}"})
```
The above creates a new `Postgres` column in the 'facilities' table and returns a `MaglaFacility` object pre-populated with data in the '<MaglaEntity>.data' property.

Expand Down Expand Up @@ -112,7 +141,7 @@ test_project = r.create_project("test", "/mnt/projects/test",
}],
"shot_version_bookmarks": {
"representations": {
"png_sequence": "{shot_version.directory.path}/_out/png/{shot_version.full_name}.####.png"
"png_sequence": "{shot_version.directory.path}/_out/png/{shot_version.fullname}.####.png"
}
}
},
Expand Down Expand Up @@ -179,6 +208,25 @@ t.build(test_project.shots)
t.otio.to_json_file("test_project.json")
```

### Development Setup:
Running tests require a `MAGLA_TEST_DIR` environment varable pointing to a directory containing `seed_data.yaml` and `test_project.otio` files. Initially you can set this to the included `magla/tests` directory.
```bash
export MAGLA_TEST_DIR=/path/to/magla/tests
```

#### Installing in dev mode:
```bash
git clone https://github.com/magnetic-lab/magla.git
cd magla
pip install .[dev]
```

#### Running coverage report and tests:
```bash
coverage run --source magla -m pytest -v
coverage report
```

## Magla Roadmap
<p>
<img src="media/magla.png">
Expand Down
Loading