NewsBlur/CLAUDE.md

1.2 KiB

NewsBlur Development Guidelines

Build & Test Commands

  • make nb - Build and start all services
  • make bounce - Restart all containers with new images
  • make shell - Django shell inside container
  • make debug - Debug mode for pdb
  • make log - View logs
  • make lint - Run linting (isort, black, flake8)
  • make test - Run all tests
  • Run single test: docker exec -t newsblur_web python3 manage.py test apps.path.to.test.TestClass.test_method -v 3

Note: All docker commands must use -t instead of -it to avoid interactive mode issues when running through Claude.

Code Style

  • Python:

    • Black formatter with line-length 110
    • Use isort with Black profile for imports
    • Classes use CamelCase, functions/variables use snake_case
    • Use explicit exception handling
    • Follow Django conventions for models/views
  • JavaScript:

    • Use snake_case for methods and variables (not camelCase)
    • Framework: Backbone.js with jQuery/Underscore.js
  • Tests:

    • Classes prefixed with Test_
    • Methods prefixed with test_
  • Prioritize readability over performance

  • Leave no TODOs or placeholders

  • Always reference file names in comments