Repository navigation
v0.1.0
v0.1.0 (2025-11-12)
Feature
-
feat: initial pypi release (
2ba680e) -
feat: initial pypi release (
30d1060) -
feat: initial release to pypi (
75317f4) -
feat: initial release to pypi (
6370466) -
feat: Initial Release to PyPI (
02755d6) -
feat: add enhanced CI/CD with semantic release and multi-OS testing
- Add Python Semantic Release for automated versioning
- Add pre-commit hooks with ruff for code quality
- Add commitlint for conventional commit validation
- Add multi-OS testing (Ubuntu, Windows, macOS)
- Add build provenance attestation for supply chain security
- Remove separate publish.yml workflow (integrated into ci.yml) (
ee34ec2)
Fix
- fix: resolve semantic-release build failure by using pre-built artifacts
The release job was failing because python-semantic-release tried to run
'python -m build' but the build package wasn't installed in its container.
This fix:
- Downloads the already-built artifacts from the build job
- Sets build_command to empty string in semantic-release config
- Avoids duplicate builds and uses tested artifacts
- More efficient workflow execution
Fixes the error: "/usr/local/bin/python: No module named build" (064f467)
- fix: resolve all ruff linting errors
- Add missing reverse_analyzer parameter to _compile_analysis_data
- Update type hints: Set -> set, IOError -> OSError
- Fix line length violations (split long lines)
- Remove unused imports in test files (
6bb93d3)
Style
- style: apply ruff-format auto-formatting
- Reformat code with ruff-format for consistency
- Consolidate single-line statements that fit within line length
- Applied to 6 files via pre-commit hooks (
99b68ab)
Unknown
- Merge pull request #10 from nanorepublica/claude/debug-release-issues-011CV4b9WzRBWRgXE6zvvtux
feat: debug and identify release issues (dc88b8d)
-
Release: 0.2.1 (
f59ca79) -
Release: 0.2.0 (
a23a274) -
Merge pull request #4 from nanorepublica/claude/cicd-github-actions-011CV2ofdGATxikzCT7taJ3w
Add GitHub Actions for CI/CD and PyPI publishing (c80007f)
-
Merge branch 'claude/cicd-github-actions-011CV2ofdGATxikzCT7taJ3w' of http://127.0.0.1:57967/git/nanorepublica/django-deadcode into claude/cicd-github-actions-011CV2ofdGATxikzCT7taJ3w (
cb2e384) -
Merge branch 'main' into claude/cicd-github-actions-011CV2ofdGATxikzCT7taJ3w (
7117dfc) -
Merge pull request #3 from nanorepublica/claude/feature-reverse-redirect-detection-011CV2ofdGATxikzCT7taJ3w
0.2.0 - URL reverse/redirect usage detection (dd76dd5)
- Implement Reverse/Redirect Detection feature (v0.2.0)
Add Python AST analysis to detect reverse() and redirect() URL references,
reducing false positives in dead code detection.
New Features:
- ReverseAnalyzer class for detecting programmatic URL references
- Detects reverse(), reverse_lazy(), redirect(), HttpResponseRedirect()
- Dynamic URL pattern detection (f-strings, concatenation) with flagging
- Integration with finddeadcode command
Implementation Details:
- AST parsing of all Python files (excluding migrations/third-party)
- Handles nested patterns: HttpResponseRedirect(reverse('url'))
- Supports namespaced URLs: reverse('app:view-name')
- Ignores method calls (self.reverse(), list.reverse())
- Combines template and Python URL references
Testing:
- 20 new tests (15 unit + 5 integration)
- 39/39 tests passing (100% success rate)
- 100% code coverage on ReverseAnalyzer
- 0 regressions in existing tests
- Performance impact < 10%
Files Created:
- django_deadcode/analyzers/reverse_analyzer.py (65 lines)
- tests/test_reverse_analyzer.py (15 tests)
- tests/test_integration_reverse_detection.py (5 tests)
Files Modified:
- django_deadcode/analyzers/init.py (added export)
- django_deadcode/management/commands/finddeadcode.py (integrated)
- README.md (added Python code analysis section)
- CHANGELOG.md (v0.2.0 section)
- roadmap.md (feature #8 marked complete)
All acceptance criteria met. Ready for production use. (65ec691)
- Merge pull request #1 from nanorepublica/claude/agent-os-development-011CV2ofdGATxikzCT7taJ3w
Django deadcode - v0.1.0 (0566864)
- Fix all ruff linting errors
Applied automatic and manual fixes to resolve 95 linting issues:
Automatic fixes (93 issues):
- Updated typing imports: Dict -> dict, List -> list, Set -> set
- Removed deprecated Optional[X] in favor of X | None
- Removed unused imports (Template, TemplateSyntaxError, get_template,
inspect, apps, TemplateView, importlib, sys, Path, etc.) - Fixed import order (sorted imports)
- Replaced IOError with OSError (IOError is an alias)
Manual fixes (2 issues):
- Split long lines in reporters/base.py (lines 101 and 216)
to comply with 88 character line length limit
Configuration updates:
- Updated pyproject.toml to use [tool.ruff.lint] section instead of
deprecated top-level lint settings
All tests pass (19/19). All ruff checks now pass. (a71a9b5)
- Add pythonpath to pytest config to fix module import in CI
Added 'pythonpath = ["."]' to pytest configuration to ensure the
project root is on the Python path when pytest-django initializes.
This fixes the 'No module named tests' error in GitHub Actions CI.
The pythonpath setting tells pytest to add the current directory to
sys.path before importing test modules, allowing pytest-django to
import 'tests.settings' successfully.
Tests pass locally and should now pass in CI. (cb66329)
- Fix pytest-django configuration for library packages
Add 'django_find_project = false' to pytest configuration to prevent
pytest-django from looking for manage.py.
This is necessary because django-deadcode is a Django package/library,
not a Django project. Libraries don't have manage.py files, but still
need Django settings for testing.
The setting tells pytest-django to use the DJANGO_SETTINGS_MODULE
directly without searching for a Django project structure.
All 19 tests now pass successfully. (304267f)
- Update CI to test only supported Python and Django versions
Updated testing matrix to focus on currently supported versions:
Python versions:
- Removed: 3.8 (EOL Oct 2024), 3.9 (EOL Oct 2025)
- Testing: 3.10, 3.11, 3.12, 3.13
- Minimum required: Python >=3.10
Django versions:
- Removed: 3.2 LTS (EOL Apr 2024), 4.0 (EOL Apr 2023), 4.1 (EOL Dec 2023)
- Testing: 4.2 LTS, 5.0, 5.1
- Minimum required: Django >=4.2
Additional updates:
- Updated pyproject.toml classifiers and dependencies
- Updated Ruff target-version to py310
- Updated mypy python_version to 3.10
- Updated PYPI_SETUP.md documentation
This ensures we only test and support versions that are actively maintained,
reducing CI time and maintenance burden. (70d4676)
- Add GitHub Actions for CI/CD and PyPI publishing
Set up automated testing and PyPI publishing using GitHub Actions,
following best practices from nanorepublica/django-prodserver.
CI Workflow (.github/workflows/ci.yml):
- Lint with Ruff on all pushes and PRs
- Test matrix: Python 3.8-3.12
- Test matrix: Django 3.2-5.0
- Build distribution packages
- Upload coverage to Codecov
Publish Workflow (.github/workflows/publish.yml):
- Triggered on GitHub Releases
- Uses PyPI Trusted Publishers (OIDC, no tokens needed)
- Signs packages with Sigstore for supply chain security
- Uploads signed artifacts to GitHub Release
Additional Files:
- PYPI_SETUP.md: Complete setup guide for PyPI Trusted Publishers
- .github/dependabot.yml: Automated dependency updates
- README.md: Added CI, PyPI, and version badges
Security Features:
- OIDC authentication (no stored tokens)
- Sigstore package signing
- GitHub environment protection (optional)
- Minimal permissions (principle of least privilege)
Setup Required:
- Configure PyPI Trusted Publisher at pypi.org
- Optionally create 'pypi' environment in GitHub Settings
- Update version in pyproject.toml before release
- Create GitHub Release to trigger publishing
Based on modern 2024 best practices and django-prodserver patterns. (ca29a79)
- Add implementation tasks for Reverse/Redirect Detection
Created comprehensive task breakdown organized into 5 phases:
- Phase 1: Foundation (optional AST refactoring)
- Phase 2: Core Implementation (ReverseAnalyzer + pattern detection)
- Phase 3: Integration (finddeadcode command)
- Phase 4: Testing & QA (16-28 tests total)
- Phase 5: Documentation & polish
Key features:
- Test-driven approach with focused test groups
- Clear dependencies and execution order
- Specific file references and acceptance criteria
- Time estimates: 19-27 hours total
Ready for implementation with /implement-tasks or /orchestrate-tasks (678acc3)
- Add comprehensive specification for Reverse/Redirect Detection
Created detailed spec.md (351 lines) for v0.2.0 feature.
Technical Design:
- New ReverseAnalyzer class with AST parsing
- Detects reverse(), redirect(), HttpResponseRedirect(), reverse_lazy()
- Integration via combining referenced URL sets
Includes implementation details, testing strategy, and acceptance criteria.
Ready for task list creation. (3564f2d)
- Add requirements documentation for Reverse/Redirect Detection
Documented key decisions from requirements gathering phase:
Scope & Architecture:
- Analyze all Python files (views, forms, models, utils, etc.)
- Create separate ReverseAnalyzer class
- Refactor common AST parsing logic between analyzers
Detection Patterns:
- reverse('url-name')
- redirect('url-name')
- HttpResponseRedirect(reverse('url-name'))
- reverse_lazy('url-name')
Behavior:
- Mark detected URLs as "referenced" to prevent false positives
- Detect dynamic URLs and flag for manual investigation
- Exclude from unreferenced URL list
Exclusions:
- JavaScript files
- Third-party package code
- Migration files
- Edge cases (comments, strings, method calls)
Next step: Generate formal specification document with /write-spec (a160347)
- Initialize spec for Reverse/Redirect Detection feature
Created spec folder structure for v0.2.0 feature:
- Feature: Detect reverse() and redirect() calls in Python code
- Priority: High (reduces false positives in dead code detection)
- Scope: AST parsing for Django URL helper functions
Spec folder: agent-os/specs/2025-11-12-reverse-redirect-detection/
- planning/raw-idea.md: Feature description and context
- planning/visuals/: Placeholder for mockups
- implementation/: For future implementation docs
This feature will extend the dead code analyzer to track programmatic
URL references, preventing false positives when URLs are referenced
via reverse() but not in templates. (d034497)
- Update roadmap to reflect v0.1.0 completion
Mark features 1-7 as completed with implementation details:
- Template link extraction (href and {% url %} tags)
- URL pattern discovery with namespace support
- URL matching engine for dead code identification
- View reference tracking
- Template usage analysis via AST parsing
- Django management command CLI
- Template inheritance tracking (include/extends)
Note partial completion of features 9 and 12:
- Multi-app analysis: filtering implemented, visualization pending
- Enhanced reporting: JSON/Markdown/Console done, HTML pending
Outline v0.2.0 plans focusing on false positive reduction:
- Reverse/redirect detection
- Django admin URL filtering
- Cross-app dependency visualization (
eae28eb)
- Implement django-deadcode package based on blog post
Built a complete Django package for dead code analysis that tracks
relationships between templates, URLs, and views to identify unused code.
Features implemented:
- Template analyzer: Extracts URL references from href and {% url %} tags,
tracks {% include %} and {% extends %} relationships - URL pattern analyzer: Discovers all URL patterns and maps them to views
- View analyzer: Identifies template usage in render() calls and
class-based views (template_name attribute) - Multiple reporters: Console, JSON, and Markdown output formats
- Django management command: python manage.py finddeadcode
- Comprehensive test suite: 19 tests with 69% coverage
Package structure:
- Uses Django's native management command structure
- Installable via pip with pyproject.toml configuration
- Supports Django 3.2+ and Python 3.8+
- CLI options for custom output formats, file export, and app filtering
Documentation:
- README with installation, usage, and examples
- CONTRIBUTING guide for developers
- CHANGELOG tracking releases
- MIT License
All tests pass successfully. (7cabad4)
- Add product documentation for django-deadcode
Created comprehensive product documentation including:
- Mission statement with user personas and value proposition
- Roadmap with 12-feature development plan across 3 phases
- Tech stack documentation with architecture decisions
The tool will analyze Django codebases to identify dead code by
tracking relationships between templates, URLs, and views. (a4ec06f)
- Initial commit (
00f1d8d)