First off, thank you for considering contributing. It's people like you that make open-source such a great community. Any contributions you make are greatly appreciated.
To contribute to JsWeb, you'll need to set up your development environment:
# 1. Fork and clone the repository
git clone https://github.com/Jsweb-Tech/jsweb.git
cd jsweb
# 2. Create a virtual environment
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS/Linux
# 3. Install JsWeb in editable mode with dev dependencies
pip install -e ".[dev]"
# 4. Install pre-commit hooks
pre-commit installWe use a standard workflow for contributions. If you have an improvement, please follow these steps:
-
Fork the Project
- Click the "Fork" button at the top right of the repository page. This creates a copy of the project in your own GitHub account.
-
Create a New Branch
- From your forked repository, create a new branch to work on your feature or bug fix.
git checkout -b feature/MyAmazingFeatureorgit checkout -b fix/MyBugFix
-
Make Your Changes and Commit
- Write your code and make sure to add comments and docstrings where necessary.
- Run tests and linters before committing (see below).
- Commit your changes with a clear and descriptive commit message.
git commit -m 'feat: Add some AmazingFeature'
-
Push to Your Branch
- Push your committed changes to your forked repository on GitHub.
git push origin feature/MyAmazingFeature
-
Open a Pull Request
- Go to the original repository and you will see a prompt to create a Pull Request from your new branch.
- Provide a clear title and description for your changes, explaining what you've added or fixed.
- Fill out the PR template completely.
Before submitting your PR, ensure your code passes all checks:
# Run tests
pytest Tests/
# Run code formatters
black .
isort .
# Run linters
flake8 jsweb/
# Or run all pre-commit checks at once
pre-commit run --all-filesThe main branch is protected and requires:
- ✅ Pull request with at least 1-2 approving reviews
- ✅ All CI checks must pass (tests, linting, type checking)
- ✅ Branch must be up-to-date with main
- ✅ Code owner review for core changes
Note: You cannot push directly to main. All changes must go through pull requests.
If you find a bug, please create an issue on the GitHub repository. When you do, please include:
- Your version of jsweb and Python.
- A clear and concise description of the bug.
- The exact steps needed to reproduce the issue.
- Any relevant code snippets that cause the bug.
If you have an idea for a new feature, please open an issue to discuss it. This lets us track the suggestion and allows others to chime in. In your issue, please provide:
- A clear description of the feature.
- An explanation of the problem this feature would solve.
- A code example or use-case, if possible.
Thank you again for your contribution!