Skip to content

Sync fork: Multiple improvements and fixes#190

Closed
raifdmueller wants to merge 23 commits intodocToolchain:mainfrom
raifdmueller:main
Closed

Sync fork: Multiple improvements and fixes#190
raifdmueller wants to merge 23 commits intodocToolchain:mainfrom
raifdmueller:main

Conversation

@raifdmueller
Copy link
Collaborator

Summary

This PR syncs the fork with upstream, bringing in multiple improvements and fixes that were developed on the fork.

Major Changes

New Features

Refactoring

Bug Fixes

Documentation

  • Fork-based workflow documentation
  • AI-assisted development setup in CLAUDE.md
  • Branching strategy documentation
  • Issue handling workflow documentation

CI/CD

  • Added Claude Code Review workflow
  • Added Claude PR Assistant workflow
  • Coverage badge automation

Test Results

✅ 471 tests passing
✅ Coverage: 90.5%
✅ All linting checks passed

Commits Included

23 commits from fork development (see commit history for details)

🤖 Generated with Claude Code

rdmueller and others added 23 commits January 24, 2026 08:26
- Document main/develop branching model in CLAUDE.md
- Add development workflow section to README.md
- main is now stable/production, develop is for active development

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
docToolchain#169)

* refactor: Consolidate shared parser utilities (Issue docToolchain#165)

- Create parser_utils.py with shared functions:
  - slugify(): Convert text to URL-friendly slug (uses robust Markdown version)
  - collect_all_sections(): Recursively collect sections into flat list
  - find_section_by_path(): Find section by hierarchical path

- Update asciidoc_parser.py:
  - Remove _title_to_slug() function (use slugify from parser_utils)
  - Remove _collect_all_sections() method
  - Remove _find_section_by_path() method

- Update markdown_parser.py:
  - Remove slugify() function (use from parser_utils)
  - Remove _collect_all_sections() method
  - Remove _find_section_by_path() method

- Add 19 tests for parser_utils functions

Benefits:
- DRY principle: Single source of truth for shared logic
- Bug fixes apply to both parsers automatically
- Easier testing of utility functions

All 454 tests passing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* ci: Run tests on develop branch too

Update test workflow to run on both main and develop branches.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Remove unused pytest import

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Ralf D. Müller <ralf.d.mueller@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…Toolchain#170)

1. ParseWarning.type as Enum
   - Add WarningType enum with UNCLOSED_BLOCK, UNCLOSED_TABLE
   - Update ParseWarning to use WarningType instead of str
   - Add Enum serialization to _convert_value()
   - Update CLI and MCP to use .value for JSON output

2. Remove redundant `pass` in Exception classes
   - FileReadError and FileWriteError already have docstrings

3. Move datetime imports to top of file
   - Remove duplicate imports inside metadata() function
   - Import UTC, datetime at module level

4. Extract _compute_hash() helper function
   - DRY: Single function for MD5 hash computation
   - Used in update() and insert() commands

5. Remove stale TODO and update code
   - SourceLocation now has end_line field
   - Use elem.source_location.end_line in API response

All 435 tests passing, no behavior changes.

Co-authored-by: Ralf D. Müller <ralf.d.mueller@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…oolchain#155)

- Add recursive: bool = Query(default=False) parameter
- Pass recursive to index.get_elements()
- Completes API parity with CLI/MCP for hierarchical filtering

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ve-155

fix: Add recursive parameter to API get_elements endpoint (Issue docToolchain#155)
…lchain#136) (docToolchain#172)

- Add current_list_element variable to track current list
- Initialize end_line when creating list element
- Update end_line for each subsequent list item
- Reset tracking when list ends (non-list line)
- Add tests for list end_line behavior

Fixes docToolchain#136

Co-authored-by: Ralf D. Müller <ralf.d.mueller@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Add issue handling section to branching strategy
- Explain why issues don't auto-close on develop merge
- Document fixed-in-develop label usage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…olchain#163) (docToolchain#173)

- Create services/ package with MetadataService, ValidationService, ContentService
- MetadataService: get_project_metadata(), get_section_metadata()
- ValidationService: validate_structure()
- ContentService: update_section(), compute_hash()
- CLI and MCP now use shared services
- Eliminates ~300 lines of duplicated code
- No behavior changes - all 456 tests pass

Code reduction:
- cli.py: 859 → 696 lines (-19%)
- mcp_app.py: 726 → 530 lines (-27%)

Fixes docToolchain#163

Co-authored-by: Ralf D. Müller <ralf.d.mueller@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Document the fork workflow, git user configuration for AI commits,
and authentication setup for working with Claude Code.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace dual-branch strategy (main/develop) with simpler fork workflow:
- All development happens on fork (raifdmueller/dacli)
- PRs go directly to upstream/main
- Issues auto-close on merge (no more fixed-in-develop label needed)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…9327827816

Add Claude Code GitHub Workflow
Move user-specific settings (fork name, git user, auth details)
to ~/.claude/CLAUDE.md to keep project docs generic.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changes:
- Parser: Capture content for code, tables, lists, diagrams
- API: Add attributes field to ElementItem model
- CLI: Add --include-content and --content-limit flags
- MCP: Add include_content and content_limit parameters
- Tests: Add comprehensive content capture tests (471 passing)
- Docs: Update API and CLI specifications

Details:
- AsciiDoc parser captures content for all block elements
- Markdown parser captures content for code, tables, lists
- Content is opt-in via --include-content flag
- Content can be truncated with --content-limit N
- API always returns attributes when present
- CLI filters attributes based on flags

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove accidentally committed test artifacts.
- Fix line too long (E501)
- Fix unsorted imports (I001)
# Conflicts:
#	.github/workflows/claude-code-review.yml
#	.github/workflows/claude.yml
@raifdmueller
Copy link
Collaborator Author

Closing - this PR contains duplicate commits already on upstream/main. Creating clean PR with only Issue #159 changes.

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