First off, thank you for considering contributing to Network Topology Optimiser! It's people like you that make this tool a brilliant resource for network planning and optimisation.
By participating in this project, you are expected to uphold our Code of Conduct:
- Use welcoming and inclusive language
- Be respectful of differing viewpoints and experiences
- Gracefully accept constructive criticism
- Focus on what is best for the community
- Show empathy towards other community members
Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples to demonstrate the steps
- Describe the behaviour you observed after following the steps
- Explain which behaviour you expected to see instead and why
- Include screenshots if possible
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- Use a clear and descriptive title
- Provide a step-by-step description of the suggested enhancement
- Provide specific examples to demonstrate the steps
- Describe the current behaviour and explain which behaviour you expected to see instead
- Explain why this enhancement would be useful
- Fork the repo and create your branch from
master
. - If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code follows the existing coding style.
-
Install prerequisites:
# For C development sudo apt-get install gcc make # For Python development pip install networkx matplotlib numpy pandas
-
Clone the repository:
git clone https://github.com/Eusha425/network-topology-optimiser.git cd network-topology-optimiser
-
Create a new branch:
git checkout -b feature/your-feature-name
- Use 4 spaces for indentation
- Function names should be in snake_case
- Variable names should be descriptive and in snake_case
- Constants should be in UPPER_SNAKE_CASE
- Include comments for complex logic
- Example:
#define MAX_VERTICES 1000 int calculate_network_cost(Graph* graph, int vertex_count) { int total_cost = 0; // Calculate total cost logic here return total_cost; }
- Follow PEP 8 guidelines
- Use 4 spaces for indentation
- Use descriptive variable names
- Include docstrings for functions and classes
- Example:
def visualise_network(graph_data, output_path): """ Visualise network topology using matplotlib. Args: graph_data (dict): Network topology data output_path (str): Path to save visualisation """ # Visualisation logic here pass
- Write unit tests for new features
- Ensure all tests pass before submitting PR
- Include both positive and negative test cases
- C tests using Unity framework
- Python tests using pytest
Example test structure:
tests/
├── c_tests/
│ ├── test_graph.c
│ └── test_algorithms.c
└── python_tests/
├── test_visualisation.py
└── test_data_processing.py
- Update README.md if you change functionality
- Document new functions and classes
- Update API documentation if applicable
- Include examples for new features
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
- Example:
Add network density calculation feature - Implement density calculation algorithm - Add unit tests for density calculation - Update documentation with density metrics Fixes #123
- Update version number in relevant files
- Update CHANGELOG.md
- Create a new release branch
- Create and merge release PR
- Tag the release
- Update master branch
bug
: Something isn't workingenhancement
: New feature or requestdocumentation
: Documentation only changesgood first issue
: Good for newcomershelp wanted
: Extra attention is neededperformance
: Performance-related issues
Contributors who submit PRs that get merged will be added to the Contributors section in the README.md.
Feel free to contact the maintainers if you have any questions. We are here to help!