Skip to content

docs: audit and refresh README - #1

Merged
Coldaine merged 1 commit into
mainfrom
docs/audit-readme
May 26, 2026
Merged

docs: audit and refresh README#1
Coldaine merged 1 commit into
mainfrom
docs/audit-readme

Conversation

@Coldaine

Copy link
Copy Markdown
Collaborator
  • Top-level README only described the Florence-2 warship extractor; the repo also contains ProjectBroadside/ (BattleshipMaker, BattleshipMaker2, HullCutter, MCPUnityRockstar, Unity scripts), Docs/, Scans/, and BAttleships/. Reframe the README as an umbrella for those sub-projects.
  • Drop the placeholder git clone <repository-url> / cd warship-extractor block — the repo isn't named that and isn't cloned that way.
  • Document the actual extractor entry points (src/warship_extractor/ with pipeline/, detection/, processing/, core/, config/, utils/, cli.py) and the warship-extract CLI subcommands wired up in pyproject.
  • Add a ProjectBroadside layout table covering BattleshipMaker, BattleshipMaker2 (the staged image-gen → 3DGS → mesh pipeline), HullCutter (stub), MCPUnityRockstar (Unity MCP server), and ProjectBroadside.Scripts/ (Unity C#).
  • Replace the boilerplate Contributing / License / Acknowledgments sections with a Status note that reflects the multi-project reality.

Copilot AI review requested due to automatic review settings May 25, 2026 11:50
@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Audit and refresh README to match current multi-project structure

📝 Documentation

Grey Divider

Walkthroughs

Description
• Reframe README as umbrella for multi-project repository
• Document Florence-2 extractor structure and CLI subcommands
• Add ProjectBroadside layout table covering sub-projects
• Replace boilerplate sections with status note reflecting reality
Diagram
flowchart LR
  A["Old README<br/>Florence-2 only"] -->|Reframe| B["New README<br/>Umbrella structure"]
  B --> C["Florence-2<br/>Extractor section"]
  B --> D["ProjectBroadside<br/>Sub-projects table"]
  B --> E["Repository layout<br/>table"]
  D --> F["BattleshipMaker<br/>BattleshipMaker2<br/>MCPUnityRockstar<br/>Scripts"]

Loading

File Changes

1. README.md 📝 Documentation +58/-91

Restructure README as multi-project umbrella documentation

• Changed title from "Florence-2 Warship Extractor" to "BattleshipGraphicsProjects" to reflect
 umbrella repository scope
• Added repository layout table documenting src/warship_extractor/, tests/, Docs/, Scans/,
 BAttleships/, and ProjectBroadside/
• Added ProjectBroadside subprojects table covering BattleshipMaker, BattleshipMaker2, HullCutter,
 MCPUnityRockstar, and ProjectBroadside.Scripts
• Removed placeholder git clone instructions and boilerplate Contributing/License/Acknowledgments
 sections
• Condensed Florence-2 extractor documentation to focus on actual entry points and CLI subcommands
 (extract, batch, report, info)
• Simplified configuration, testing, and usage sections to match current codebase structure
• Added Status section noting active, multi-project, exploratory nature

README.md


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented May 25, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0)

Grey Divider


Action required

1. Wrong env var names 🐞 Bug ≡ Correctness
Description
README.md documents configuration variables like FLORENCE_MODEL_NAME/OUTPUT_DIR, but Settings only
reads variables with the WARSHIP_ prefix and different field names, so the documented exports won’t
affect runtime configuration. This will silently fall back to defaults and mislead users trying to
configure the extractor.
Code

README.md[R90-97]

Evidence
The code defines env_prefix = "WARSHIP_" and uses different setting field names than the README’s
env var snippet, so the README’s variables will not be read by Settings.

README.md[88-97]
src/warship_extractor/config/settings.py[14-110]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
README.md lists environment variables that do not match the extractor’s `Settings` implementation. `Settings` uses `env_prefix = "WARSHIP_"` and field names like `florence_model_name`, `default_dpi`, `output_directory`, and `save_visualizations`, so exporting `FLORENCE_MODEL_NAME`, `PDF_DPI`, `OUTPUT_DIR`, etc. has no effect.

### Issue Context
The extractor configuration is implemented via `pydantic-settings` in `src/warship_extractor/config/settings.py`.

### Fix Focus Areas
- README.md[88-97]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Invalid report CLI example 🐞 Bug ≡ Correctness
Description
README.md shows warship-extract report results/ --format html, but the CLI requires a JSON file
positional argument and accepts --output-dir/--template (no --format). Running the documented
command will fail with argparse errors.
Code

README.md[R65-67]

Evidence
create_parser() defines report with a required results_file positional argument and optional
--output-dir/--template; report_command() loads JSON from args.results_file, so `--format
html` and a directory path won’t work.

README.md[56-70]
src/warship_extractor/cli.py[189-210]
src/warship_extractor/cli.py[422-455]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The README’s `report` command example uses a non-existent `--format` flag and passes a directory-like path, while the CLI expects `report <results_file.json>` and supports `--output-dir` and `--template`.

### Issue Context
The CLI is implemented with `argparse` in `src/warship_extractor/cli.py`.

### Fix Focus Areas
- README.md[58-69]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Broken Python API snippet 🐞 Bug ≡ Correctness
Description
README.md’s Python API example imports ExtractionPipeline/Settings from modules that don’t
expose those names and calls extract_from_pdf(), but the implemented API is
ExtractionPipeline.process_pdf() and Settings lives in config/settings.py. Copy/pasting the
snippet will raise import/method errors.
Code

README.md[R75-84]

Evidence
ExtractionPipeline is defined with a process_pdf(...) method (and no extract_from_pdf), and
Settings is defined in config/settings.py; detections are represented by Detection objects
with label and confidence attributes.

README.md[72-84]
src/warship_extractor/pipeline/extraction_pipeline.py[121-200]
src/warship_extractor/config/settings.py[14-31]
src/warship_extractor/detection/detector.py[22-66]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The README’s Python API snippet doesn’t match the actual public surface:
- `Settings` is defined in `warship_extractor.config.settings`.
- `ExtractionPipeline` is defined in `warship_extractor.pipeline.extraction_pipeline`.
- The pipeline method is `process_pdf(...)` (no `extract_from_pdf`).
- Returned results are `ExtractionResult` objects containing `Detection` objects.

### Issue Context
The pipeline class and settings class are defined under `src/warship_extractor/`.

### Fix Focus Areas
- README.md[72-84]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread README.md
Comment on lines 90 to 97
```bash
# Model settings
FLORENCE_MODEL_NAME="microsoft/Florence-2-large"
FLORENCE_DEVICE="cuda"

# Processing settings
PDF_DPI=300
DETECTION_CONFIDENCE_THRESHOLD=0.7

# Output settings
OUTPUT_DIR="./extracted_warships"
SAVE_ANNOTATED_IMAGES=true
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Wrong env var names 🐞 Bug ≡ Correctness

README.md documents configuration variables like FLORENCE_MODEL_NAME/OUTPUT_DIR, but Settings only
reads variables with the WARSHIP_ prefix and different field names, so the documented exports won’t
affect runtime configuration. This will silently fall back to defaults and mislead users trying to
configure the extractor.
Agent Prompt
### Issue description
README.md lists environment variables that do not match the extractor’s `Settings` implementation. `Settings` uses `env_prefix = "WARSHIP_"` and field names like `florence_model_name`, `default_dpi`, `output_directory`, and `save_visualizations`, so exporting `FLORENCE_MODEL_NAME`, `PDF_DPI`, `OUTPUT_DIR`, etc. has no effect.

### Issue Context
The extractor configuration is implemented via `pydantic-settings` in `src/warship_extractor/config/settings.py`.

### Fix Focus Areas
- README.md[88-97]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread README.md
Comment on lines +65 to 67
# Generate an analysis report
warship-extract report results/ --format html
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. Invalid report cli example 🐞 Bug ≡ Correctness

README.md shows warship-extract report results/ --format html, but the CLI requires a JSON file
positional argument and accepts --output-dir/--template (no --format). Running the documented
command will fail with argparse errors.
Agent Prompt
### Issue description
The README’s `report` command example uses a non-existent `--format` flag and passes a directory-like path, while the CLI expects `report <results_file.json>` and supports `--output-dir` and `--template`.

### Issue Context
The CLI is implemented with `argparse` in `src/warship_extractor/cli.py`.

### Fix Focus Areas
- README.md[58-69]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread README.md
Comment on lines 75 to 84
from warship_extractor.pipeline import ExtractionPipeline
from warship_extractor.config import Settings

# Initialize pipeline
settings = Settings()
pipeline = ExtractionPipeline(settings)

# Extract warships from PDF
results = pipeline.extract_from_pdf("janes_1900.pdf")

# Access results
for detection in results['detections']:
for detection in results["detections"]:
print(f"Found {detection['label']} with confidence {detection['confidence']:.2f}")
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

3. Broken python api snippet 🐞 Bug ≡ Correctness

README.md’s Python API example imports ExtractionPipeline/Settings from modules that don’t
expose those names and calls extract_from_pdf(), but the implemented API is
ExtractionPipeline.process_pdf() and Settings lives in config/settings.py. Copy/pasting the
snippet will raise import/method errors.
Agent Prompt
### Issue description
The README’s Python API snippet doesn’t match the actual public surface:
- `Settings` is defined in `warship_extractor.config.settings`.
- `ExtractionPipeline` is defined in `warship_extractor.pipeline.extraction_pipeline`.
- The pipeline method is `process_pdf(...)` (no `extract_from_pdf`).
- Returned results are `ExtractionResult` objects containing `Detection` objects.

### Issue Context
The pipeline class and settings class are defined under `src/warship_extractor/`.

### Fix Focus Areas
- README.md[72-84]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refreshes the top-level README to describe the repository as an umbrella for multiple sub-projects (the Florence-2 extractor plus the ProjectBroadside 3D/Unity pipelines and supporting assets/docs), instead of focusing solely on the extractor.

Changes:

  • Reframes the README around the repo’s multi-project structure and adds a clear repository layout + ProjectBroadside subproject listing.
  • Updates extractor documentation to point at the src/warship_extractor/ entry points and the warship-extract CLI.
  • Replaces generic Contributing/License/Acknowledgments boilerplate with a “Status” section reflecting the exploratory nature of the repo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Generate analysis report:
```bash
# Generate an analysis report
warship-extract report results/ --format html
Comment thread README.md
Comment on lines 75 to 83
from warship_extractor.pipeline import ExtractionPipeline
from warship_extractor.config import Settings

# Initialize pipeline
settings = Settings()
pipeline = ExtractionPipeline(settings)

# Extract warships from PDF
results = pipeline.extract_from_pdf("janes_1900.pdf")

# Access results
for detection in results['detections']:
for detection in results["detections"]:
print(f"Found {detection['label']} with confidence {detection['confidence']:.2f}")
Comment thread README.md
Comment on lines 91 to 96
FLORENCE_MODEL_NAME="microsoft/Florence-2-large"
FLORENCE_DEVICE="cuda"

# Processing settings
PDF_DPI=300
DETECTION_CONFIDENCE_THRESHOLD=0.7

# Output settings
OUTPUT_DIR="./extracted_warships"
SAVE_ANNOTATED_IMAGES=true
Comment thread README.md
- **Detection Accuracy**: 85-95% for clear illustrations
- **Memory Usage**: 2-4GB GPU memory for large documents
- **False Positive Rate**: <10% with proper filtering
`pyproject.toml` already wires up `pytest --cov` against `src/warship_extractor` by default.
Comment thread README.md
- Multi-prompt strategy to catch different illustration styles
- High-resolution PDF rasterization (300+ DPI by default)
- Non-Maximum Suppression to drop duplicate detections
- CUDA-aware with CPU fallback; dynamic batch sizing
@Coldaine
Coldaine merged commit 3b5e6bf into main May 26, 2026
1 check passed
@Coldaine
Coldaine deleted the docs/audit-readme branch May 26, 2026 02:50
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