Skip to content

Commit f635cee

Browse files
feat: Add queuer/worker compatibility check (#40)
* initial dev versioning detection * Started on github commit query * Added git based update checking * Add versioning detection when not package * FIX: Merge from main, start worker compat testing * FIX: Catch timeout when calling GitHub API * FEAT: Queuer/Worker version mismatch warning working * Moved worker check to CLI queue cmd, better logging * feat: Add setting to bypass worker compat check - Fix notify function in helpers - Fix `worker_use_win_terminal` setting * docs: Update README - Recommend pipx to deal with dependency conflicts - Explain potential issues with running Python 3.6 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 2290a8e commit f635cee

File tree

14 files changed

+687
-109
lines changed

14 files changed

+687
-109
lines changed

.github/workflows/ci.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
Quality:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-python@v2
14+
with:
15+
python-version: 3.6
16+
- name: Install Python Poetry
17+
uses: abatilo/[email protected]
18+
with:
19+
poetry-version: 1.1.2
20+
21+
- name: View poetry version
22+
run: poetry --version
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m poetry install
27+
28+
- name: Lint with flake8
29+
run: |
30+
# stop the build if there are Python syntax errors or undefined names
31+
python -m poetry run flake8 . --exclude .venv --count --select=E9,F63,F7,F82 --show-source --statistics
32+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
33+
python -m poetry run flake8 . --exclude .venv --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
34+
35+
- name: Test with pytest
36+
run: |
37+
python -m poetry run python -m pytest -v tests
38+
39+
Release:
40+
needs: Quality
41+
# https://github.community/t/how-do-i-specify-job-dependency-running-in-another-workflow/16482
42+
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, 'chore(release):')
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/setup-python@v2
46+
with:
47+
python-version: 3.6
48+
49+
- name: Checkout code
50+
uses: actions/checkout@v2
51+
52+
- name: Semantic Release
53+
run: |
54+
pip install python-semantic-release
55+
git config user.name github-actions
56+
git config user.email [email protected]
57+
semantic-release publish

.github/workflows/gh-page-deploy.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: gh-page-deploy
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-python@v2
13+
with:
14+
python-version: 3.x
15+
- run: pip install mkdocs-material \
16+
mkdocs-material \
17+
mkdocs-awesome-pages-plugin \
18+
- run: mkdocs gh-deploy --force

README.md

+26-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
## What's it for? ##
1111
DaVinci Resolve Studio has a fantastic remote-rendering system built-in that allows queuing renders on other networked Resolve computers.
1212
Unfortunately Resolve doesn't have a remote-rendering, or even background-rendering solution for proxies.
13-
Resolve Proxy Encoder is a Python application that can be used in a similar way to Resolve's remote-rendering system, but for proxies.
13+
*Resolve Proxy Encoder* is a Python application that can be used in a similar way to Resolve's remote-rendering system, but for proxies.
1414

1515
## How does it work? ##
1616
**Resolve Proxy Encoder works using three major parts:**
@@ -24,7 +24,7 @@ Resolve Proxy Encoder is a Python application that can be used in a similar way
2424
- DaVinci Resolve Studio, with scripting set up (read Resolve's scripting README)
2525
- Redis or RabbitMQ broker (preferably running on a NAS or server)
2626
- Worker computers (decent resources, connected to LAN, can access source media and proxies output folder)
27-
- Resolve Proxy Encoder installed on every 'queuer' and 'worker'. Not necessary to run broker.
27+
- *Resolve Proxy Encoder* installed on every 'queuer' and 'worker'. Not necessary to run broker.
2828

2929
**It also makes a few assumptions about the way you have your environment set up:**
3030
- Running Windows (Mac OS, Linux and BSD untested - though should be easy to make work)
@@ -34,11 +34,28 @@ Resolve Proxy Encoder is a Python application that can be used in a similar way
3434

3535
## How do I install it?
3636

37+
### A Warning about Python 3.6
38+
39+
Because DaVinci Resolve requires Python 3.6 to communicate with it's API, no versions over Python 3.6 will work with *Resolve Proxy Encoder*.
40+
Unfortunately this means that *Resolve Proxy Encoder* may get stuck using older versions of certain packages as they begin to drop support for 3.6.
41+
It also means that security patches for some dependencies won't make it into *Resolve Proxy Encoder*
42+
This kind of setup almost guarantees dependency conflicts if you have multiple Python CLI tools you keep installed.
43+
To mitigate this you can:
44+
45+
- Use Python 3.6 for *Resolve Proxy Encoder* **ONLY** and install a newer Python alongside for your other needs.
46+
47+
- Install a tool like *pipx* that isolates Python CLI tools with their own virtual environments but keeps them on path.
48+
49+
3750
### CLI / Worker
3851
The CLI app is bundled with everything necessary to queue from Resolve and start workers that run the encoding.
3952
```
4053
py -3.6 -m pip install git+https://github.com/in03/Resolve-Proxy-Encoder
4154
```
55+
Or with *pipx*
56+
```
57+
pipx install git+https://github.com/in03/Resolve-Proxy-Encoder
58+
```
4259
### Broker
4360
The broker needs to be accessible by each computer over LAN.
4461
Install Redis on an always-on computer or server (nice and easy to run in a docker container):
@@ -60,13 +77,17 @@ Make sure you set the environment variables for `CELERY_BROKER_URL` or Flower wo
6077
If you opt not to run Flower, keep in mind some non-essential CLI commands may not work.
6178

6279
## Configuration
63-
On first run, you'll be prompted to alter your settings. The app will copy the default settings to `$XDG_HOME_CONFIG/resolve_proxy_encoder/user_settings.yml` (A hidden config folder in the local user's home folder).
80+
On first run, you'll be prompted to alter your settings. The app will copy the default settings to the OS user configuration folder.
81+
- **Linux/Mac:** `$XDG_HOME_CONFIG/resolve_proxy_encoder/user_settings.yml`
82+
- **Windows:** `%homepath%/resolve_proxy_encoder/user_settings.yml`
83+
84+
6485

6586
### Some Key Settings
6687

6788
The default global log-level:
6889
```
69-
loglevel: INFO
90+
loglevel: WARNING
7091
```
7192

7293
All proxies will be encoded to this directory. They'll retain the source media's directory structure:
@@ -90,7 +111,7 @@ If you need persistent results, consider configuring your broker for persistent
90111
celery_settings:
91112
result_expires: 60
92113
```
93-
Windows doesn't support preforking for concurrency. Actually, Celery doesn't officially support Windows anymore at all. Running workers on Mac Os, Linux or in Linux containers gets around this limitation. By default we encourage starting multiple workers as 'solo' instead. Change this as necessary to reduce overhead:
114+
Windows doesn't support preforking for concurrency. Actually, Celery doesn't officially support Windows anymore at all. Running workers on Mac, Linux or containerised gets around this limitation. By default the configuration encourages starting multiple workers processes as 'solo' to work with Windows. Change this as necessary to reduce overhead:
94115
```
95116
celery_settings:
96117
worker_concurrency: 1

0 commit comments

Comments
 (0)