Update all project references, documentation, and assets to reflect the new branding. Changes include: - Rename application references in README, CONTRIBUTING, DEVELOPMENT - Update default database filename from ollama_proxy.db to lollms_hub.db - Update .env.example header and bootstrap configuration - Adjust .gitignore for new database name - No functional code changes, purely cosmetic rebranding
2.1 KiB
Contributing to lollms hub
Thank you for your interest in contributing! To maintain high code quality and ensure a smooth CI/CD process, please follow these guidelines.
🛠️ Development Setup
-
Clone the repository:
git clone https://github.com/ParisNeo/lollms_hub.git cd lollms_hub -
Install dependencies using Poetry:
poetry install --with dev -
Install Pre-commit hooks: We use
pre-committo ensure your code is formatted and linted every time you commit.pip install pre-commit pre-commit install
🧹 Code Quality (Linting)
Before pushing your code, you should ensure it passes our linting suite.
Automated (Pre-commit)
Once installed, pre-commit runs automatically on git commit. If it finds errors (like trailing whitespace or formatting issues), it will stop the commit and fix them. You just need to git add the changes and commit again.
To run it manually against all files:
pre-commit run --all-files
Manual (Full Suite with Tox)
We use tox to mirror the GitHub Actions environment. This is the most reliable way to check if your code will pass the CI.
# Run all linting checks (Ruff, Flake8, Pylint, Black)
poetry run tox -e flake8,pylint,ruff,format
Fast One-off Checks
If you want to check specific tools quickly without creating environments:
poetry run ruff check app/ # Fast linting
poetry run black --check app/ # Format check
poetry run pylint app/ # Deep static analysis
🧪 Testing
Always run tests before submitting a Pull Request:
# Run all tests
poetry run pytest
# Run tests via Tox for a specific Python version (e.g., 3.12)
poetry run tox -e py312
📝 Pull Request Process
- Create a new branch for your feature or fix:
git checkout -b feature/my-new-feature. - Ensure all linting and tests pass locally.
- Write clear, descriptive commit messages.
- Submit your PR against the
developbranch (ormainif specified).
Note: This project adheres to a "Balanced" response and development style—be helpful, concise, and prioritize security.