Skip to content

feat: Add automated development setup with pre-commit hooks and Ruff linting - #10

Merged
mtalhazulf merged 21 commits into
mainfrom
feature/ci-workflow
Oct 22, 2025
Merged

feat: Add automated development setup with pre-commit hooks and Ruff linting#10
mtalhazulf merged 21 commits into
mainfrom
feature/ci-workflow

Conversation

@hbilal9

@hbilal9 hbilal9 commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

Description

This PR introduces a streamlined development setup with pre-commit hooks and environment configuration:

Key Changes

  1. **Setup Script:

    • Automates project setup for new developers
    • Creates .env from .example.env
    • Configures Git hooks automatically
  2. Pre-commit Hooks:

    • Added Ruff for code quality checks
    • Enforces consistent code formatting
    • Blocks commits with linting errors or warnings
  3. Configuration Updates:

    • Updated Ruff configuration in pyproject.toml
      • Python 3.12 target version
      • 120-character line length
      • Comprehensive rule sets (E, F, A, ASYNC, B, I)
      • Excluded non-source directories
    • Added Mypy configuration for static type checking

How to Use

  1. Run the setup script:
    chmod +x setup.py
    ./setup.py

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@hbilal9
hbilal9 requested a review from mtalhazulf October 1, 2025 06:21
@hbilal9 hbilal9 changed the title Add GitHub Actions Workflow for FastAPI CI with uv feat: Add automated development setup with pre-commit hooks and Ruff linting Oct 15, 2025
@hbilal9
hbilal9 requested review from mtalhazulf and removed request for mtalhazulf October 21, 2025 12:35
@mtalhazulf

mtalhazulf commented Oct 21, 2025

Copy link
Copy Markdown

--> Things to fix

Setup script:

  • setup.py is intended for packaging; using it as an installer is confusing. Rename to scripts/dev_setup.py or convert to a shell script.

Pre-commit hooks:

  • The Ruff version is not pinned; specify a revision for reproducibility.
  • The setup does not run pre-commit install; add this to automatically enable hooks.
  • Consider adding YAML/TOML linters and docstring checks via Ruff or other hooks.

pyproject.toml / tooling:

  • MyPy config is not strict; enable strict or at least disallow_untyped_defs.
  • Line lengths differ (Ruff uses 120 vs Black default 88); unify them.
  • Exclude non-source directories (tests, migrations, __init__.py) from Ruff.

Docs: Merge duplicated setup instructions into a single Getting Started section and mention Windows compatibility (avoid chmod +x).

Version control: There are many noisy commits; squash them into a single clean commit before merging.

Checklist:

  • Rename setup file
  • Pin Ruff version
  • Run pre-commit install in setup
  • Align line lengths across tools
  • Add MyPy strict mode
  • Squash commits

@hbilal9

hbilal9 commented Oct 22, 2025

Copy link
Copy Markdown
Contributor Author

implemented these changes

@mtalhazulf
mtalhazulf merged commit aa1a61d into main Oct 22, 2025
@mtalhazulf
mtalhazulf deleted the feature/ci-workflow branch October 22, 2025 07:55
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