Thank you for your interest in contributing to Nexios! This guide will help you get started with contributing to the project.
Quick Start
- Fork the repository: https://github.com/nexios-labs/nexios
- Clone your fork:bash
git clone https://github.com/YOUR_USERNAME/nexios.git cd nexios - Set up development environment:bash
# Create virtual environment and install dependencies uv venv uv pip install -e ".[dev]"bash# Create and activate virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install development dependencies pip install -e ".[dev]" - Create a feature branch:bash
git checkout -b feature/your-feature-name - Make changes and commit:bash
git add . git commit -m "feat: add your feature" - Push to your fork:bash
git push origin feature/your-feature-name - Open a Pull Request to the v3 branch
Development Setup
Prerequisites
- Python 3.9 or higher
- Git
- A GitHub account
- uv (recommended) - Modern Python package installer. Install with:
pip install uv
Environment Setup
Clone the repository:
bashgit clone https://github.com/nexios-labs/nexios.git cd nexiosSet up virtual environment:
bash# Create virtual environment uv venvbash# Create virtual environment python -m venv venv # On Unix/macOS source venv/bin/activate # On Windows venv\Scripts\activateInstall dependencies:
bash# Install development dependencies uv pip install -e ".[dev]"bash# Install development dependencies pip install -e ".[dev]"Install pre-commit hooks:
bashpre-commit install
Running Tests
# Run all tests
pytest
# Run tests with coverage
pytest --cov=nexios --cov-report=term-missing
# Run tests in parallel
pytest -n autoFinding Issues to Work On
- Good First Issues: Look for issues labeled
good first issuefor beginner-friendly tasks - Help Wanted: Issues with the
help wantedlabel need community assistance - Bug Reports: Help fix reported bugs
- Feature Requests: Contribute new features
Submitting Changes
Pull Request Process
Before Submitting:
- Run tests:
pytest - Check code style:
black --check .andisort --check-only . - Ensure all tests pass locally
- Update documentation if needed
- Run tests:
Creating the PR:
- Target the
v3branch - Use a clear, descriptive title
- Reference related issues using
#issue-number - Include a detailed description of changes
- Target the
PR Description Template:
markdown## Description Brief description of what this PR does. ## Changes - List of changes made ## Testing - How you tested the changes - Test cases added/modified ## Related Issues Closes #123
Code Style
We follow strict code style guidelines:
- Python: Follow PEP 8
- Line length: 88 characters (Black formatter standard)
- Type hints: Required for all public APIs
- Docstrings: Follow Google Python Style Guide
Code Formatting Tools
# Format code
black .
# Sort imports
isort .
# Lint code
flake8 .Commit Message Format
We follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style/formattingrefactor: Code changes that don't add featurestest: Adding testschore: Maintenance tasks
Example:
feat(auth): add OAuth2 support
- Add OAuth2 authentication flow
- Update documentation
- Add tests for new functionality
Closes #123Creating Libraries for Nexios
Want to create a library that extends Nexios? We provide a project template to help you get started:
Project Template: https://github.com/nexios-labs/project-template
This template includes:
- Standard project structure
- CI/CD configuration
- Testing setup
- Documentation template
- Pre-commit hooks
- PyPI publishing configuration
Getting Started with the Template
- Click "Use this template" on the GitHub repository
- Clone your new repository
- Customize the template:
- Update
pyproject.tomlwith your project details - Modify README.md
- Update package name and imports
- Update
- Install dependencies and start developing
Documentation
Documentation Structure
docs/
├── guide/ # Tutorials and how-to guides
├── intro/ # Introduction and getting started
├── community/ # Community resources
└── .vitepress/ # Vitepress configurationMaking Documentation Changes
Small Fixes:
- Fix typos, broken links, or outdated information
- Use the "Edit this page" link at the bottom of each doc
New Content:
- Follow the existing documentation style
- Add new Markdown files in the appropriate directory
- Update navigation in the config file
Running Documentation Locally:
bash# Install dependencies npm install # Start development server npm run docs:dev # Build for production npm run docs:build
Documentation Guidelines
- Use clear, concise language
- Include code examples with proper syntax highlighting
- Add step-by-step instructions for complex procedures
- Include links to related documentation
- Keep documentation up-to-date with code changes
Testing
Test Structure
tests/
├── unit/ # Unit tests
├── integration/ # Integration tests
├── conftest.py # Shared fixtures
└── test_config.py # Test configurationWriting Tests
Test Naming:
- Test files:
test_<module_name>.py - Test classes:
Test<ClassName> - Test methods:
test_<method_name>_<condition>
- Test files:
Test Structure:
pythonimport pytest from nexios.module import function_to_test def test_function_with_valid_input(): """Test function with valid input returns expected result.""" # Arrange input_data = {"key": "value"} expected = {"result": "success"} # Act result = function_to_test(input_data) # Assert assert result == expectedTesting Best Practices:
- Write descriptive test names
- Use fixtures for reusable test data
- Test both success and failure cases
- Mock external dependencies
- Aim for high test coverage
Issue Reporting
Bug Reports
When reporting bugs, please include:
- Clear Title: e.g., "Fix: API returns 500 when X"
- Description:
- Steps to reproduce
- Expected vs actual behavior
- Error messages or logs (use code blocks)
- Environment Details:bash
OS: [e.g., Windows 11, macOS 13, Ubuntu 22.04] Python: [e.g., 3.9.7] Nexios Version: [e.g., 1.0.0] - Screenshots/Videos: For UI-related issues
Feature Requests
For feature requests, include:
- Clear description of the feature
- Use case and why it's valuable
- Proposed implementation (if you have ideas)
- Alternative approaches considered
Community
Getting Help
- Discord: Join our Discord community for real-time help
- GitHub Discussions: Use GitHub Discussions for longer conversations
- Issues: Report bugs or request features via GitHub Issues
Code of Conduct
Please note that this project is governed by our Code of Conduct. By participating, you are expected to uphold this code.
Release Management
Versioning
We follow Semantic Versioning:
MAJOR: Incompatible API changesMINOR: Backward-compatible functionalityPATCH: Backward-compatible bug fixes
Branch Strategy
v3: Latest stable release (main development branch)next: Next release candidaterelease-x.y: Maintenance branches for patch releases
Recognition
Contributors are recognized in several ways:
- Contributors list in the repository
- Release notes mentioning significant contributions
- Community recognition in Discord and discussions
- Maintainer opportunities for consistent contributors
Thank you for contributing to Nexios! Your contributions help make the framework better for everyone. Whether you're fixing bugs, adding features, improving documentation, or helping others in the community, your efforts are greatly appreciated.
