Skip to content

V0.1#10

Merged
ayahaustine merged 10 commits intomainfrom
v0.1
Mar 4, 2026
Merged

V0.1#10
ayahaustine merged 10 commits intomainfrom
v0.1

Conversation

@ayahaustine
Copy link
Copy Markdown
Owner

@ayahaustine ayahaustine commented Mar 4, 2026

Summary by CodeRabbit

  • New Features

    • Added GitHub Actions CI/CD workflows for automated testing and PyPI publishing.
    • Implemented semantic versioning and automated release management.
    • Added pre-commit hooks for code quality checks.
    • Enhanced demo application with admin interface and sample data.
  • Documentation

    • Added environment configuration example file.
    • Updated development setup and contribution guidelines.
    • Documented release workflow and versioning strategy.
  • Refactor

    • Modernized type annotations to Python 3.10+ syntax.
    • Updated Python requirement to 3.10 minimum.

- Add GitHub Actions CI pipeline (lint, typecheck, test matrix 3.10-3.12)
- Add GitHub Actions release workflow with semantic-release and PyPI OIDC
- Add .pre-commit-config.yaml (black, isort, ruff, conventional-commits)
- Add .env.example template for required env vars
- Update .gitignore to exclude dist/, build/, and .env
- Bump requires-python to >=3.10
- Add dev deps: pytest-cov, ruff, build, python-semantic-release, uvicorn
- Replace flake8 with ruff; remove unused sqlite optional extra
- Add [tool.ruff] and [tool.ruff.lint] configuration (ignores B008/E501)
- Add [tool.coverage.run] and [tool.coverage.report] (fail_under=70)
- Add [tool.semantic_release] for automated versioning and PyPI publishing
- Update [tool.mypy] to python_version=3.10 with ignore_missing_imports
- Add hatch sdist explicit include list
- Change classifier to Development Status :: 4 - Beta
- __init__.py: add importlib.metadata version lookup with fallback
- site.py, config.py, registry.py: replace Optional[X]/Type[X] with X|None/type[X]
- Remove unused imports (os, Depends, create_auth_dependency, get_current_user)
- Fix whitespace in blank lines and trailing whitespace
- Organize import blocks per isort/ruff
- Replace Optional[X]/Dict[X,Y]/Type[X] with X|None/dict/type throughout
- Fix B904: add 'raise ... from e/err' in except blocks (form_engine, router_factory)
- Fix whitespace and trailing whitespace in blank lines
- Organize import blocks per isort
- Remove unused imports
- Replace Optional/Dict/List/Tuple with builtin equivalents throughout
- Fix E722: replace bare 'except:' with 'except Exception:' in routes.py
- Fix whitespace in blank lines and organize imports
- activity.py: minor cleanup and import organization
- permissions.py, security.py: type annotation modernization
- Replace Optional[X] with X | None in engine.py and session.py
- Fix whitespace in blank lines and trailing whitespace
- Organize import blocks per isort
- admin_tables.py: minor import cleanup
- Replace DemoUser with built-in AdminUser (shared table with CLI)
- Read DATABASE_URL and SECRET_KEY from env/.env
- Remove default admin/password123 seeding (user must run createsuperuser)
- Register AdminUser in admin panel with password_hash excluded
- Delete demo_web.py (superseded by updated demo.py)
- CHANGELOG.md: rewrite in Keep a Changelog format with full v0.1.0 entry
- CONTRIBUTING.md: add automated versioning/release section, pre-commit setup,
  conventional commits table, required GitHub secrets reference
- README.md: minor updates for demo section (no default credentials)
@ayahaustine ayahaustine merged commit ed011f8 into main Mar 4, 2026
0 of 11 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 4, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 12acac65-4f9d-4713-afb3-3909ea9de4c6

📥 Commits

Reviewing files that changed from the base of the PR and between 2778e94 and 5cdab83.

📒 Files selected for processing (32)
  • .env.example
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .gitignore
  • .pre-commit-config.yaml
  • CHANGELOG.md
  • CONTRIBUTING.md
  • README.md
  • demo.py
  • demo_web.py
  • internal_admin/__init__.py
  • internal_admin/admin/__init__.py
  • internal_admin/admin/filters.py
  • internal_admin/admin/form_engine.py
  • internal_admin/admin/model_admin.py
  • internal_admin/admin/query_engine.py
  • internal_admin/admin/router_factory.py
  • internal_admin/auth/__init__.py
  • internal_admin/auth/activity.py
  • internal_admin/auth/models.py
  • internal_admin/auth/permissions.py
  • internal_admin/auth/routes.py
  • internal_admin/auth/security.py
  • internal_admin/cli.py
  • internal_admin/config.py
  • internal_admin/database/__init__.py
  • internal_admin/database/admin_tables.py
  • internal_admin/database/engine.py
  • internal_admin/database/session.py
  • internal_admin/registry.py
  • internal_admin/site.py
  • pyproject.toml

📝 Walkthrough

Walkthrough

This PR introduces comprehensive infrastructure and modernization updates: CI/CD workflows for linting, testing, and semantic-versioned releases; modernizes type annotations across the codebase to Python 3.10+ style; adds environment configuration; consolidates demo application code; updates build configuration and dependencies; and bumps Python requirement to 3.10+.

Changes

Cohort / File(s) Summary
CI/CD Workflows
.github/workflows/ci.yml, .github/workflows/release.yml
Adds GitHub Actions workflows: CI for linting (black, isort, ruff), type-checking (mypy), and testing (pytest across Python 3.10–3.12 with coverage); release workflow for semantic versioning and PyPI publishing.
Project Configuration & Build
pyproject.toml, .env.example, .gitignore, .pre-commit-config.yaml
Updates Python requirement to ≥3.10, author metadata, development status to Beta, replaces flake8 with ruff, adds pytest-cov and semantic-release. Adds pre-commit hooks for formatting, linting, and conventional commits. Includes .env template and expanded .gitignore patterns.
Type Annotation Modernization
internal_admin/admin/filters.py, internal_admin/admin/form_engine.py, internal_admin/admin/model_admin.py, internal_admin/admin/query_engine.py, internal_admin/admin/router_factory.py, internal_admin/auth/activity.py, internal_admin/auth/permissions.py, internal_admin/auth/routes.py, internal_admin/auth/security.py, internal_admin/config.py, internal_admin/registry.py, internal_admin/site.py
Systematically replaces Type[X]type[X], Optional[X]X | None, and collection types (List, Dict) with built-in generics across multiple modules. Updates method signatures consistently while preserving logic.
Type Annotation Modernization (Database/Init)
internal_admin/__init__.py, internal_admin/database/engine.py, internal_admin/database/session.py, internal_admin/database/__init__.py
Modernizes type hints; makes __version__ dynamic via importlib.metadata; updates author; enhances engine creation with SQLite/PostgreSQL-specific configuration and error handling; implements full SessionManager lifecycle.
Auth & Minimal Updates
internal_admin/auth/__init__.py, internal_admin/auth/models.py, internal_admin/cli.py, internal_admin/database/admin_tables.py, internal_admin/admin/__init__.py
Import reordering and whitespace adjustments; adds login redirect for authenticated users; removes unused imports.
Demo Application
demo.py, demo_web.py
Consolidates demo into single demo.py with FastAPI app factory, SQLAlchemy models (DemoCategory, DemoProduct), admin configs, and environment-driven setup; removes demo_web.py.
Documentation
CHANGELOG.md, CONTRIBUTING.md, README.md
Updates demo command reference, documents pre-commit setup and Conventional Commits workflow, adds release automation guidance, restructures changelog for automated releases.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • #3: Overlaps on authentication routing, admin site logic, and demo application refactoring.
  • #1: Original PR introducing the modules being updated and refactored in this change.

Poem

🐰 With types now modern, clean and precise,
CI workflows run, without sacrifice!
From demo to app, the code takes new shape,
Semantic releases help us escape—
Testing and linting make all feel so right! ✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch v0.1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant