diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a397ba3..eee38410 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,9 +28,14 @@ - Added example PR links to pull request template ([#756](https://github.com/nsidc/earthaccess/issues/756)) - [**@Sherwin-14**](https://github.com/betolink), + [**@Sherwin-14**](https://github.com/Sherwin-14), [**@mfisher87**](https://github.com/mfisher87) +- Added Contributing Naming Convention document + ([#532](https://github.com/nsidc/earthaccess/issues/532)) + [**@Sherwin-14**](https://github.com/Sherwin-14), + [**@mfisher87**](https://github.com/mfisher87) + ### Fixed - Removed Broken Link "Introduction to NASA earthaccess" diff --git a/docs/contributing/naming-convention.md b/docs/contributing/naming-convention.md new file mode 100644 index 00000000..8cf37711 --- /dev/null +++ b/docs/contributing/naming-convention.md @@ -0,0 +1,28 @@ +# Contributing Naming Convention + +## General Guidelines + +This document outlines the naming conventions for our project. These conventions are intended to promote consistency and clarity across different components. + +### Specific Conventions + +#### Python Code + +* **Style**: We follow Python Enhancement Proposal 8 ([PEP8](https://peps.python.org/pep-0008/#package-and-module-names)) guidelines for naming conventions. + +#### Jupyter Notebooks + +* **File names**: Please use underscores (`_`) instead of hyphens (`-`). + +#### Documentation + +* **Directory and file names**: Directory names and Markdown file names should use hyphens (`-`) instead of underscores (`_`). + +#### Tests + +1. **Test file and member names**: Test files and methods should start with `test_`. Classes should start with `Test`. + + !!! note "Test File Naming Convention" + We do not use the _test.py suffix for test files + +2. **Additional Guidelines**: For additional guidelines, please refer to the [pytest documentation](https://docs.pytest.org/en/stable/explanation/goodpractices.html#conventions-for-python-test-discovery). diff --git a/mkdocs.yml b/mkdocs.yml index 8a62d86d..c8ab1a70 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -66,6 +66,7 @@ nav: - "Our meet-ups": "contributing/our-meet-ups.md" - "Maintainers Guide": "contributing/maintainers-guide.md" - "Code of Conduct": "contributing/code-of-conduct.md" + - "Contributing naming convention": "contributing/naming-convention.md" - "Resources": "resources.md" - USER GUIDE: - "user_guide/index.md"