From 67deb38d639f8dc8bf9e354cf8c1cde3a0a39146 Mon Sep 17 00:00:00 2001 From: Sherwin-14 Date: Sat, 21 Sep 2024 14:04:06 +0530 Subject: [PATCH] Added rules for tests and docs --- CHANGELOG.md | 7 +++++-- docs/contributing/naming-convention.md | 15 +++++++++------ mkdocs.yml | 1 + 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cab9c40..dd741444 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,10 +28,13 @@ - 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 diff --git a/docs/contributing/naming-convention.md b/docs/contributing/naming-convention.md index 587768e6..023b3964 100644 --- a/docs/contributing/naming-convention.md +++ b/docs/contributing/naming-convention.md @@ -2,23 +2,26 @@ ## General Guidelines -1.This document outlines the naming conventions for our project. -2.These conventions are intended to promote consistency and clarity across different components. +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 the official Python Enhancement Proposal 8 (PEP8) guidelines for naming conventions. + **Style**: We follow the official Python Enhancement Proposal 8 [PEP8]((https://peps.python.org/pep-0008/#package-and-module-names) ) guidelines for naming conventions. #### Jupyter Notebooks - File Names: File names should start with an underscore (_). Please use underscores instead of hyphens. + **File Names**: File names should start with an underscore (_). Please use underscores instead of hyphens. #### Documentation + **Directory and File Names**: Directory and file names should use hyphens (-) instead of underscores. +#### Tests +1. **Test File and Function Names**: Test files and functions should start with `test_`. +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). - - +!!! note "Test File Naming Convention" + We do not use the _test.py suffix for test files diff --git a/mkdocs.yml b/mkdocs.yml index 2dd3e761..c025246b 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" + - "Naming Convention": "contributing/naming-convention.md" - "Resources": "resources.md" - USER GUIDE: - "user_guide/index.md"