|
| 1 | +Thank you for your interest in contributing to this project. |
| 2 | +These guidelines explain how to contribute code, documentation, or feedback to repositories under the Statistics NZ GitHub Organization. |
| 3 | + |
| 4 | +# 1. Ways to contribute |
| 5 | + |
| 6 | +You can contribute by: |
| 7 | + |
| 8 | +* Reporting bugs or issues |
| 9 | +* Suggesting enhancements |
| 10 | +* Submitting code (new features/ bug fixes) |
| 11 | +* Improving documentation (README, Wiki, tutorials) |
| 12 | + |
| 13 | +# 2. Workflow |
| 14 | +a. Fork and branch |
| 15 | +* Fork the repository to your own GitHub account |
| 16 | +* Create a new branch for your code development: |
| 17 | + |
| 18 | +``` |
| 19 | +git checkout -b feature/<short-description> |
| 20 | +``` |
| 21 | + |
| 22 | +* Use clear, descriptive branch names (e.g., ```bugfix/fix-sql-query```) |
| 23 | + |
| 24 | +b. Code Standards |
| 25 | +* Follow the coding standards for the relevant programming language (R, Phyton, SAS, SQL, JavaScript, etc.) |
| 26 | +* Write clean, well-documented code |
| 27 | +* Include comments for complex logic |
| 28 | +* Add or update test where possible |
| 29 | + |
| 30 | +c. Commits |
| 31 | +Use clear, descriptive commit messages: |
| 32 | +``` |
| 33 | +[git command]: "Short summary" |
| 34 | +``` |
| 35 | +Examples: |
| 36 | +``` |
| 37 | +git commit -m "Fix: corrected null handling in SQL query" |
| 38 | +
|
| 39 | +git commit -m "feat: added R function for time series interpolation" |
| 40 | +``` |
| 41 | + |
| 42 | +d. Pull Request (PRs) |
| 43 | +* Targer the ```uat``` or ```dev``` branch for testing and integration |
| 44 | +* PRs to ```main/master``` (production) are only made by mainteners/owners after quality assurance testing |
| 45 | +* Each PR should include: |
| 46 | + - Reference to related issue(s) (e.g., ```Fixes #42```) |
| 47 | + - Contain a clear description of the change |
| 48 | + - Pass automated checks (linting, unit tests) |
| 49 | + |
| 50 | +# 3. Documentation |
| 51 | +* Update the ```README.md``` if your change affects usage |
| 52 | +* Add Roxygen2 style comments to explain new functions, workflows, or data transformations |
| 53 | +* Follow the repository structure for documentation |
| 54 | + |
| 55 | +# 4. Licensing and Data Protection |
| 56 | +* All contributors must comply with the **Crown Copyright** license unless otherwisew specified. |
| 57 | +* Do not commit sensitive data, credentials, or unpublished statistics |
| 58 | +* Ensure that any third-party libraries or code comply with the approved licenses listed in the repository |
| 59 | + |
| 60 | +# 5. Getting help |
| 61 | +If you are unsure about how to contribute, please: |
| 62 | + |
| 63 | +* Open a discussion in the respository's **Issues** section |
| 64 | +* Contact the repository maintainers |
| 65 | +* If repository maintainers not available, contact the admninistrator: githubadmin@stats.govt.nz |
0 commit comments