A big welcome and thank you for considering contributing to Edgartools! We appreciate your interest in helping make this library better. 🎉
There are many ways to contribute, from reporting bugs and suggesting features to writing code, improving documentation, and sharing your expertise.
- Report Bugs: If you encounter a bug, please check if it has already been reported in the GitHub Issues. If not, please open a new issue. Include a clear title, a detailed description of the bug, steps to reproduce it, expected behavior, actual behavior, and your environment details (OS, Python version, Edgartools version).
- Suggest Enhancements: Have an idea for a new feature or an improvement to an existing one? Open an issue using the "Feature request" template. Describe your idea clearly, why it would be beneficial, and any potential implementation details you've considered.
- Improve Documentation: See a typo, something unclear, or an area that needs more explanation in the documentation or docstrings? Submit a pull request with your improvements!
- Write Code: If you want to fix a bug or implement a new feature:
- Find an issue you want to work on (or open one).
- Discuss your plan in the issue comments if it's a significant change.
- Follow the development setup and contribution workflow below.
- Share Expertise: If you have experience with SEC filings, XBRL, financial data analysis, or related areas, your insights are valuable! Participate in discussions on issues or share your knowledge.
This project uses Hatch for environment and project management.
- Fork & Clone: Fork the repository on GitHub and clone your fork locally:
git clone https://github.com/<YOUR_USERNAME>/edgartools.git cd edgartools
- Install Hatch: If you don't have Hatch installed, follow the official installation guide.
- Activate Environment: Set up the development environment and install dependencies (including development tools like
ruff,pytest,mkdocs):This command activates a virtual environment managed by Hatch with all necessary dependencies installed.hatch shell
- Create a Branch: Create a new branch for your changes, based on the
mainbranch:Use a descriptive branch name (e.g.,git checkout main git pull origin main # Ensure you have the latest changes git checkout -b your-feature-or-fix-branch-namefix-filing-parsing-error,add-insider-transaction-api). - Make Changes: Write your code or documentation improvements.
- Format & Lint: Ensure your code adheres to the project's style guidelines by running the formatter and linter:
Fix any reported issues.
# Format code hatch run ruff format . # Check for linting errors hatch run lint
- Test: Run the test suite to ensure your changes haven't introduced regressions:
Make sure all tests pass and coverage doesn't significantly decrease. Consider adding new tests for your changes if applicable.
hatch run cov
- Commit: Commit your changes with a clear and descriptive commit message. Follow conventional commit message formats if possible (e.g.,
fix: Resolve issue with date parsing in Form 4,feat: Add support for 8-K item retrieval).git add . git commit -m "feat: Describe your change here"
- Push: Push your branch to your fork:
git push origin your-feature-or-fix-branch-name
- Open Pull Request: Go to the original
edgartoolsrepository on GitHub and open a pull request from your branch to themainbranch.- Provide a clear title and description for your PR.
- Reference any relevant issues (e.g., "Closes #123").
- Explain the changes you made and why.
- Review: A maintainer will review your PR. Be prepared to discuss your changes and make further adjustments based on feedback.
EdgarTools uses a three-tier documentation system:
- Purpose: User-facing documentation published to edgartools.readthedocs.com
- Content: API reference, user guides, tutorials, installation, configuration
- Standards: Must be maintained, versioned, and follow consistent style
- Audience: End users and developers using EdgarTools
- Purpose: Internal planning, research, and development documentation
- Content: Architecture decisions, feature proposals, research analysis, runbooks
- Standards: Can include sensitive details, work-in-progress, more informal
- Audience: EdgarTools maintainers and contributors
- Purpose: Documentation for AI agents working with the codebase
- Content: Agent instructions, API context, code patterns, generated docs
- Standards: CLAUDE.md is source of truth, context should be accurate and concise
- Audience: AI assistants and automated tools
To avoid conflicts over temporary documentation, use local exclusions instead of global .gitignore:
# Setup local exclusions (run once per developer)
cat >> .git/info/exclude << 'EOF'
# AI-generated documentation
ai_docs/generated/
# Module-specific ephemeral docs
edgar/**/.docs/
# Personal temporary docs
**/TEMP_*.md
**/WIP_*.md
**/LOCAL_*.md
EOFTo preview the external documentation site locally:
hatch run mkdocs serveThen open your browser to http://127.0.0.1:8000.
Thank you again for your contribution!