Feat/commands builder (#852)

* Protype for ffmpeg builder

* Protype for ffmpeg builder

* Add curl builder

* Fix typing import

* Adjust commands indent

* Protype for ffmpeg builder part2

* Protype for ffmpeg builder part3

* Protype for ffmpeg builder part3

* Add chain() helper to the builders

* Protype for ffmpeg builder part4

* Protype for ffmpeg builder part5

* Protoype for ffmpeg builder part5

* Protoype for ffmpeg builder part6

* Allow dynamic audio size

* Fix testing

* Protoype for ffmpeg builder part7

* Fix and polish ffmpeg builder

* Hardcode the log level for ffmpeg

* More ffmpeg rework

* Prototype for ffmpeg builder part8

* Prototype for ffmpeg builder part9

* Fix CI

* Fix Styles

* Add lazy testing, User Agent for CURL

* More testing

* More testing
This commit is contained in:
Henry Ruhs
2025-01-13 10:42:40 +01:00
committed by henryruhs
parent 7f90ca72bb
commit 8a9e08f3a2
16 changed files with 491 additions and 188 deletions

View File

@@ -0,0 +1,17 @@
from shutil import which
from facefusion import curl_builder, metadata
def test_run() -> None:
user_agent = metadata.get('name') + '/' + metadata.get('version')
assert curl_builder.run([]) == [ which('curl'), '--user-agent', user_agent, '--insecure', '--location', '--silent' ]
def test_chain() -> None:
commands = curl_builder.chain(
curl_builder.head(metadata.get('url'))
)
assert commands == [ '-I', metadata.get('url') ]