Contributing to Jido Memory
View SourceThank you for your interest in contributing to Jido Memory!
Getting Started
Fork and Clone
git clone https://github.com/agentjido/jido_memory.git cd jido_memorySet Up Development Environment
mix setupRun Tests
mix testCheck Code Quality
mix quality
Development Workflow
Making Changes
Create a feature branch from
maingit checkout -b feat/your-feature-nameMake your changes and write tests
- All public APIs must have documentation
- Tests should achieve >90% coverage
- Run
mix qualityto check formatting, linting, and documentation
Commit with conventional commits (see below)
git commit -m "feat(module): description of change"Push and create a pull request
git push origin feat/your-feature-name
Conventional Commits
This project follows Conventional Commits.
Format:
<type>(<scope>): <subject>
<body>
<footer>Types:
feat- New featurefix- Bug fixdocs- Documentation changesstyle- Formatting, no code changerefactor- Code change, no fix or featureperf- Performance improvementtest- Adding/fixing testschore- Maintenance, deps, toolingci- CI/CD changes
Examples:
git commit -m "feat(store): add postgres adapter"
git commit -m "fix(query): resolve filter with null tags"
git commit -m "docs(readme): clarify namespace modes"
git commit -m "feat!: breaking change to Record schema"
Code Quality Standards
- Formatting: Run
mix format(enforced in CI) - Linting: Run
mix credo - Type checking: Run
mix dialyzer - Documentation: Run
mix doctor --raise(all public APIs must be documented) - Tests: Aim for >90% coverage with
mix coveralls.html
Testing
# Run all tests
mix test
# Run with coverage
mix coveralls.html
# Run a specific test file
mix test test/jido_memory_test.exs
# Run a specific test
mix test test/jido_memory_test.exs:12
Documentation
All public modules and functions must have documentation.
defmodule MyModule do
@moduledoc """
Brief description of this module.
## Overview
Longer description explaining what this module does.
## Examples
iex> MyModule.do_thing(:input)
{:ok, :result}
"""
@doc """
Does a specific thing.
## Parameters
* `input` - Description of input
* `opts` - Keyword list of options
* `:timeout` - Timeout in milliseconds (default: 5000)
## Returns
* `{:ok, result}` - On success
* `{:error, reason}` - On failure
"""
@spec do_thing(term(), keyword()) :: {:ok, term()} | {:error, term()}
def do_thing(input, opts \\ []) do
# Implementation
end
endGenerate docs locally:
mix docs
open doc/index.html
Pull Request Process
- Ensure all tests pass:
mix test - Ensure code quality passes:
mix quality - Update documentation if needed
- Provide a clear description of changes
- Reference any related issues
- Squash commits before merging if requested
Questions or Issues?
- Open an issue on GitHub for bugs or feature requests
- Join discussions in the Jido community channels
Thank you for contributing!