Skip to content

Commit

Permalink
Merge branch 'develop' into enhancement/AY-2224_add_show_in_ftrack_la…
Browse files Browse the repository at this point in the history
…uncher_action
  • Loading branch information
iLLiCiTiT authored Sep 18, 2024
2 parents 048ad57 + a9b5314 commit 55f367d
Show file tree
Hide file tree
Showing 326 changed files with 4,236 additions and 29,963 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/pr_linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 📇 Code Linting

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number}}
cancel-in-progress: true

permissions:
contents: read
pull-requests: write

jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
13 changes: 13 additions & 0 deletions .github/workflows/release_trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 🚀 Release Trigger

on:
workflow_dispatch:

jobs:
call-release-trigger:
# TODO reference proper action
uses: ynput/ci-testing/.github/workflows/release_basic.yml@develop
secrets:
token: ${{ secrets.YNPUT_BOT_TOKEN }}
email: ${{ secrets.CI_EMAIL }}
user: ${{ secrets.CI_USER }}
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This project provides three elements for the AYON pipeline:
* server - The AYON backend Addon.
* client - The AYON (currently OpenPype) desktop integration.
* client - The AYON desktop integration.
* services - Standalone dockerized daemons that act based on events (aka `leecher` and `processors`).

There is a common code that can be re-used for `server`, `client` and `services`. Is located inside client code for developer mode `./client/ayon_ftrack/common/`.
Expand Down Expand Up @@ -33,6 +33,46 @@ As mentioned there are 2 services `leecher` and `processor`. Both services have

To run services locally (recommended only for development purposes), there are 2 possible approaches. One is by running docker image, or using prepared service tools.

- `leecher` - Service that listens to ftrack events and stores them in the AYON database.
- `processor` - Service that is processing ftrack events stored in the AYON database. Only one event is processed at a time.

### Processor
Processor contains multiple event handlers that handle synchronization or basic automations helpers. It also provides a way to add custom event handlers from other addons. The addon must be loaded into the server, and must be available in bundle based on variant that service is running in ("production", "staging" or dev bundle).
The addon also must have prepared archive file that can be downloaded from the server.

#### Archive file
The archive file can be a zip or tar, must contain `manifest.json` file that describes the content. The archive file must be uploaded to the server and must be available for download. The addon must implement `get_custom_ftrack_handlers_endpoint` method that returns URL to the archive file.

```python
class SomeAddon(BaseServerAddon):
name = "some_addon"
version = "1.0.0"

def get_custom_ftrack_handlers_endpoint(self) -> str:
return "addons/{self.name}/{self.version}/private/ftrack_handlers.tar.gz"
```

#### Manifest file
Manifest file is a JSON file that describes the content of the archive file. It is used to load the content of the archive file into the processor. The file must be named `manifest.json` and must be in the root of the archive file.

```json
{
"version": "1.0.0",
"handler_subfolders": [
"event_handlers"
],
"python_path_subfolders": [
"common"
]
}
```
Content of manifect may change in future, to be able to track changes and keep backwards compatibilit a `"version"` was added. Current version is `"1.0.0"`.

<b>1.0.0</b>
- `handler_subfolders` - List of subfolder, relative to manifest.json where files with event handlers can be found. Processor will go through all of the subfolders and import all python files that are in the subfolder. It is recommended to have only one subfolder.
- `python_path_subfolders` - Optional list of subfolders, relative to manifest.json. These paths are added to `sys.path` so content inside can be imported. Can be used for "common" code for the event handlers. It is not recommended to add python modules because of possible conflicts with other addons, but is possible.


### Start as docker
Both services have prepared scripts to build and run docker images. There are 2 scripts `manage.ps1` for Windows and `Makefile` for Linux. Both scripts are doing the same thing and have same commands.

Expand Down
3 changes: 3 additions & 0 deletions client/ayon_ftrack/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .version import __version__
from .ftrack_addon import (
FtrackAddon,
FTRACK_ADDON_DIR,
Expand All @@ -6,6 +7,8 @@
)

__all__ = (
"__version__",

"FtrackAddon",
"FTRACK_ADDON_DIR",

Expand Down
2 changes: 1 addition & 1 deletion client/ayon_ftrack/common/custom_attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"fps": {
"label": "FPS",
"type": "number",
"config": {"isdecimal": true}
"config": {"isdecimal": true, "precision": 6}
},
"clipIn": {
"label": "Clip in",
Expand Down
Loading

0 comments on commit 55f367d

Please sign in to comment.