Contributing
Contributions are welcome! Here's how to get started.
Development Setup
- Clone the repository:
- Install with development dependencies:
- Run tests:
Running Tests
# Run all tests
uv run pytest tests/ -v
# Run specific test file
uv run pytest tests/test_wrapper.py -v
# Run with coverage
uv run pytest tests/ --cov=negmas_negolog
Code Style
- Follow PEP 8
- Use type hints
- Write docstrings for public APIs
Adding New Agents
To wrap a new NegoLog agent:
- Import the agent class from
vendor/NegoLog/agents/ - Create a wrapper class in
src/negmas_negolog/wrapper.py - Add to
__all__in bothwrapper.pyand__init__.py - Add tests in
tests/test_wrapper.py - Document in
docs/user-guide/agents.md
Example:
# In wrapper.py
from agents.NewAgent.NewAgent import NewAgent as _NLNewAgent
class NewAgent(NegologNegotiatorWrapper):
"""NegMAS wrapper for NegoLog's NewAgent."""
negolog_agent_class = _NLNewAgent
Submitting Changes
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests
- Submit a pull request
Reporting Issues
Please report issues on GitHub with:
- Python version
- NegMAS version
- Minimal reproducible example
- Full error traceback