Contributing to SHARC
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
๐ Ways to Contributeโ
โ๏ธ Get Startedโ
-
Fork the repo
-
Clone your fork
git clone git@github.com:your_name_here/sharc.git
cd SHARC/ -
Set up a virtual environment (Python 3.8+)
python3 -m venv .venv
source .venv/bin/activate -
Install dependencies
pip install -r requirements.txt
-
Install SHARC in editable mode
pip install -e .
-
Create a new branch
git checkout -b name-of-your-bugfix-or-feature
๐ Report Bugsโ
Spotted a bug? Please report it at SHARC Issues
Include the following:
- Your OS name and version
- Python version and dependencies
- Steps to reproduce the bug
๐ง Fix Bugsโ
Check for open issues tagged with bug
and help wanted
. Feel free to take one on and submit a fix!
โจ Implement Featuresโ
Want to add a new antenna or propagation model? Browse the issues labeled enhancement
and help wanted
.
๐ Write Documentationโ
We welcome contributions to:
- Official documentation
- Docstrings
- Blog posts and tutorials
If you add a new feature, please update the Wiki or relevant documentation files.
๐ก Submit Feedbackโ
Have an idea or suggestion? Open a feature request at SHARC Issues
Feature requests should:
- Clearly explain the functionality
- Keep the scope narrow
- Remember this is a volunteer-driven project
๐ฑ Branching Modelโ
SHARC follows the Git flow model: A Successful Git Branching Model
๐ Main Branchesโ
master
: Stable, production-ready codedevelopment
: Latest development changes for upcoming releases
When development
is stable, it is merged into master
and tagged.
๐ฟ Supporting Branchesโ
Branch Type | From | To | Naming Example |
---|---|---|---|
Feature | development | development | feat/new-propagation |
Release | development | development , master | release/1.0.0 |
Hotfix | master | development , master | hotfix/fix-crash |
๐ง Code Guidelinesโ
๐ Python Styleโ
- Follow PEP8
- Use type annotations
See: Python Type Hints Cheat Sheet
๐ Docstringsโ
-
Use Google-style docstrings
-
Keep them updated when making changes
-
Example:
def foo(arg1: str) -> int:
"""Returns the length of arg1.
Args:
arg1 (str): The string to calculate the length of.
Returns:
int: The length of the provided string.
"""
return len(arg1)
For VSCode users: try the Python Docstring Generator plugin.
โ Testing Your Changesโ
-
Lint with flake8
flake8 sharc tests
-
Run tests
python setup.py test
# OR
py.test -
Install testing tools if needed
pip install flake8 tox
๐ฆ Submitting Changesโ
-
Commit
git add .
git commit -m "Detailed description of your changes" -
Push
git push origin name-of-your-bugfix-or-feature
-
Open a Pull Request
Make sure:
- Your PR includes tests
- Documentation is updated
- Code works with Python 2.6, 2.7, 3.3โ3.5, and PyPy
๐งช Running a Subset of Testsโ
py.test tests.test_sharc