Deep-Live-Cam icon indicating copy to clipboard operation
Deep-Live-Cam copied to clipboard

Dynamic requirements with pyproject.toml

Open 0x78f1935 opened this issue 6 months ago • 2 comments

Description

I was using a different version of Python (3.12.2) but within the requirements.txt various libraries where hardcoded.

Type of change

  • Introducing pyproject.toml. Lets you compile your requirements.txt based on the environment you desire. This is also the new standard for newer Python versions. I believe since 3.10,
  • Adjusted readme to reflect usecase
  • Added python linter (Flake8) with some rules
  • Fixed all linting violations. (run flake8 to review violations)

How Has This Been Tested?

This has not been fully tested. It seems to work on my machine with the exception that my face gets a black square. I'm suspecting ffmpeg is the issue here. In addition I don't have darwin or arm64 hardware to my disposal.

Checklist:

  • [X] My code follows the style guidelines of this project?
  • [X] I have performed a self-review of my code
  • [X] I have commented my code, particularly in hard-to-understand areas
  • [X] I have made corresponding changes to the documentation
  • [X] My changes generate no new warnings, (with the black square exception)
  • [x] New and existing unit tests pass locally with my changes

Summary by Sourcery

Introduce pyproject.toml for dynamic dependency management, update documentation for environment setup, and enhance code quality with linting and refactoring.

New Features:

  • Introduce dynamic requirements management using pyproject.toml, allowing for environment-specific dependency compilation.

Enhancements:

  • Add Python linter (Flake8) to the project and fix all existing linting violations.
  • Refactor code for improved readability by reformatting long argument lists and aligning code blocks.

Documentation:

  • Update README.md to include instructions for setting up a virtual environment and compiling requirements using pip-tools.

0x78f1935 avatar Aug 18 '24 02:08 0x78f1935