Summary
Prepare PtcRunner for publication to Hex.pm by adding ExDoc for documentation generation and required package metadata. This is the final step before the library can be published as a Hex package.
Context
Architecture reference: Phase 5: Polish
Dependencies: None - all core functionality (Phases 1-4) is complete
Related issues: None
Current State
Based on codebase analysis:
- Main API module (
lib/ptc_runner.ex) has @moduledoc and @doc with examples
mix.exs has basic project configuration but lacks:
ex_doc dependency for documentation generation
- Package metadata (
:package, :docs, :source_url, :homepage_url, etc.)
Verified via:
grep -r "@moduledoc\|@doc" lib/ptc_runner.ex # Shows documentation exists
cat mix.exs # Shows no ex_doc or package config
Acceptance Criteria
Implementation Hints
Files to modify:
mix.exs - Add ex_doc dependency and package configuration
Patterns to follow:
Reference standard Hex package configuration:
defp deps do
[
{:ex_doc, "~> 0.31", only: :dev, runtime: false}
]
end
def project do
[
# ... existing config ...
name: "PtcRunner",
source_url: "https://github.com/devoteam-se/ptc_runner",
docs: docs(),
package: package()
]
end
defp docs do
[
main: "PtcRunner",
extras: ["README.md", "docs/architecture.md"]
]
end
defp package do
[
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/devoteam-se/ptc_runner"},
homepage_url: "https://github.com/devoteam-se/ptc_runner"
]
end
Edge cases to consider:
- Ensure internal modules (
Parser, Validator, etc.) have appropriate @moduledoc (can be @moduledoc false if purely internal)
Test Plan
Verification:
- Run
mix deps.get - should fetch ex_doc
- Run
mix docs - should generate docs without warnings
- Run
mix hex.build --unpack - should create valid package (optional, for validation)
- Run
mix test - existing tests should pass
E2E verification:
- Generated docs should include README content
- Generated docs should include architecture.md as an extra page
- API documentation should show examples from doctests
Out of Scope
- Actually publishing to Hex.pm (requires account setup, versioning decisions)
- Adding a LICENSE file (should be done before actual publishing)
- Comprehensive documentation improvements beyond basic module docs
- Adding req_llm as optional dependency for E2E examples (mentioned in architecture but can be a separate issue)
Summary
Prepare PtcRunner for publication to Hex.pm by adding ExDoc for documentation generation and required package metadata. This is the final step before the library can be published as a Hex package.
Context
Architecture reference: Phase 5: Polish
Dependencies: None - all core functionality (Phases 1-4) is complete
Related issues: None
Current State
Based on codebase analysis:
lib/ptc_runner.ex) has@moduledocand@docwith examplesmix.exshas basic project configuration but lacks:ex_docdependency for documentation generation:package,:docs,:source_url,:homepage_url, etc.)Verified via:
Acceptance Criteria
ex_docadded as dev dependencymix.exs::name- "PtcRunner":description- Already exists:packagewith:licenses,:links,:files, `:homepage_url":docswith:main,:extras(README, architecture.md):source_urlpointing to GitHub repomix docsgenerates documentation successfully@moduledoc(non-false)PtcRunnermodule documented with comprehensive examplesImplementation Hints
Files to modify:
mix.exs- Add ex_doc dependency and package configurationPatterns to follow:
Reference standard Hex package configuration:
Edge cases to consider:
Parser,Validator, etc.) have appropriate@moduledoc(can be@moduledoc falseif purely internal)Test Plan
Verification:
mix deps.get- should fetch ex_docmix docs- should generate docs without warningsmix hex.build --unpack- should create valid package (optional, for validation)mix test- existing tests should passE2E verification:
Out of Scope