AGENTS.md for pymarktools
This guide provides instructions for OpenAI Codex and similar AI agents when working with this repository. pymarktools is a Python library that helps validate and refactor markdown files by checking links and images and providing CLI tools.
Project Structure
src/pymarktools/– library source codetests/– pytest suite mirroring the source layout.github/workflows/– CI configuration
Style Guide
- Target Python 3.13 and include type hints for all public functions.
- Use NumPy‑style docstrings.
- Follow
snake_casefor functions and variables andPascalCasefor classes. - Organize imports into three groups: standard library, third‑party, and local modules.
- Use
uvfor running commands and managing the virtual environment.
Development Workflow
- Run commands through
uv:uv run ty check– type checking.uv run ruff check src/pymarktools tests --fix– lint and auto-fix issues.uv run ruff format --check src/pymarktools tests– ensure formatting.uv run pytest– run the full test suite.uv run pytest --cov=src/pymarktools --cov-fail-under=80– run tests with coverage and fail if coverage drops below 80%.
- When adding, changing, or removing features, update
CHANGELOG.mdusing the existing structure (e.g.[unreleased],Added,Changed, etc.). - Tests should live in the
tests/directory and mock external network calls. - Use
uv run pythonfor all script execution.
Pull Requests
- Provide a clear description of the changes and link any related issues.
- Ensure that all checks above pass before submitting the PR.
- Verify that test coverage remains above 80%.
- Keep PRs focused and update documentation where appropriate.