This monorepo contains the source code for ftrack integrations, divided on apps (ex: Connect), libs (ex: framework libraries) and projects (ex: Integrations).
See full documentation here.
We use Poetry to build and test independent packages in this repository, and to manage the dependencies between them.
git clone https://github.com/ftrackhq/integrations
or download the source ZIP from the Integrations repository on Github.
Follow these steps to prepare your environment:
- Install Poetry.
- Create a Python >=3.7, <3.12 virtual environment. If you're using an Apple Silicon chip, and python <3.10 follow the instructions in the How to install compatible PySide2 on Silicon based Mac section.
Follow these steps to install a compatible version of PySide2 Python >=3.7, <3.12 on a Silicon-based Mac:
- Open a Rosetta terminal:
- Duplicate the terminal application and check the "Open using Rosetta" checkbox inside the "Get Info" right-click menu.
- Install brew for x86_64 architecture:
- Run the following command:
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Create an alias named
ibrew
to identify the Intel brew:alias ibrew="arch -x86_64 /usr/local/bin/brew"
- Run the following command:
- Install the Python version with the Intel brew:
- Run the following command:
ibrew install python@3.7
- Run the following command:
- Install
virtualenv
:- Run the following command:
/usr/local/opt/python@3.7/bin/pip3 install virtualenv
- Run the following command:
- Create a new virtual environment and activate it:
- Run the following command to create the virtualenv:
/usr/local/opt/python@3.7/bin/python3 -m virtualenv <path-to-where-you-want-it>
- Run the following command:
source <path-to-where-you-want-it>/bin/activate
- Run the following command to create the virtualenv:
We run Black version 23.1.0 on the codebase to ensure consistent formatting.
To be sure that code is properly formatted before committing code, enable the Git black pre commit hook by running this commands::
pip install pre-commit
pre-commit install
We run PyTest ^7.4 on the codebase to ensure the consistency of our monorepo. Please make sure you pip install PyTest if you want to run the unit tests.
- Got to the repository root and execute the following command to run all the monorepo available unit tests:
PyTest
- And This command to execute a specific tests: (Example using framework)
PyTest tests/framework/unit/
- Update version of the library
- Update the release notes date and provide a PR
- Create a tag for the library to be released
- Once tag is pushed the CI action will start and will publish to PyPi test
git tag -a utils/v2.2.0 -m "" && git push origin utils/v2.2.0
- Review PyPi Test publication
- Approve the deployment on the CI and will automatically release to Prod pypi
- Note: Remember that libraries has dependencies to other libraries, follow this release order if you want to make sure to always use he latest version: utils - constants - framework-core - qt-style - qt - framework-qt
- Add pypi test as publishable repository: https://python-poetry.org/docs/repositories/#publishable-repositories
- Configure credentials using the token provided in 1Password PyPi-TEST-ftrack-utils : https://python-poetry.org/docs/repositories/#publishable-repositories (Make sure to point to the testpypi repo)
- poetry config pypi-token.testpypi
- Publish to test Pypi:
- poetry publish -r testpypi --build
Package | Path | Description |
---|---|---|
connect | app/connect | The desktop application that discovers and launches the DCC integrations and drives widget plugins. |
Package | Path | Description |
---|---|---|
app-installer | installers/app-installer | ftrack app installer |
Package | Path | Description |
---|---|---|
constants | libs/constants | ftrack constants integrations library |
framework-core | libs/framework-core | The core framework library |
framework-qt | libs/framework-qt | Integrations Framework qt library, contains framework qt widgets and utilities used in the framework |
qt | libs/qt | ftrack qt integrations library, contains generic qt widgets used in integrations |
qt-style | libs/qt-style | ftrack qt-style contains the ftrack style for the qt library. |
utils | libs/utils | ftrack utility library |
Package | Path | Description |
---|---|---|
connect-publisher-widget | projects/connect-publisher-widget | The standalone publisher widget in Connect |
connect-timetracker-widget | projects/connect-timetracker-widget | TimeTracker connect widget |
framework-common-extensions | projects/framework-common-extensions | Framework project which contains the default provided common extensions for the framework |
framework-maya | projects/framework-maya | Maya DCC framework integration |
framework-nuke | projects/framework-nuke | Nuke DCC framework integration |
framework-photoshop | projects/framework-photoshop | Photoshop DCC framework integration |
framework-photoshop-js | projects/framework-photoshop-js | Photoshop DCC framework integration JS code |
nuke-studio | projects/nuke-studio | Nuke Studio integration |
rv | projects/rv | RV player integration |
Package | Path | Description |
---|---|---|
style | resource/style | ftrack integrations style package |
Package | Path | Description |
---|---|---|
framework | test/framework | Framework unit and manual tests package. |
Package | Path | Description |
---|---|---|
cookiecutter-framework-project | tools/cookiecutter-framework-project | Cookiecutter template for framework integrations |
build | tools/build.py | Build tool to create connect plugins |