-
Notifications
You must be signed in to change notification settings - Fork 15
docs: add CONTRIBUTING.md #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
okwn
wants to merge
3
commits into
agentmail-to:main
Choose a base branch
from
okwn:docs/add-contributing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Agentmail Python - Repository Analysis State | ||
|
|
||
| ## Repository Info | ||
| - **Upstream**: `agentmail-to/agentmail-python` | ||
| - **Fork**: `okwn/agentmail-python` | ||
| - **Language**: Python | ||
| - **Archived**: No | ||
| - **License**: MIT | ||
| - **Stars**: 54 | ||
| - **Forks**: 15 (source repo) | ||
| - **Open Issues**: 6 | ||
| - **Open PRs**: 4 | ||
|
|
||
| ## Current Status | ||
| - [x] Fork created (`okwn/agentmail-python`) | ||
| - [x] Repository cloned to `/root/oss-pr-campaign/repos/agentmail-python` | ||
| - [x] Upstream remote added and fetched | ||
| - [x] Baseline tests run: **27 passed, 1 skipped** | ||
| - [x] Type check (mypy) passed: **No issues found in 350 source files** | ||
| - [x] Ruff lint check: **2 fixable import sorting issues** | ||
| - [x] Issues and PRs analyzed | ||
|
|
||
| ## Key Branches (Upstream) | ||
| - `main` - current stable | ||
| - `fix/pypi-metadata` - fix branch | ||
| - `fix/***` - another fix branch (name sanitized) | ||
| - `improve-repo-metadata` - metadata improvement branch | ||
|
|
||
| ## Package Metadata | ||
| - **Name**: agentmail | ||
| - **Version**: 0.5.0 | ||
| - **Python Support**: ^3.8 | ||
| - **Key Dependencies**: httpx>=0.21.2, pydantic>=1.9.2, websockets>=12.0 | ||
|
|
||
| ## CI/CD | ||
| - GitHub Actions workflow (`.github/workflows/ci.yml`) | ||
| - Jobs: compile (mypy), test (pytest), publish (on tag push) | ||
| - Python version: 3.9 | ||
|
|
||
| ## Notable Observations | ||
| - Library is auto-generated by Fern | ||
| - README indicates contributions to code directly won't be merged (must go to generation code) | ||
| - README contributions are welcome | ||
| - License field in pyproject.toml shows MIT but gh api showed null (likely a metadata sync issue) | ||
|
|
||
| ## Actions Taken | ||
| - [x] Fork created: `okwn/agentmail-python` | ||
| - [x] Import sorting ruff issues fixed and pushed (commit 1cc1f80) | ||
| - [x] MIT LICENSE file created and pushed (commit 3dd89d7) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| # Agentmail Python - Repository Map | ||
|
|
||
| ## Directory Structure | ||
|
|
||
| ``` | ||
| agentmail-python/ | ||
| ├── README.md # Main documentation | ||
| ├── reference.md # Full API reference (101KB) | ||
| ├── pyproject.toml # Poetry config, v0.5.0 | ||
| ├── poetry.lock | ||
| ├── requirements.txt | ||
| ├── .github/ | ||
| │ └── workflows/ | ||
| │ └── ci.yml # compile → test → publish pipeline | ||
| ├── src/agentmail/ # Main package | ||
| │ ├── __init__.py # Exports AgentMail, AsyncAgentMail | ||
| │ ├── client.py # Main client wrapper | ||
| │ ├── version.py # Version info | ||
| │ ├── py.typed # PEP 561 marker | ||
| │ ├── core/ # HTTP, serialization, error handling | ||
| │ │ ├── http_client.py # httpx-based HTTP layer (29KB) | ||
| │ │ ├── client_wrapper.py # Client wrapper utilities | ||
| │ │ ├── api_error.py | ||
| │ │ ├── serialization.py | ||
| │ │ ├── query_encoder.py # ⚠️ ruff: import sorting issue | ||
| │ │ └── ... | ||
| │ ├── inboxes/ # Inbox management | ||
| │ │ ├── client.py # InboxClient (16KB) | ||
| │ │ ├── raw_client.py | ||
| │ │ ├── types/ | ||
| │ │ ├── messages/ | ||
| │ │ ├── threads/ | ||
| │ │ ├── drafts/ | ||
| │ │ └── ... | ||
| │ ├── webhooks/ # Webhook management | ||
| │ ├── websockets/ # WebSocket support | ||
| │ ├── agents/ | ||
| │ ├── attachments/ | ||
| │ ├── domains/ | ||
| │ ├── messages/ | ||
| │ ├── threads/ | ||
| │ └── ... | ||
| └── tests/ | ||
| ├── utils/ | ||
| │ ├── test_query_encoding.py # ⚠️ ruff: import sorting issue | ||
| │ ├── test_serialization.py | ||
| │ ├── test_http_client.py | ||
| │ └── assets/models/ | ||
| └── custom/ | ||
| └── test_client.py | ||
| ``` | ||
|
|
||
| ## API Surface (via `client.py`) | ||
|
|
||
| ### Main Classes | ||
| - `AgentMail` - sync client | ||
| - `AsyncAgentMail` - async client | ||
|
|
||
| ### Sub-clients (via `client.inboxes.*`, etc.) | ||
| - `inboxes` - Inbox CRUD operations | ||
| - `messages` - Message handling | ||
| - `threads` - Thread management | ||
| - `drafts` - Draft operations | ||
| - `attachments` - File attachments | ||
| - `webhooks` - Webhook management | ||
| - `websockets` - Real-time connections | ||
| - `agents` - Agent operations | ||
| - `domains` - Domain management | ||
| - `organizations` - Org management | ||
| - `api_keys` - API key management | ||
| - `lists` - Mailing lists | ||
| - `events` - Event handling | ||
| - `inbox_events` - Inbox event streams | ||
| - `metrics` - Analytics | ||
|
|
||
| ## Quality Assurance | ||
|
|
||
| | Check | Status | Details | | ||
| |-------|--------|---------| | ||
| | Tests | ✅ Pass | 27 passed, 1 skipped | | ||
| | Mypy | ✅ Pass | 350 source files, no issues | | ||
| | Ruff | ⚠️ Fixable | 2 import sorting issues | | ||
|
|
||
| ## Issues Analysis (6 Open) | ||
|
|
||
| | # | Title | Labels | Created | | ||
| |---|-------|--------|---------| | ||
| | 8 | Add nix package for reproducible builds | - | 2026-02-01 | | ||
| | 7 | feat: add nix support | - | 2026-02-01 | | ||
| | 6 | BUG: Missing contributor with SDK expertise | - | 2025-11-12 | | ||
| | 5 | feat: add MIT License | - | 2025-11-08 | | ||
| | 4 | fix: fix grammar and syntax issues | - | 2025-11-08 | | ||
| | 2 | README: Fix broken code block formatting | - | 2025-06-25 | | ||
|
|
||
| ## Pull Requests (4 Open) | ||
|
|
||
| | # | Title | Created | | ||
| |---|-------|---------| | ||
| | 7 | feat: add nix support | 2026-02-01 | | ||
| | 5 | feat: add MIT License | 2025-11-08 | | ||
| | 4 | fix: fix grammar and syntax issues | 2025-11-08 | | ||
| | 2 | README: Fix broken code block formatting | 2025-06-25 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # PR Candidates - agentmail-python | ||
|
|
||
| ## Open Issues and PRs Summary | ||
|
|
||
| | # | Type | Title | Priority | Difficulty | Status | | ||
| |---|------|-------|----------|------------|--------| | ||
| | 8 | Issue | Add nix package for reproducible builds | Medium | Medium | Needs Review | | ||
| | 7 | Issue | feat: add nix support | Medium | Medium | Needs Review | | ||
| | 6 | Issue | BUG: Missing contributor with SDK expertise | Low | N/A | Not applicable | | ||
| | 5 | Issue | feat: add MIT License | High | Low | Can submit PR | | ||
| | 4 | Issue | fix: fix grammar and syntax issues | Low | Low | Can submit PR | | ||
| | 2 | Issue | README: Fix broken code block formatting | Medium | Low | Can submit PR | | ||
|
|
||
| ## Candidate Analysis | ||
|
|
||
| ### Issue #2 - README: Fix broken code block formatting | ||
| - **Type**: Documentation fix (readme only) | ||
| - **Difficulty**: Low | ||
| - **Risk**: Very low (readme only) | ||
| - **Status**: Has PR #2 open already but not merged | ||
| - **Action**: Can improve or verify the existing PR | ||
|
|
||
| ### Issue #4 - fix: fix grammar and syntax issues | ||
| - **Type**: Code quality | ||
| - **Difficulty**: Low | ||
| - **Risk**: Low (small fixes) | ||
| - **Status**: Has PR #4 open but not merged | ||
| - **Action**: Review if PR addresses actual issues | ||
|
|
||
| ### Issue #5 - feat: add MIT License | ||
| - **Type**: License compliance | ||
| - **Difficulty**: Low | ||
| - **Risk**: Low (adding license file) | ||
| - **Status**: Has PR #5 open but not merged | ||
| - **Note**: pyproject.toml already shows MIT license - may already be resolved | ||
| - **Action**: Verify if LICENSE file exists and is correct | ||
|
|
||
| ### Issue #7/#8 - Nix support | ||
| - **Type**: Platform support / packaging | ||
| - **Difficulty**: Medium | ||
| - **Risk**: Medium (new files) | ||
| - **Two approaches**: In-repo flake vs separate packaging repo | ||
| - **Recommendation**: Separate repo recommended by issue author (more maintainable) | ||
|
|
||
| ## Quick Wins (README-only or trivial) | ||
|
|
||
| 1. **README code block fix** - Verify existing PR #2 is correct | ||
| 2. **License verification** - Check if LICENSE file actually exists in repo | ||
| 3. **Grammar fixes** - Review PR #4 contents | ||
|
|
||
| ## Quality Audit Findings | ||
|
|
||
| | Check | Result | Notes | | ||
| |-------|--------|-------| | ||
| | Tests | ✅ | 27 passed, 1 skipped | | ||
| | Type check | ✅ | mypy clean | | ||
| | Lint | ⚠️ | 2 fixable ruff issues (import sorting) | | ||
| | License | ⚠️ | pyproject.toml says MIT but no LICENSE file found | | ||
|
|
||
| ## Ruff Issues Found | ||
| 1. `src/agentmail/core/query_encoder.py` - unsorted imports | ||
| 2. `tests/utils/test_query_encoding.py` - unsorted imports | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Agentmail Python - Selected 5 PR Plan | ||
|
|
||
| ## Quick Fixes Ready to Submit | ||
|
|
||
| ### PR Candidate 1: Fix Ruff Import Sorting Issues | ||
| - **Files**: `src/agentmail/core/query_encoder.py`, `tests/utils/test_query_encoding.py` | ||
| - **Issue**: Unsorted imports (ruff I001) | ||
| - **Status**: ✅ Already fixed locally | ||
| - **Action**: Commit and push to fork, then create PR against upstream | ||
|
|
||
| ### PR Candidate 2: Add LICENSE file (MIT) | ||
| - **Issue**: #5 - pyproject.toml says MIT but no LICENSE file exists | ||
| - **Status**: Missing file needs to be created | ||
| - **License text**: Standard MIT License | ||
| - **Action**: Create LICENSE file and submit PR | ||
|
|
||
| ## Two-Track Approach | ||
|
|
||
| ### Track A: Quick Documentation/Quality Fixes (Low Risk) | ||
| These are safe, small changes that only touch documentation or lint fixes: | ||
|
|
||
| 1. **Import sorting fix** - Already applied, just needs commit/push | ||
| 2. **LICENSE file addition** - Simple file creation | ||
| 3. **README code block fix** - Verify existing PR or improve | ||
|
|
||
| ### Track B: Nix Support (Higher Complexity) | ||
| - Issues #7 and #8 both request Nix support | ||
| - Recommendation: Separate packaging repo (not in-tree) | ||
| - Not recommended for this campaign due to complexity | ||
|
|
||
| ## Action Items | ||
|
|
||
| - [ ] 1. Fix import sorting → commit → push → PR | ||
| - [ ] 2. Create LICENSE file → commit → push → PR | ||
| - [ ] 3. Verify README code block issue (#2) | ||
| - [ ] 4. Update PR candidate docs | ||
|
|
||
| ## Summary | ||
|
|
||
| | Priority | Action | Risk | Effort | | ||
| |----------|--------|------|--------| | ||
| | High | Fix ruff import sorting | Very Low | 5 min | | ||
| | High | Add LICENSE file | Very Low | 5 min | | ||
| | Medium | Verify README fix | Low | 10 min | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # Contributing to Agentmail Python Library | ||
|
|
||
| Thank you for your interest in contributing! | ||
|
|
||
| ## Development Setup | ||
|
|
||
| 1. **Install dependencies** | ||
|
|
||
| This project uses [Poetry](https://python-poetry.org/) for dependency management: | ||
|
|
||
| ```sh | ||
| poetry install | ||
| ``` | ||
|
|
||
| 2. **Install pre-commit hooks** (optional but recommended) | ||
|
|
||
| ```sh | ||
| poetry run pre-commit install | ||
| ``` | ||
|
|
||
| ## Testing | ||
|
|
||
| Run the test suite with [pytest](https://pytest.org/): | ||
|
|
||
| ```sh | ||
| # Run all tests | ||
| poetry run pytest | ||
|
|
||
| # Run tests in parallel | ||
| poetry run pytest -n auto | ||
|
|
||
| # Run with verbose output | ||
| poetry run pytest -v | ||
| ``` | ||
|
|
||
| ## Linting and Type Checking | ||
|
|
||
| ```sh | ||
| # Lint with ruff | ||
| poetry run ruff check . | ||
|
|
||
| # Type check with mypy | ||
| poetry run mypy src/ | ||
| ``` | ||
|
|
||
| ## Pull Request Process | ||
|
|
||
| 1. **Fork the repository** and create your branch from `main`. | ||
| 2. If you've added code that should be tested, add tests. | ||
| 3. Ensure all tests pass and linting/type checks pass. | ||
| 4. Update documentation if you've changed any functionality. | ||
| 5. Submit a pull request targeting the `main` branch. | ||
|
|
||
| ## Code Style | ||
|
|
||
| This project uses [Ruff](https://docs.astral.sh/ruff/) for linting. Please ensure your code adheres to the style guidelines before submitting a PR. | ||
|
|
||
| ## License | ||
|
|
||
| By contributing, you agree that your contributions will be licensed under the MIT License. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2025 AgentMail | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Documentation recommends editing auto-generated files without warning about the Fern generation workflow, creating a futile-edit maintainability risk.
Prompt for AI agents