Skip to content

Conversation

@samidarko
Copy link
Contributor

Overview

This pull request focuses on improving code quality and consistency by formatting the entire codebase using black and isort. The formatting was executed via the poetry run format command, which standardizes the Python code style and organizes imports.

Key Changes

  1. Formatted Codebase:

    • Reformatted all Python files using black to enforce a consistent and readable code style.
    • Reorganized imports using isort to ensure they are structured logically and adhere to standard conventions.
  2. Poetry Script Integration:

    • The poetry run format command was used to perform the formatting. This ensures all contributors can use the same formatting tools consistently.

Benefits

  • Improved Code Consistency: The entire codebase now adheres to a single, standardized style.
  • Enhanced Readability: Proper formatting improves code readability and maintainability.
  • Streamlined Collaboration: Using black and isort ensures uniformity, reducing unnecessary code review comments about formatting.

How to Test

  1. Ensure poetry is installed:
    curl -sSL https://install.python-poetry.org | python3 -
  2. Install dependencies:
    poetry install
  3. Run the formatting command locally:
    poetry run format
  4. Verify that the codebase adheres to the expected formatting.

Next Steps

  • Enforce formatting checks in the CI pipeline using poetry run format-check to prevent unformatted code from being merged in the future.
  • Update any contributing documentation to recommend running poetry run format before committing code.
  • Introduce Pre-Commit Hooks:
    • Add pre-commit hooks to automatically run black and isort on staged files before each commit. This will ensure consistent formatting without requiring manual intervention.

References

By formatting the codebase and introducing tools for maintaining consistency, this PR sets a strong foundation for better collaboration and streamlined development processes.

# Conflicts:
#	pyproject.toml
#	scripts.py
#	videotuna/hyvideo/inference.py
#	videotuna/lvdm/modules/ae_modules.py
#	videotuna/lvdm/modules/vae/autoencoder.py
@YingqingHe YingqingHe merged commit 7c61db1 into VideoVerses:main Feb 3, 2025
@samidarko samidarko deleted the code-format branch March 9, 2025 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants