Deep-Live-Cam
Deep-Live-Cam copied to clipboard
Dynamic requirements with pyproject.toml
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
flake8to 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.
Reviewer's Guide by Sourcery
This pull request introduces several significant changes to the project, primarily focusing on improving the development environment, code quality, and dependency management. The main changes include:
- Introduction of pyproject.toml for dynamic requirements management.
- Addition of a Python linter (Flake8) and fixing of linting violations.
- Refactoring of code to improve readability and adhere to best practices.
- Updates to the README.md file to reflect new setup instructions.
- Minor adjustments to various modules for consistency and better code organization.
File-Level Changes
| Files | Changes |
|---|---|
README.mdpyproject.toml |
Introduced pyproject.toml for managing project dependencies and added instructions for compiling requirements |
modules/core.pymodules/ui.pymodules/utilities.pymodules/processors/frame/core.pymodules/processors/frame/face_enhancer.pymodules/processors/frame/face_swapper.py |
Refactored code to improve readability, including breaking long lines and improving function signatures |
README.md |
Updated README.md with new setup instructions for virtual environment and dependency management |
modules/core.pymodules/ui.pymodules/utilities.pymodules/processors/frame/core.pymodules/processors/frame/face_enhancer.pymodules/processors/frame/face_swapper.pymodules/globals.py |
Added Flake8 linter and fixed linting violations across the project |
modules/processors/frame/face_enhancer.pymodules/processors/frame/face_swapper.py |
Adjusted import statements and file paths for consistency across modules |
modules/ui.pymodules/globals.py |
Removed commented-out code and unused variables |
Tips
- Trigger a new Sourcery review by commenting
@sourcery-ai reviewon the pull request. - Continue your discussion with Sourcery by replying directly to review comments.
- You can change your review settings at any time by accessing your dashboard:
- Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
- Change the review language;
- You can always contact us if you have any questions or feedback.
I don't wanna talk anymore to chatGPT (sourcery-ai). If there are issues, please let me know.
Inactivity