|
| 1 | +# How to contribute to AGNI |
| 2 | + |
| 3 | +## Bug reporting |
| 4 | + |
| 5 | +* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/nichollsh/AGNI/issues). |
| 6 | + |
| 7 | +* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/nichollsh/AGNI/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring. |
| 8 | + |
| 9 | +* For more general information on submitting a bug report, visit [this page](https://www.chiark.greenend.org.uk/~sgtatham/bugs.html). |
| 10 | + |
| 11 | +## Bug fixing |
| 12 | + |
| 13 | +* Open a new GitHub pull request (PR) with the patch. |
| 14 | + |
| 15 | +* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable. |
| 16 | + |
| 17 | +* Before submitting, please ensure your changes are consistent with the existing codebase. These can also be viewed in the [API reference guide](https://www.h-nicholls.space/AGNI/dev/reference/api/). |
| 18 | + |
| 19 | + |
| 20 | +## New features |
| 21 | + |
| 22 | +* Suggest your change on the [issues page](https://github.com/nichollsh/AGNI/issues/new) and start writing code. |
| 23 | + |
| 24 | +## Coding style |
| 25 | +- Indentation uses 4 spaces, no tabs. |
| 26 | +- Function names should be lowercase, with words separated by underscores . |
| 27 | +- Lines should aim to have a length of no more than 92 characters. |
| 28 | +- All functions should have docstrings, ideally with Arguments and Returns listed. |
| 29 | +- More comments are always better, even if they seem redundant. |
| 30 | +- Use type hinting where possible. |
| 31 | +- Print statements should be made through the logger where possible. |
| 32 | +- The core package code should not contain global variables, except in the phys module. |
| 33 | + |
| 34 | +## Testing |
| 35 | + |
| 36 | +When contributing code changes, please: |
| 37 | +- Run the test suite to ensure your changes don't break existing functionality |
| 38 | +- Add tests for new features or bug fixes |
| 39 | +- Aim for >80% line coverage for new utility functions |
| 40 | +- Keep tests fast (avoid expensive setup/teardown when possible) |
| 41 | + |
| 42 | +See the [Testing Documentation](https://www.h-nicholls.space/AGNI/dev/howto/testing/) for detailed information on: |
| 43 | +- Running tests locally |
| 44 | +- Generating coverage reports |
| 45 | +- Adding new tests |
| 46 | +- Test design principles |
| 47 | + |
| 48 | +## Queries and questions |
| 49 | + |
| 50 | +* Ask a question about how to use or contribute to AGNI, please use the [discussions page](https://github.com/nichollsh/AGNI/discussions) or contact [Harrison Nicholls](https://www.h-nicholls.space/) directly. |
| 51 | + |
| 52 | +## Open source |
| 53 | + |
| 54 | +AGNI is free, libre, and open source software. I encourage your contributions and suggestions. |
| 55 | + |
| 56 | +Thanks, |
| 57 | +-Harrison |
0 commit comments